Addon-File-Editor: Addon for CMS WebsiteBaker

The addon-file-editor (consecutively abbreviated AFE ) enables you to view , edit , delete , create , upload , unzip or backup files of installed Add-ons such as modules , templates or languages from the CMS WebsiteBaker backend. AFE allows you to create installation packages of installed Add-ons, ready for installation in WebsiteBaker - handy for distribution or backup purposes.

The optional FTP layer implemented in AFE , allows you to modify Add-on files normally owned by the ftp-user . This might be usefull if your website is hosted on a shared hosting provider using different pemissions for PHP and FTP groups. Another optional feature is the support for the 3rd party online photo editing service Pixlr , which allows you to modifiy images of Add-ons in a Photoshop™ like environment from the WebsiteBaker backend.

Download

You can download an archive of the latest development branch of the addon-file-editor module using GitHubs ZIP button . The archives of previous module releases can be found in GitHubs Tags section . The development history is tracked via GitHub .

Please note: The archives downloaded from GitHub are not ready for installation in WebsiteBaker , as SVN includes the archive subfolder. To create a working WebsiteBaker installation archive, unpack the downloaded archive on your local computer and zip the contents of the folder AddonFileEditor (without the folder itself).

License

addon-file-editor is licensed under the GNU General Public License (GPL) v3.0 .

Requirements

The minimum requirements to get AFE running on your WebsiteBaker installation are as follows:

Installation

  1. download archive from Addon reposirity
  2. unpack the archive on your local computer
  3. zip the contents of the folder addon-file-editor (without the folder itself)
  4. install the newly zipped archive via the WebsiteBaker installer
  5. go to the Admin-Tools section and click the addon-file-editor tool link

Usage

Overview Panel

Once AFE is installed, visit the Admin-Tools section of your WebsiteBaker backend and click on the AFE admin tool link. This brings you to the AFE overview panel.

The AFE overview panel lists all installed Add-ons of your WebsiteBaker installation. The Add-ons are grouped into the sections Modules , Templates and Languages . You can expand/collaps groups to show only the Add-ons you are interested in, providing you have JavaScript enabled in your browser. The toggle status of the groups is stored in a Cookie and will be remembered during the lifetime of this Cookie.

When a group is expanded, all installed Add-ons of this group are shown in a list view. A download icon is shown at the right side of each Add-on entry. A click on this icon creates an installation package of this Add-on on the fly. Use this option to create a backup of an Add-on BEFORE you modify it, so you can revert back to the original version in case you mess up something.

To browse the files and folders of a specific Add-on in the AFE file manager, click on the Add-on name you are interested in and you will be redirected to the AFE file manager.

File Manager

The file manager shows the files and folders of the selected Add-on.

The name of the Add-On you are currently editing (1) is displayed just above the filemanager. The path to the actual Add-On (2) relative to the WebsiteBaker root folder is shown at the top of the filemanager. Per default, only files with recognized file extensions are displayed (3) (text, images, archives). You can add/remove file extension via AFE configuration file code/config.php (5). Details about AFEs configuration settings are shown in section AFE Configuration Settings .

To edit a text file, or to view an image in the browser, just click on it´s file name. To rename or delete files, click one the action icons (4) on the right site of the file manager. You can create new files/folders or upload a file via the action links at the top of the file manager (4). The [Reload] option forces to read in all files and folders again. Use this option if you have installed a new Addon via the WebsiteBaker backend and it doesn´t show up in AFE .

Online Image Editing

Clicking the edit icon shown in the action group (4) for image files transfers the image to the online image editor service of Pixlr . The online service Pixlr allows you to edit images in a Photoshop™ like environment from your browser. Using the save dialogue in Pixlr copies the modified image as image_name.pixlr.png|jpg to the actual Add-on folder on your webspace. The original image remains untouched on your server. If you are happy with the image changes made, delete the original image and rename the modified image. Keep in mind that your image is uploaded to the pixlr.com server. So please read the Pixlr FAQ and Terms & Service before using this service. You can disable this service via the AFE configuration file code/config.php .

Note: Your browser requires a Flash™ plugin in order to use the online image service from Pixlr .

Unzip Archive Files

Clicking the unzip icon shown in the action icons group (4) for *.zip files allows you to unzip the archive to the actual folder on your server. This allows you to create nested folder structures and/or multiple files from an existing *.zip archive with ease. The *.zip folder structure is taken over. All files contained in the target exraction folder older than the corresponding file in the archive will be replaced without further notice.

Configuration Settings

You can modify the default settings of AFE via the configuration file code/config.php (5) found in the AddonFileEditor module folder.

You can add/remove file exentison to the recognized file types for text , image , and archives . The default settings are as follows:

      
        $text_extensions = array('txt', 'htm', 'html', 'htt', 'tmpl', 'tpl', 'xml', 'css', 'js', 'php', 'php3', 'php4', 'php5', 'jquery', 'preset' ); $image_extensions = array('bmp', 'gif', 'jpg', 'jpeg', 'png');
        $archive_extensions = array('zip', 'rar', 'tar', 'gz');
      
      

Files with extensions not listed above are hidden in the AFE file manager by default. To change this behaviour, set $show_all_files = true; .

You can remove Add-ons from beeing listed in the AFE file manager if you want. To remove the AddonFileEditor and the English language file from the AFE file manager, set $hidden_addons = array(‘AddonFileEditor’, ‘en’); (all lower case).

Per default, the allowed file size for uploads is limited to 2 MB ( $max_upload_size = 2 ). Pixlr support ( $pixlr_support = true ) and unzip archive support ( $unzip_archive_support = true ) are enabled per default.

FTP Configuration Settings

AFE implements an optional FTP layer, wich is disabled by default. You can activate this feature if required. The AFE file manager detects and highlights files which can’t be modified by PHP in a red color. If you see Add-ons or Add-on files highlighted in red, enable the FTP layer to modify these files via FTP. The FTP layer can be configured by visiting the URL: http://yourdomain.com/modules/AddonFileEditor/code/ftp_assistant.php .

Update yourdomain.com to fit to your domain. The URL to the FTP assistant can only be called by users/groups with permission to the WebsiteBaker Admin tools section. The FTP assistant allows you to test the FTP connection to your server, once the required FTP login information where provided. The FTP login information are stored in the AFE database and will be removed when you uninstall AFE .

Known Issues

You can track the status of known issues or report new issues found in AFE via GitHubs issue tracking service . If you run into any issues with AFE , please visit this page first and check if this issue is already known.

Note: The 3rd party package editarea distributed with WebsiteBaker has some bugs when used in Internet Explorer 8/9. Editarea is used by AFE and the WebsiteBaker code module to highlight and modify code. If you have issues to view/edit Add-on files in AFE , please visit the editarea browser compatibility list and check if your browser is supported by editarea. If your browser is not supported, please use a supported browser (e.g. Firefox) if you want to have syntax highlighting in WebsiteBaker working - sorry for that.

Security

With great power comes great responsibility. It is recommended to limit access to AFE to those groups and users you really trust. Users with access to WebsiteBaker modules code2 , droplets or AFE can add/execute any PHP code they like on your webspace and/or manipulate the WB-Database.

Also keep in mind that AFE ships with an optional FTP-Layer. If you use this feature, your FTP-settings are stored as plain text in the WebsiteBaker database. If a hacker gets access to your WebsiteBaker database, he can extract your FTP login data.

If in doubt, just install AFE temporary for the time needed and uninstall the tool afterwards via the WebsiteBaker backend.

Questions

If you have questions or issues with AFE , please visit the WebsiteBaker-Forum and ask for feedback.

Always provide the following information with your support request: