[pLog-svn] r2645 - in plugins/trunk/templateeditor: . class/view
mark at devel.lifetype.net
mark at devel.lifetype.net
Sun Nov 27 10:39:20 GMT 2005
Author: mark
Date: 2005-11-27 10:39:19 +0000 (Sun, 27 Nov 2005)
New Revision: 2645
Modified:
plugins/trunk/templateeditor/class/view/pluginblogeditsubfoldertemplatefileview.class.php
plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php
plugins/trunk/templateeditor/class/view/pluginblogtemplateslistview.class.php
plugins/trunk/templateeditor/class/view/pluginblogtemplatesubfolderlistview.class.php
plugins/trunk/templateeditor/class/view/pluginsiteeditsubfoldertemplatefileview.class.php
plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php
plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php
plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php
plugins/trunk/templateeditor/class/view/plugintemplateeditorconfigview.class.php
plugins/trunk/templateeditor/plugintemplateeditor.class.php
plugins/trunk/templateeditor/readme.txt
Log:
1.3 2005/11/27
Fix Image URL bugs
Add default extension to isValidExtension
Add two new constants, MAX_BACKUP_FILES and EDITABLE_EXTENSION
Modified: plugins/trunk/templateeditor/class/view/pluginblogeditsubfoldertemplatefileview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginblogeditsubfoldertemplatefileview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginblogeditsubfoldertemplatefileview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -28,7 +28,7 @@
{
$config =& Config::getConfig();
$maxBackupFiles = $config->getValue( "plugin_templateeditor_maxbackupfiles" );
- if ($maxBackupFiles == "") $maxBackupFiles = 5;
+ if ($maxBackupFiles == "") $maxBackupFiles = MAX_BACKUP_FILES;
// get a list with all the specific template files
$ts = new TemplateSetStorage();
Modified: plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginblogedittemplatefileview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -26,7 +26,7 @@
{
$config =& Config::getConfig();
$maxBackupFiles = $config->getValue( "plugin_templateeditor_maxbackupfiles" );
- if ($maxBackupFiles == "") $maxBackupFiles = 5;
+ if ($maxBackupFiles == "") $maxBackupFiles = MAX_BACKUP_FILES;
// get a list with all the specific template files
$ts = new TemplateSetStorage();
Modified: plugins/trunk/templateeditor/class/view/pluginblogtemplateslistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginblogtemplateslistview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginblogtemplateslistview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -51,7 +51,7 @@
$tmp['size'] = filesize($file);
$tmp['isEditable'] = $this->isValidExtension( $tmp['name'] );
$tmp['isImage'] = $this->isImage( $tmp['name'] );
- $tmp['url'] = $file;
+ $tmp['url'] = "/".$file;
array_push ($templateFiles, $tmp);
}
}
@@ -76,6 +76,8 @@
{
$config =& Config::getConfig();
$allowedExtension = $config->getValue( "plugin_templateeditor_allowedextension" );
+ if ($allowedExtension == NULL)
+ $allowedExtension = EDITABLE_EXTENSION;
$extensionList = explode(",", $allowedExtension);
$fileExtension = array_pop(explode('.', $name));
foreach ($extensionList as $extension) {
Modified: plugins/trunk/templateeditor/class/view/pluginblogtemplatesubfolderlistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginblogtemplatesubfolderlistview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginblogtemplatesubfolderlistview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -52,7 +52,7 @@
$tmp['size'] = filesize($file);
$tmp['isEditable'] = $this->isValidExtension( $tmp['name'] );
$tmp['isImage'] = $this->isImage( $tmp['name'] );
- $tmp['url'] = $file;
+ $tmp['url'] = "/".$file;
array_push ($templateFiles, $tmp);
}
}
@@ -63,6 +63,8 @@
{
$config =& Config::getConfig();
$allowedExtension = $config->getValue( "plugin_templateeditor_allowedextension" );
+ if ($allowedExtension == NULL)
+ $allowedExtension = EDITABLE_EXTENSION;
$extensionList = explode(",", $allowedExtension);
$fileExtension = array_pop(explode('.', $name));
foreach ($extensionList as $extension) {
Modified: plugins/trunk/templateeditor/class/view/pluginsiteeditsubfoldertemplatefileview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsiteeditsubfoldertemplatefileview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginsiteeditsubfoldertemplatefileview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -28,7 +28,7 @@
{
$config =& Config::getConfig();
$maxBackupFiles = $config->getValue( "plugin_templateeditor_maxbackupfiles" );
- if ($maxBackupFiles == "") $maxBackupFiles = 5;
+ if ($maxBackupFiles == "") $maxBackupFiles = MAX_BACKUP_FILES;
// get a list with all the specific template files
$ts = new TemplateSetStorage();
Modified: plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginsiteedittemplatefileview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -26,7 +26,7 @@
{
$config =& Config::getConfig();
$maxBackupFiles = $config->getValue( "plugin_templateeditor_maxbackupfiles" );
- if ($maxBackupFiles == "") $maxBackupFiles = 5;
+ if ($maxBackupFiles == "") $maxBackupFiles = MAX_BACKUP_FILES;
// get a list with all the specific template files
$ts = new TemplateSetStorage();
Modified: plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginsitetemplateslistview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -56,7 +56,7 @@
$tmp['size'] = filesize($file);
$tmp['isEditable'] = $this->isValidExtension( $tmp['name'] );
$tmp['isImage'] = $this->isImage( $tmp['name'] );
- $tmp['url'] = $file;
+ $tmp['url'] = "/".$file;
array_push ($templateFiles, $tmp);
}
}
@@ -81,6 +81,8 @@
{
$config =& Config::getConfig();
$allowedExtension = $config->getValue( "plugin_templateeditor_allowedextension" );
+ if ($allowedExtension == NULL)
+ $allowedExtension = EDITABLE_EXTENSION;
$extensionList = explode(",", $allowedExtension);
$fileExtension = array_pop(explode('.', $name));
foreach ($extensionList as $extension) {
Modified: plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/pluginsitetemplatesubfolderlistview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -57,7 +57,7 @@
$tmp['size'] = filesize($file);
$tmp['isEditable'] = $this->isValidExtension( $tmp['name'] );
$tmp['isImage'] = $this->isImage( $tmp['name'] );
- $tmp['url'] = $file;
+ $tmp['url'] = "/".$file;
array_push ($templateFiles, $tmp);
}
}
@@ -68,6 +68,8 @@
{
$config =& Config::getConfig();
$allowedExtension = $config->getValue( "plugin_templateeditor_allowedextension" );
+ if ($allowedExtension == NULL)
+ $allowedExtension = EDITABLE_EXTENSION;
$extensionList = explode(",", $allowedExtension);
$fileExtension = array_pop(explode('.', $name));
foreach ($extensionList as $extension) {
Modified: plugins/trunk/templateeditor/class/view/plugintemplateeditorconfigview.class.php
===================================================================
--- plugins/trunk/templateeditor/class/view/plugintemplateeditorconfigview.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/class/view/plugintemplateeditorconfigview.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -19,9 +19,9 @@
$config =& Config::getConfig();
$pluginEnabled = $config->getValue( "plugin_templateeditor_enabled" );
$maxBackupFiles = $config->getValue( "plugin_templateeditor_maxbackupfiles" );
- if ($maxBackupFiles == "") $maxBackupFiles = 5;
+ if ($maxBackupFiles == "") $maxBackupFiles = MAX_BACKUP_FILES;
$allowedExtension = $config->getValue( "plugin_templateeditor_allowedextension" );
- if ($allowedExtension == "") $allowedExtension = "css,inc,template,txt";
+ if ($allowedExtension == "") $allowedExtension = EDITABLE_EXTENSION;
// create a view and export the settings to the template
$this->setValue( "pluginEnabled", $pluginEnabled );
Modified: plugins/trunk/templateeditor/plugintemplateeditor.class.php
===================================================================
--- plugins/trunk/templateeditor/plugintemplateeditor.class.php 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/plugintemplateeditor.class.php 2005-11-27 10:39:19 UTC (rev 2645)
@@ -1,6 +1,9 @@
<?php
include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
+
+ define( MAX_BACKUP_FILES, 5);
+ define( EDITABLE_EXTENSION, "css,inc,template,txt" );
class PluginTemplateEditor extends PluginBase
{
Modified: plugins/trunk/templateeditor/readme.txt
===================================================================
--- plugins/trunk/templateeditor/readme.txt 2005-11-26 19:42:10 UTC (rev 2644)
+++ plugins/trunk/templateeditor/readme.txt 2005-11-27 10:39:19 UTC (rev 2645)
@@ -1,7 +1,7 @@
Plugin: Template Editor
Author: Mark Wu
-Release Date: 2005/05/31
-Version: 1.2
+Release Date: 2005/11/27
+Version: 1.3
The plugins offers complete template editor capabilities for pLog. It includes the following features.
1. Template Sets Browser
@@ -11,6 +11,10 @@
History
+1.3 2005/11/27
+ Fix Image URL bugs
+ Add default extension to isValidExtension
+ Add two new constants, MAX_BACKUP_FILES and EDITABLE_EXTENSION
1.2 2005/05/31
Add TemplateSet Downloadd function, now user can easily backup/share thier template
Add rss & summary template set to site template editor, now site admin can edit the template on the fly.
More information about the pLog-svn
mailing list