Geeklog Theme Editor Plugin [v1.0.3]
by mystral-kk [geeklog@mystral-kk.net]
Nov 7, 2006
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
Date | Version | Description |
Nov 7, 2006 | 1.0.3 | [Fix] 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, 2006 | 1.0.2 | [Fix] Dealed with the case where magic_quotes_gpc is on (Thanks, samstone). |
Oct 1, 2006 | 1.0.0 | Initial version |
Thanks!
- Geeklog.jp members for useful suggestions
- Geeklog Core Team for developing and maintaining Geeklog, the Ultimate CMS
Install instruction for the Geeklog Theme Editor plugin
In the following descriptions
- <geeklog_dir> is the directory where the system config.php file resides
- <admin> is the directory where the administration files reside (usually, under <public_html>)
- 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.
- Uncompress the themedit plugin archive while in the <geeklog_dir>/plugins directory. The archive will create a directory called themedit in the plugins directory.
- Create the admin directory. Under your <admin>/plugins/ directory create a directory called themedit.
- 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.
- 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.
- 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.
- 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.
- [***** 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.
- [***** 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
- Run the install.php page in your <admin>/plugins/themedit directory. This will remove all the data from your database.
- Delete the two plugin directories created in the install process: <geeklog-dir>/plugins/themedit/ and <admin>/plugins/themedit/
- [***** 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.
Configuring The Plugin
In the plugin's config.php, you can modify these values:
Name | Type | Description |
$_THM_CONF['allowed_themes'] |
Array of theme names |
The theme names (case-sensitive) you can edit with the plugin. The default value is 'professional'. |
$_THM_CONF['allowed_files'] |
Array of file names |
The file names (case-sensitive) you can edit with the plugin. Template files (*.thtml) and cascading style sheet files (*.css) are supported. |
$_THM_CONF['resync_database'] |
one of 'auto', 'manual', 'ignore' |
When you add/remove a theme to/from $_THM_CONF['allowed_themes'] , or a template file to/from $_THM_CONF['allowed_files'] , The Theme Editor plugin will detect it automatically.
- 'auto' -- the plugin will update the data stored in databse automatically.
- 'manual' -- the plugin will display the information and 'UPDATE database' button.
- 'igonore' -- the plugin will do nothing about the change.
|
Upgrading The Plugin
Usage
The Theme Editor plugin is so simple that you can use it almost intuitively.
- Choose a theme you want to edit at a dropdown menu.
- Choose a file you want to edit at a dropdown menu.
- A list of template vars available in the current file will be displayed.
- 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.
- When you hit the "Preview" button, the current content will be previewed in another page.
- When you hit the "Save" button, the current content will be saved on the Web.
- 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.
License
The Theme Editor plugin is licensed under the GPL.
Copyright © 2006 mystral-kk