ExpressionEngine: “Freo Add-on Installer” makes installing add-ons a breeze

I wrote my first module for ExpressionEngine, called “Freo Add-on Installer”, with the aim of saving EE developers a lot of time.  Here’s what it’s all about.

[Jump to Download/Installation Link]

Each time you set up a website with ExpressionEngine you probably want to install several different modules, extensions, and plugins. Doing that usually involves downloading a .zip file for each add-on, then individually unzipping and uploading each file/folder to the corresponding modules/, extensions/, plugins/, language/, and themes/ folders. Then each time any add-on is updated, you have to repeat the process across all your websites.

With my module, installing other add-ons is basically a one-click process. You just visit the module page (shown below) and then either upload a .zip/.php file, or give it the URL to the source from the developer’s website. Hit one button and my module takes the source file, extracts, and searches through the files and determines where each file/folder goes.

Screenshot:

Freo Add-on Installer for ExpressionEngine

For example, if you just upload a .zip file that contains a folder for a module, a pi.someplugin.php, and a lang.someplugin.php, all of the files will get extracted and moved to their proper locations. If it comes across a file it doesn’t understand, it will let you know.

Requirements:

  • ExpressionEngine 1.6.8
  • PHP cannot be in Safe Mode
  • You may need to change permissions for a few folders if instructed

These likely would only be a problem with some shared hosting companies. (If you need good ExpressionEngine hosting let me know).

Installation:

  1. Download freo_addon_installer_1.2.zip and unzip
  2. Upload the freo_addon_installer/ folder to your system/modules/ folder
  3. From the Modules page of your EE Control Panel, click “Install” next to “Freo Add-on Installer”
  4. If you’re running a version of EE older than 1.6.8, copy freo_addon_installer/language/english/lang.freo_addon_installer.php to system/languages/english/
  5. Please donate to support development of this and future add-ons.

Changes:

  • v1.2 – Bug fixes (Oct. 25, 2009)
  • v1.1 – Fixed problem when URLs redirect, like on github download zip URLs.  Added better support for installing fieldtypes for Brandon Kelly’s FieldFrame extension.  (Oct. 7, 2009)
  • v1.0 – Initial Release. (Oct. 7, 2009)

Ideas & Plans:

  • Create a long list of known add-ons to choose from so that installing will truly be one-click and not require looking up a source .zip URL.
  • Integrate with LG Addon Updater so installing updates will be more of a breeze.

Feedback & Support:

If you encounter any problems or have any ideas for improvement at all please let me know. Leave a comment below and let me know how you like it. This support thread in the forums is the best place to resolve any problems you may have.

Please donate to support development of this and future add-ons.


Follow @philfreo on Twitter

16 Comments

  1. Jae said,

    October 7, 2009 @ 1:22 am

    A super idea. Thanks a bunch for writing this – should save a lot of time for us!

  2. Sean said,

    October 7, 2009 @ 1:24 am

    Just heard about this 1 hour too late to try on my latest project, but will definitely give it a shot on my next site.

  3. Ingmar Greil said,

    October 7, 2009 @ 5:25 am

    This looks very useful, looking forward to test. The one thing that would make this a killer application would be the ability to use this for ExpressionEngine build updates as well. You know, upload the .zip file, and let the module do the rest…

  4. Jon Livingston said,

    October 7, 2009 @ 9:46 am

    Great job on the ExpressionEngine module Phil. Installing an add-on has never been easier.

  5. Habibulin said,

    October 7, 2009 @ 10:00 am

    Just checked out your addon…Nice work! Definitely something that should become a standard feature of EE moving forward. Job well done.

    I did run into one issue, trying to install Brandon Kelly’s wygwam editor. I think it might stem from the need to upload a folder into the “fieldtypes” directory? Perhaps this could be one of the directory checks conducted in a future update?

  6. Phil Freo said,

    October 7, 2009 @ 10:07 am

    Thanks everyone… glad you’re liking it so far.

    @Habibulin: plugins for the fieldtypes/ directory should work already in v1.0 if the source file has a directory structure like: extensions/fieldtypes/wygwam/. I assume that wygwam must not include the extensions/ folder though? I suppose I could make it look for a “ft.*.php” file and assume its folder is a fieldtype.

  7. Habibulin said,

    October 7, 2009 @ 10:38 am

    Phil,

    Your right on, that’s the correct folder structure. Hmm…

  8. Mike said,

    October 7, 2009 @ 10:44 am

    very impressive. good job.

  9. Phil Freo said,

    October 7, 2009 @ 8:43 pm

    Version 1.1 was just added. Adds better support for FieldFrame fieldtypes (as described above) and fixes problems with URLs that redirect — this allows using github source .zip URLs.

  10. Nicolas Bottari said,

    October 8, 2009 @ 3:40 am

    Aww, I’m not saving any time, as I got this error message after installing the module and trying to go to its settings page:

    Fatal error: Call to undefined method Display::view() in /Applications/XAMPP/my_site_folder/system/modules/freo_addon_installer/mcp.freo_addon_installer.php on line 247

    Am I doing something wrong? I’m on EE 1.6.7 and I moved the language file to the language folder.

    Thanks, and great module idea!

  11. Phil Freo said,

    October 8, 2009 @ 8:22 am

    @Nicolas
    Nope, it doesn’t look like you’re doing anything wrong. I followed the recommendations from EE and used “Views” for the CP page, however apparently that isn’t available until EE 1.6.8. If I get time I’ll push an upgrade out that doesn’t use Views, but in the meanwhile your only option is to get on EE 1.6.8.

  12. Marcel said,

    October 9, 2009 @ 3:05 am

    Great idea. Two problems

    1 I continue got the message:
    Warning: mkdir() [function.mkdir]: Permission denied in {system_path}/modules/freo_addon_installer/mod.freo_addon_installer.php on line 66

    I did change all the rights by hand (user apache, group apache, 755) but the message still appears.

    2 The message The URL was not a valid .zip or .php file. Please check it and try again.

    Both with url but also when i want to upload the zip and install.

    EE 1.68 en safe_mod is off

  13. Phil Freo said,

    October 17, 2009 @ 12:14 pm

    @Marcel,
    It looks like PHP is having problems creating a subfolder in system/cache. When you setup EE initially, EE/PHP/Apache should be given permissions to that folder (and subfolders). Try setting that folder to 755 or 777 and see if that fixes the problem.

  14. Phil Freo said,

    October 25, 2009 @ 12:18 pm

    Version 1.2 was just released which fixed bugs that some people may have experienced.

  15. Marcel said,

    November 7, 2009 @ 8:00 am

    Hi Phil,

    Thanks. The error disappeared, now I’ve got a new one:

    Warning: exec() has been disabled for security reasons in /home/httpd/vhosts/…/modules/freo_addon_installer/mod.freo_addon_installer.php on line 416

    Warning: exec() has been disabled for security reasons in /home/httpd/vhosts/…/modules/freo_addon_installer/mod.freo_addon_installer.php on line 165

    Is this what you ment with shared servers?

    Marcel

  16. Phil Freo said,

    November 7, 2009 @ 9:05 am

    @Marcel, yes that’s frequently a function that shared hosts disable. You can ask your host to enable it but usually you can only do that in VPS or dedicated servers.

RSS feed for comments on this post