Geeklog Theme Editor Plugin [v1.2.0]

by mystral-kk [geeklog@mystral-kk.net]
Nov 6, 2011

Table of Contents

Description

The Theme Editor is an online theme editor which allows you to edit template files (*.thtml) and cascading style sheet file (*.css). With this plugin, you can edit Geeklog themes on the Web, without uploading theme files.

Version History

DateVersionDescription
Nov 6, 20111.2.0New Implemented auto-install feature introduced in Geeklog-1.6.
Jul 4, 20101.1.5Fix Fixed the wrong <meta> tag and <br> tags.
Nov 4, 20091.1.4Fix Fixed an error when you choose a language other than English or Japanese.
Sep 26, 20081.1.3Fix Upgraded to prevent include-files to be directly accessed in some case-insensitive file systems (e.g. MS Windows).
Sep 14, 20081.1.2Fix Upgraded to work well with PHP-4.x by not using htmlentities() and html_entity_decode() functions.
Aug 18, 20081.1.1Fix Upgraded to properly work with DokuWiki plugin.
Aug 11, 20081.1.0New Upgraded to properly work with Geeklog-1.5.0 as well.
New Upgraded to use Config UI with GL-1.5.0.
Mar 29, 20071.0.5Fix Modified to properly handle a path containing an apostrophe.
New Added a new option to make all themes available automatically. (See Configuring the plugin below.)
New Added a new option to make all theme-related files (*.thtml, *.css) available automatically. (See Configuring the plugin below.)
Dec 21, 20061.0.4New Added a functionality of uploading images to the images directory under each theme directory
New Changed file name dropdown list so that the purposes of the files, instead of file names themselves, will appear.
Nov 7, 20061.0.3Fix Dealed with the case where default language is not Japanese (Thanks, Kemal and Tsuchi).
New Added many more template file names(Thanks, Ivy).
Nov 2, 20061.0.2Fix Dealed with the case where magic_quotes_gpc is on (Thanks, samstone).
Oct 1, 20061.0.0Initial version

Thanks!

Install instruction for the Geeklog Theme Editor plugin

In the following descriptions

  1. Back up your Geeklog Database. The themedit plugin adds tables to your Geeklog database. You can do this with the built in admin backup facility.
  2. Uncompress the themedit plugin archive while in the <geeklog_dir>/plugins directory. The archive will create a directory called themedit in the plugins directory.
  3. Create the admin directory. Under your <admin>/plugins/ directory create a directory called themedit.
  4. Change to your <geeklog_dir>/plugins/themedit/ directory. Copy the files in the admin directory to the <admin>/plugins/themedit/ directory your created in step 3.
  5. Edit the config.php in the themedit directory and confirm the table prefix (the same as Geeklog table prefix by default) and modify the names of themes and files you would like to edit with the Theme Editor plugin.
  6. Log in to your Geeklog as a root user and run install.php in your <admin>/plugins/themedit/ directory. The install page will tell you if the install was successful or not. If not, examine Geeklog system errorlog for possible problems. The themedit plugin should now be installed and functioning. Clicking on the themedit Icon will take you to the admin page.
  7. Set up security. On install only the root users have access to themedit administration. You can delegate control for the functions through the user and group editors.
  8. [***** EXTRA STEP 1 FOR THEME EDITOR PLUGIN *****] Change the permissions of the directories where *.thtml files resides to 757. Change the permissions of the *.thtml files to 646.
  9. [***** EXTRA STEP 2 FOR THEME EDITOR PLUGIN *****] Change the permissions of the files preview.html and preview.css, which reside in the <admin>/plugins/themedit/ directory, to 646.

NOTE: The Theme Editor plugin uses JavaScript a lot. For better functionality, it is strongly recommended that you enable JavaScript.

Uninstall instruction for the Geeklog Theme Editor plugin

  1. Run the install.php page in your <admin>/plugins/themedit directory. This will remove all the data from your database.
  2. Delete the two plugin directories created in the install process: <geeklog-dir>/plugins/themedit/ and <admin>/plugins/themedit/
  3. [***** EXTRA STEP FOR THEME EDITOR PLUGIN *****] Restore the permissions of the directories and files you changed during the installation. For example, change the permissions of the directories to 755 and those of the files to 644.

Upgrading The Plugin

First, after you download and unpack a new archive, upload all the files to the Web server. Then, log in as admin and go to the Plugin Editor. Click the edit icon and click "upgrade" button.

Usage

The Theme Editor plugin is so simple that you can use it almost intuitively.

  1. Choose a theme you want to edit at a dropdown menu.
    NOTE: theme names you can choose from are defined as the $_THM_CONF['allowed_themes'] array in config.php. Please edit it as you like.
  2. Choose a file you want to edit at a dropdown menu.
    NOTE: file names you can choose from are defined as the $_THM_CONF['allowed_files'] array in config.php. Please edit it as you like.
  3. A list of template vars available in the current file will be displayed.
  4. When you hit one of the buttons with a template var name on it, the corresponding tag will be inserted into the caret position.
    NOTE: you have to enable JavaScript to use these buttons.
  5. When you hit the "Preview" button, the current content will be previewed in another page.
  6. When you hit the "Save" button, the current content will be saved on the Web.
  7. When you hit the "Initialize" button, the content of the file will be reverted to what it used to be when you installed the Theme Editor plugin.
  8. When you hit the "Image" button, a simple image browser will be displayed. Supported file types are 'jpg', 'jpeg', 'png', and 'gif'. In the screen, you can choose a theme and a directory from dropdown lists. When you want to upload an image file to the current directory, hit the 'Browse...' button and select an image file to upload and then hit the 'Upload' button. If you want to delete an image file(s), check all the files you'd like to and hit the 'Delete' button. The deleting process will be carried out WITHOUT CONFIRMATION, so be very careful! There is no undoing it.

License

The Theme Editor plugin is licensed under the GPLv2 or later.