[pLog-svn] r6158 - in plugins/branches/lifetype-1.2/extrafields: . class class/action class/view locale templates
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Fri Jan 11 07:59:30 EST 2008
Author: jondaley
Date: 2008-01-11 07:59:30 -0500 (Fri, 11 Jan 2008)
New Revision: 6158
Added:
plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsconfigaction.class.php
plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsupdateconfigaction.class.php
plugins/branches/lifetype-1.2/extrafields/class/view/pluginextrafieldsconfigview.class.php
plugins/branches/lifetype-1.2/extrafields/pluginextrafields.class.php
plugins/branches/lifetype-1.2/extrafields/templates/config.template
Removed:
plugins/branches/lifetype-1.2/extrafields/backgrounds/
plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageconfigaction.class.php
plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageshowaction.class.php
plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageupdateconfigaction.class.php
plugins/branches/lifetype-1.2/extrafields/class/authimage/
plugins/branches/lifetype-1.2/extrafields/class/security/
plugins/branches/lifetype-1.2/extrafields/class/view/pluginauthimageconfigview.class.php
plugins/branches/lifetype-1.2/extrafields/locale/locale_de_DE.php
plugins/branches/lifetype-1.2/extrafields/locale/locale_es_ES.php
plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_CN.php
plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_TW.php
plugins/branches/lifetype-1.2/extrafields/pluginauthimage.class.php
plugins/branches/lifetype-1.2/extrafields/templates/authimage.template
plugins/branches/lifetype-1.2/extrafields/templates/authimageshow.template
Modified:
plugins/branches/lifetype-1.2/extrafields/locale/locale_en_UK.php
plugins/branches/lifetype-1.2/extrafields/readme.txt
Log:
remove lots of stuff for this simple plugin
Deleted: plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageconfigaction.class.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageconfigaction.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,28 +0,0 @@
-<?php
-
- lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
- lt_include( PLOG_CLASS_PATH."plugins/authimage/class/view/pluginauthimageconfigview.class.php" );
-
- /**
- * shows a form with the current configuration
- */
- class PluginAuthImageConfigAction extends AdminAction
- {
-
- function PluginAuthImageConfigAction( $actionInfo, $request )
- {
- $this->AdminAction( $actionInfo, $request );
-
- $this->requirePermission( "manage_plugins" );
- }
-
- function perform()
- {
- $this->_view = new PluginAuthImageConfigView( $this->_blogInfo );
-
- $this->setCommonData();
-
- return true;
- }
- }
-?>
\ No newline at end of file
Deleted: plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageshowaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageshowaction.class.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageshowaction.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,27 +0,0 @@
-<?php
-
- lt_include( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
- lt_include( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php");
-
- /**
- * shows a flickr template without smarty cache
- */
- class PluginAuthImageShowAction extends BlogAction
- {
-
- function PluginAuthImageShowAction( $actionInfo, $request )
- {
- $this->BlogAction( $actionInfo, $request );
- }
-
- function perform()
- {
- $this->_view = new PluginTemplatedView( $this->_blogInfo, "authimage", "authimageshow", SMARTY_VIEW_CACHE_DISABLED );
- $this->_view->setValue( "request", $this->_request );
- // add all the common information to the view
- $this->setCommonData();
-
- return true;
- }
- }
-?>
\ No newline at end of file
Deleted: plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageupdateconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageupdateconfigaction.class.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageupdateconfigaction.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,94 +0,0 @@
-<?php
-
- lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
- lt_include( PLOG_CLASS_PATH."plugins/authimage/class/view/pluginauthimageconfigview.class.php" );
-
-
- /**
- * updates the plugin configuration
- */
- class PluginAuthImageUpdateConfigAction extends AdminAction
- {
- var $_pluginEnabled;
- var $_length;
- var $_key;
- var $_expiredTime;
- var $_default;
-
- function PluginAuthImageUpdateConfigAction( $actionInfo, $request )
- {
- $this->AdminAction( $actionInfo, $request );
-
- $this->requirePermission( "manage_plugins" );
- }
-
- function validate()
- {
- $this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
- $this->_pluginEnabled = ($this->_pluginEnabled != "" );
- $this->_length = $this->_request->getValue( "length" );
- if( $this->_length <= 0 || $this->_length > 6 || !ctype_digit($this->_length)) {
- $this->_view = new PluginAuthImageConfigView( $this->_blogInfo );
- $this->_view->setErrorMessage( $this->_locale->tr("authimage_error_length"));
- $this->setCommonData();
-
- return false;
- }
- $this->_key = $this->_request->getValue( "key" );
- if( $this->_key == "" ) {
- $this->_view = new PluginAuthImageConfigView( $this->_blogInfo );
- $this->_view->setErrorMessage( $this->_locale->tr("authimage_error_key"));
- $this->setCommonData();
-
- return false;
- }
- $this->_expiredTime = $this->_request->getValue( "expiredTime" );
- if( $this->_expiredTime < 0 || $this->_expiredTime > 86400 || !ctype_digit($this->_expiredTime) ) {
- $this->_view = new PluginAuthImageConfigView( $this->_blogInfo );
- $this->_view->setErrorMessage( $this->_locale->tr("authimage_error_expiredtime"));
- $this->setCommonData();
-
- return false;
- }
- $this->_default = $this->_request->getValue( "default" );
-
- return true;
- }
-
- function perform()
- {
- // // update the plugin configurations to blog setting
- $blogSettings = $this->_blogInfo->getSettings();
- $blogSettings->setValue( "plugin_authimage_enabled", $this->_pluginEnabled );
- $blogSettings->setValue( "plugin_authimage_length", $this->_length );
- $blogSettings->setValue( "plugin_authimage_key", $this->_key );
- $blogSettings->setValue( "plugin_authimage_expiredtime", $this->_expiredTime );
- $blogSettings->setValue( "plugin_authimage_default", $this->_default );
- $this->_blogInfo->setSettings( $blogSettings );
-
- // save the blogs settings
- $blogs = new Blogs();
- if( !$blogs->updateBlog( $this->_blogInfo )) {
- $this->_view = new PluginAuthImageConfigView( $this->_blogInfo );
- $this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
- $this->setCommonData();
-
- return false;
- }
-
- // if everything went ok...
- $this->_blogInfo->setSettings( $blogSettings );
- $this->_session->setValue( "blogInfo", $this->_blogInfo );
- $this->saveSession();
-
- $this->_view = new PluginAuthImageConfigView( $this->_blogInfo );
- $this->_view->setSuccessMessage( $this->_locale->tr("authimage_settings_saved_ok"));
- $this->setCommonData();
-
- // clear the cache
- CacheControl::resetBlogCache( $this->_blogInfo->getId());
-
- return true;
- }
- }
-?>
\ No newline at end of file
Copied: plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsconfigaction.class.php (from rev 6157, plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageconfigaction.class.php)
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsconfigaction.class.php (rev 0)
+++ plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsconfigaction.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -0,0 +1,28 @@
+<?php
+
+ lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+ lt_include( PLOG_CLASS_PATH."plugins/extrafields/class/view/pluginauthimageconfigview.class.php" );
+
+ /**
+ * shows a form with the current configuration
+ */
+ class PluginExtraFieldsConfigAction extends AdminAction
+ {
+
+ function PluginExtraFieldsConfigAction( $actionInfo, $request )
+ {
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requirePermission( "manage_plugins" );
+ }
+
+ function perform()
+ {
+ $this->_view = new PluginExtraFieldsConfigView( $this->_blogInfo );
+
+ $this->setCommonData();
+
+ return true;
+ }
+ }
+?>
\ No newline at end of file
Copied: plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsupdateconfigaction.class.php (from rev 6157, plugins/branches/lifetype-1.2/extrafields/class/action/pluginauthimageupdateconfigaction.class.php)
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsupdateconfigaction.class.php (rev 0)
+++ plugins/branches/lifetype-1.2/extrafields/class/action/pluginextrafieldsupdateconfigaction.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -0,0 +1,59 @@
+<?php
+
+ lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+ lt_include( PLOG_CLASS_PATH."plugins/extrafields/class/view/pluginextrafieldsconfigview.class.php" );
+
+
+ /**
+ * updates the plugin configuration
+ */
+ class PluginExtraFieldsUpdateConfigAction extends AdminAction
+ {
+ var $_value;
+
+ function PluginExtraFieldsUpdateConfigAction( $actionInfo, $request )
+ {
+ $this->AdminAction( $actionInfo, $request );
+
+ $this->requirePermission( "manage_plugins" );
+ }
+
+ function validate()
+ {
+ $this->_value = $this->_request->getValue( "extrafields_value" );
+ return true;
+ }
+
+ function perform()
+ {
+ // // update the plugin configurations to blog setting
+ $blogSettings = $this->_blogInfo->getSettings();
+ $blogSettings->setValue( "plugin_extrafields_value", $this->_value );
+ $this->_blogInfo->setSettings( $blogSettings );
+
+ // save the blogs settings
+ $blogs = new Blogs();
+ if( !$blogs->updateBlog( $this->_blogInfo )) {
+ $this->_view = new PluginExtraFieldsConfigView( $this->_blogInfo );
+ $this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
+ $this->setCommonData();
+
+ return false;
+ }
+
+ // if everything went ok...
+ $this->_blogInfo->setSettings( $blogSettings );
+ $this->_session->setValue( "blogInfo", $this->_blogInfo );
+ $this->saveSession();
+
+ $this->_view = new PluginExtraFieldsConfigView( $this->_blogInfo );
+ $this->_view->setSuccessMessage( $this->_locale->tr("blog_settings_saved_ok"));
+ $this->setCommonData();
+
+ // clear the cache
+ CacheControl::resetBlogCache( $this->_blogInfo->getId());
+
+ return true;
+ }
+ }
+?>
\ No newline at end of file
Deleted: plugins/branches/lifetype-1.2/extrafields/class/view/pluginauthimageconfigview.class.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/class/view/pluginauthimageconfigview.class.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/class/view/pluginauthimageconfigview.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,43 +0,0 @@
-<?php
-
- lt_include( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
- lt_include( PLOG_CLASS_PATH."plugins/authimage/class/authimage/authimage.class.php" );
-
- /**
- * implements the main view of the feed reader plugin
- */
- class PluginAuthImageConfigView extends AdminPluginTemplatedView
- {
-
- function PluginAuthImageConfigView( $blogInfo )
- {
- $this->AdminPluginTemplatedView( $blogInfo, "authimage", "authimage" );
- }
-
- function render()
- {
- $blogSettings = $this->_blogInfo->getSettings();
- $pluginEnabled = $blogSettings->getValue( "plugin_authimage_enabled" );
- $length = $blogSettings->getValue( "plugin_authimage_length" );
- if ($length == "") $length = 6;
- $key = $blogSettings->getValue( "plugin_authimage_key" );
- if ($key == "") $key = "LifeType";
- $expiredTime = $blogSettings->getValue( "plugin_authimage_expiredtime" );
- if ($expiredTime == "") $expiredTime = 3600;
- $default = $blogSettings->getValue( "plugin_authimage_default" );
- if ($default == "") $default = "marble.gif";
-
- $backgrounds = AuthImage::scanBackgoundImages();
-
- // create a view and export the settings to the template
- $this->setValue( "pluginEnabled", $pluginEnabled );
- $this->setValue( "length", $length );
- $this->setValue( "key", $key );
- $this->setValue( "expiredTime", $expiredTime );
- $this->setValue( "default", $default );
- $this->setValue( "backgrounds", $backgrounds );
-
- parent::render();
- }
- }
-?>
Copied: plugins/branches/lifetype-1.2/extrafields/class/view/pluginextrafieldsconfigview.class.php (from rev 6157, plugins/branches/lifetype-1.2/extrafields/class/view/pluginauthimageconfigview.class.php)
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/class/view/pluginextrafieldsconfigview.class.php (rev 0)
+++ plugins/branches/lifetype-1.2/extrafields/class/view/pluginextrafieldsconfigview.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -0,0 +1,23 @@
+<?php
+
+ lt_include( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+
+ class PluginExtraFieldsConfigView extends AdminPluginTemplatedView
+ {
+
+ function PluginExtraFieldsConfigView( $blogInfo )
+ {
+ $this->AdminPluginTemplatedView( $blogInfo, "extrafields", "extrafields" );
+ }
+
+ function render()
+ {
+ $blogSettings = $this->_blogInfo->getSettings();
+ $value = $blogSettings->getValue( "plugin_extrafields_value" );
+
+ $this->setValue( "extrafieldvalue", $value );
+
+ parent::render();
+ }
+ }
+?>
Deleted: plugins/branches/lifetype-1.2/extrafields/locale/locale_de_DE.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/locale/locale_de_DE.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/locale/locale_de_DE.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,29 +0,0 @@
-<?php
-$messages["manageAntiSpamPlugins"] = "Anti Spam Management";
-$messages["AuthImage"] = "AuthImage";
-$messages["authimage_code"] = "Authentifizierung";
-
-$messages["authimage_length"] = "Länge des Authentifizierung-Code";
-$messages["authimage_key"] = "Authentifizierung-Code verschlüsseln mit";
-$messages["authimage_default"] = "Hintergrund";
-$messages["authimage_background_name"] = "Name";
-$messages["authimage_background_image"] = "Image";
-$messages["authimage_plugin_enabled"] = "Dieses Plugin aktivieren";
-$messages["authimage_plugin"] = "AuthImage Plugin";
-
-$messages["authimage_error_length"] = "Die Schlüssellänge sollte zwischen 1 and 6 liegen";
-$messages["authimage_error_key"] = "Der Authentifizierung-Code Schlüssel darf nicht leer sein!";
-
-$messages["authimage_settings_saved_ok"] = "AuthImage Einstellungen erfolgreich gespeichert!";
-
-$messages["error_you_have_been_blocked"] = "Leider können wir Ihre Anfrage nicht bearbeiten.";
-$messages["error_authimage_code"] = "Der eingegebene Authentifizierung-Code stimmt mit dem dargestellten Code überein. Bitte gehen Sie zurück und überprüfen Sie Ihre Eingabe.";
-
-$messages["label_configuration"] = "Konfiguration";
-$messages["label_enable"] = "Aktivieren";
-$messages["label_length"] = "Länge";
-$messages["label_key"] = "Schlüssel";
-$messages["label_default"] = "Einstellungen";
-
-$messages["authimage_type_code"] = 'Bitte geben Sie den unten eingeblendeten Code ein:';
-?>
Modified: plugins/branches/lifetype-1.2/extrafields/locale/locale_en_UK.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/locale/locale_en_UK.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/locale/locale_en_UK.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,32 +1,6 @@
<?php
-$messages["manageAntiSpamPlugins"] = "Anti Spam Management";
-$messages["AuthImage"] = "AuthImage";
-$messages["authimage_code"] = "Authentication";
-$messages["authimage_length"] = "Authentication Code Length";
-$messages["authimage_key"] = "Authentication Code Encryption Key";
-$messages["authimage_expiredtime"] = "Authentication Code Expired Time";
-$messages["authimage_default"] = "Choose Default AuthImage Background";
-$messages["authimage_background_name"] = "Name";
-$messages["authimage_background_image"] = "Image";
-$messages["authimage_plugin_enabled"] = "Enable this plugin";
-$messages["authimage_plugin"] = "AuthImage Plugin";
-
-$messages["authimage_error_length"] = "Length should be between 1 and 6";
-$messages["authimage_error_key"] = "Encryption Key can not be empty!";
-$messages["authimage_error_expiredtime"] = "The expired time must be >= 0 seconds and <= 86400 seconds (Suggest minimal value is 1800 seconds).";
-
-$messages["authimage_settings_saved_ok"] = "AuthImage settings saved successfully!";
-
-$messages["error_you_have_been_blocked"] = "You are not allowed to proceed with this request.";
-$messages["error_authimage_code"] = "The authentication code is wrong.";
-
$messages["label_configuration"] = "Configuration";
-$messages["label_enable"] = "Enable";
-$messages["label_lengthx"] = "Length";
$messages["label_key"] = "Key";
-$messages["label_expiredtime"] = "Expired Time";
-$messages["label_default"] = "Default";
-$messages["authimage_type_code"] = 'Please type the code you can see here:';
?>
Deleted: plugins/branches/lifetype-1.2/extrafields/locale/locale_es_ES.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/locale/locale_es_ES.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/locale/locale_es_ES.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,36 +0,0 @@
-<?php
-
-// Translation by Andres Bianciotto plog at a-b.com.ar
-// Date 09/Apr/2005
-// Added authimage_html_label for template label translation
-
-$messages["manageAntiSpamPlugins"] = "Anti Spam";
-$messages["AuthImage"] = "AuthImage";
-$messages["authimage_code"] = "Autenticación";
-
-$messages["authimage_html_label"] = "Código de seguridad";
-
-$messages["authimage_length"] = "Longitud del código identificador";
-$messages["authimage_key"] = "Clave de encrpición";
-$messages["authimage_default"] = "Elige un background default";
-$messages["authimage_background_name"] = "Nombre";
-$messages["authimage_background_image"] = "Imagen";
-$messages["authimage_plugin_enabled"] = "Activar este plugin";
-$messages["authimage_plugin"] = "Plugin AuthImage";
-
-$messages["authimage_error_length"] = "La longitud debe estar entre 1 y 6";
-$messages["authimage_error_key"] = "La Clave de enctripción no puede quedar vacía!";
-
-$messages["authimage_settings_saved_ok"] = "La configuración se guardó correctamente";
-
-$messages["error_you_have_been_blocked"] = "Esta solicitud ha sido bloqueada.";
-$messages["error_authimage_code"] = "El código de seguridad no es correcto.";
-
-$messages["label_configuration"] = "Configuración";
-$messages["label_enable"] = "Activar";
-$messages["label_lengthx"] = "Longitud";
-$messages["label_key"] = "Clave";
-$messages["label_default"] = "Default";
-
-$messages["authimage_type_code"] = 'Por favor introduzca el texto de la imagen:';
-?>
Deleted: plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_CN.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_CN.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_CN.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,29 +0,0 @@
-<?php
-$messages["manageAntiSpamPlugins"] = "鲿¢åå¾å¹²æ°ç®¡ç";
-$messages["AuthImage"] = "åå¤éªè¯è®¾ç½®";
-$messages["authimage_code"] = "éªè¯ç ";
-
-$messages["authimage_length"] = "éªè¯ç çé¿åº¦";
-$messages["authimage_key"] = "éªè¯ç çç¼ç å
³é®å";
-$messages["authimage_default"] = "éæ©é¢è®¾èæ¯å¾";
-$messages["authimage_background_name"] = "èæ¯åç§°";
-$messages["authimage_background_image"] = "èæ¯å¾è±¡";
-$messages["authimage_plugin_enabled"] = "å¯ç¨æä»¶";
-$messages["authimage_plugin"] = "åå¤éªè¯æä»¶";
-
-$messages["authimage_error_length"] = "é¿åº¦å¿
é¡»ä»äº1å°6ä¹é´ã";
-$messages["authimage_error_key"] = "ç¼ç å
³é®åé误ï¼ä¸å¯ç©ºç½ã";
-
-$messages["authimage_settings_saved_ok"] = "åå¤éªè¯è®¾ç½®å¨åæåã";
-
-$messages["error_you_have_been_blocked"] = "对ä¸èµ·ï¼æ¨æè¦è¿è¡çæä½æ æ³æ§è¡ã";
-$messages["error_authimage_code"] = "æ¨çåå¤éªè¯ç è¾å
¥æè¯¯ï¼è¯·æ£æ¥åéè¯ã";
-
-$messages["label_configuration"] = "设置";
-$messages["label_enable"] = "å¯ç¨";
-$messages["label_length"] = "é¿åº¦";
-$messages["label_key"] = "ç¼ç å
³é®å";
-$messages["label_default"] = "é»è®¤";
-
-$messages["authimage_type_code"] = 'Please type the code you can see here:';
-?>
Deleted: plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_TW.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_TW.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/locale/locale_zh_TW.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,32 +0,0 @@
-<?php
-$messages["manageAntiSpamPlugins"] = "é²å¶åå¾å¹²æ¾ç®¡ç";
-$messages["AuthImage"] = "è¿´é¿é©èè¨å®";
-$messages["authimage_code"] = "é©è碼";
-
-$messages["authimage_length"] = "é©è碼çé·åº¦";
-$messages["authimage_key"] = "é©è碼ç編碼é°å";
-$messages["authimage_expiredtime"] = "é©èç¢¼çæ«åæªæææé";
-$messages["authimage_default"] = "鏿é è¨èæ¯å";
-$messages["authimage_background_name"] = "æªå";
-$messages["authimage_background_image"] = "åå";
-$messages["authimage_plugin_enabled"] = "åå夿ç¨å¼";
-$messages["authimage_plugin"] = "è¿´é¿é©è夿ç¨å¼";
-
-$messages["authimage_error_length"] = "é·åº¦å¿
é 仿¼ 1 å° 6 ä¹éã";
-$messages["authimage_error_key"] = "編碼é°åé¯èª¤ï¼ä¸å¯ç©ºç½ã";
-$messages["authimage_error_expiredtime"] = "æ«åæªæææéçº 0 ç§å° 86400 ç§ï¼å»ºè°ä¸è¦å°æ¼ 1800 ç§ï¼ã";
-
-$messages["authimage_settings_saved_ok"] = "è¿´é¿é©èè¨å®å²åæåã";
-
-$messages["error_you_have_been_blocked"] = "æ±æï¼ä½ æè¦æ±çåä½ç¡æ³ç¹¼çºã";
-$messages["error_authimage_code"] = "æ¨çè¿´é¿é©è碼輸å
¥é¯èª¤ã";
-
-$messages["label_configuration"] = "è¨å®";
-$messages["label_enable"] = "åå";
-$messages["label_length"] = "é·åº¦";
-$messages["label_key"] = "編碼é°å";
-$messages["label_expiredtime"] = "æ«å";
-$messages["label_default"] = "é è¨";
-
-$messages["authimage_type_code"] = 'é©è碼';
-?>
Deleted: plugins/branches/lifetype-1.2/extrafields/pluginauthimage.class.php
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/pluginauthimage.class.php 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/pluginauthimage.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,193 +0,0 @@
-<?php
-
- lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-
- define( "AUTHIMAGE_FILE", "/plugins/authimage/authimage.php" );
- define( "AUTHIMAGE_BACKGROUND_FOLDER", PLOG_CLASS_PATH."plugins/authimage/backgrounds/" );
-
- /**
- * Plugin that offers comment authentication image for current blog
- * Original Author: Gudlyf http://www.gudlyf.com/index.php?p=376
- * Modified by: Mark Wu
- */
- class PluginAuthImage extends PluginBase
- {
- var $pluginEnabled;
- var $default;
- var $cacheFolder;
-
- function PluginAuthImage( $source = "" )
- {
- $this->PluginBase( $source );
-
- $this->id = "authimage";
- $this->author = "Mark Wu";
- $this->desc = 'This plugin offers extra comment authentication for LifeType.';
- $this->version = "20070324";
-
- $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "es_ES", "de_DE" );
-
- if( $source == "admin" )
- $this->initAdmin();
- else
- $this->init();
- }
-
- function init()
- {
- lt_include(PLOG_CLASS_PATH."plugins/authimage/class/security/authimagefilter.class.php");
- // register the filter
- $this->registerFilter( "AuthImageFilter" );
- $this->registerBlogAction( "AuthImageShow", "PluginAuthImageShowAction" );
- }
-
- function initAdmin()
- {
- $this->registerAdminAction( "authimage", "PluginAuthImageConfigAction" );
- $this->registerAdminAction( "updateAuthImageConfig", "PluginAuthImageUpdateConfigAction" );
-
- $menu =& Menu::getMenu();
- if( !$menu->entryExists( "/menu/controlCenter/manageAntiSpamPlugins" ))
- $this->addMenuEntry( "/menu/controlCenter", "manageAntiSpamPlugins", "", "" );
- $this->addMenuEntry( "/menu/controlCenter/manageAntiSpamPlugins", "AuthImage", "?op=authimage", "" );
- }
-
- function register()
- {
- $config =& Config::getConfig();
- $this->cacheFolder = $config->getValue('temp_folder');
- $this->cacheFolder = $this->cacheFolder.'/authimage/'.$this->blogInfo->getId();
- if( !File::exists( $this->cacheFolder )) {
- File::createDir( $this->cacheFolder );
- }
-
- $blogSettings = $this->blogInfo->getSettings();
- $this->pluginEnabled = $blogSettings->getValue( "plugin_authimage_enabled" );
- $this->length = $blogSettings->getValue( "plugin_authimage_length" );
- $this->key = $blogSettings->getValue( "plugin_authimage_key" );
- $this->expiredTime = $blogSettings->getValue( "plugin_authimage_expiredtime" );
- if ($this->expiredTime == "") $this->expiredTime = 3600;
- $this->default = $blogSettings->getValue( "plugin_authimage_default" );
- if( $this->default == "" )
- $this->default = "ocean.gif";
- }
-
- function isEnabled()
- {
- return $this->pluginEnabled;
- }
-
- function generateImageUrl()
- {
- lt_include( PLOG_CLASS_PATH."class/net/rawrequestgenerator.class.php" );
- $rg = new RawRequestGenerator($this->blogInfo);
-
- $rg->addParameter( "op", "AuthImageShow" );
- $rg->addParameter( "blogId", $this->blogInfo->getId());
-
- $imageUrl = $rg->getIndexUrl().$rg->getRequest();
-
- if ( !function_exists ('gd_info') ) {
- // We don't have gd support compiled in, lets inform the user about it
- return false;
- }
-
- return $imageUrl;
- }
-
- function show() {
- $authImageUrl = $this->generateImageUrl();
- if ( $authImageUrl )
- return '<img src="'.$authImageUrl.'" style="vertical-align:middle;" width="70px" height="20px" alt="authimage" />';
- else
- return 'You don\'t have GD support compiled in, we cannot create an authimage. Please activate GD Support.';
- }
-
- function showImage() {
- // Delete those cached authimage files that never used
- $this->deleteExpiredAuthImage($this->expiredTime);
-
- $code = $this->generateCode();
- $encrypt = $this->encrypt($code, $this->key);
- $background = AUTHIMAGE_BACKGROUND_FOLDER.$this->default;
- $tempFile = $this->cacheFolder."/".$encrypt.".gif";
-
- if(function_exists ( 'imagecreatefromgif' )){
- $image = @imagecreatefromgif($background) or die("Cannot Initialize new GD image stream");
- }
- else if(function_exists ( 'imagecreatefrompng' )){
- $image = @imagecreatefrompng($background) or die("Cannot Initialize new GD image stream");
- } else {
- die("Server doesn't support GIF or PNG creation. Sorry.");
- }
-
- $textColor = imageColorAllocate($image, 0x00, 0x00, 0x00);
- ImageString($image, 5, 7, 2, $code, $textColor);
-
- if ( !function_exists ( 'ImageGIF' ) ) {
- ImagePNG($image, $tempFile);
- } else {
- ImageGIF($image, $tempFile);
- }
- $temp = fopen($tempFile,"rb");
- $buffer = fread($temp,filesize($tempFile));
- fclose($temp);
-
- // Now zero-length the file. No need for its content anymore.
- $temp = fopen($tempFile,"w");
- fwrite($temp, NULL);
- fclose($temp);
-
- // Now chmod it so it can be deleted later by the user
- chmod($tempFile, 0666);
-
- header("Content-type: image/gif");
- echo $buffer;
- }
-
- // encrypt string
- function encrypt($string, $key) {
- $plainText = $string.$key;
- $encodeText = md5($plainText);
- return $encodeText;
- }
-
- function generateCode() {
- $code = "";
- for($i=0; $i < $this->length; $i++) $code .= rand(0,9);
- return $code;
- }
-
- function deleteExpiredAuthImage( $expiretime ) {
- $path = $this->cacheFolder;
- if ( is_dir($path) )
- {
- $handle=opendir($path);
- while (false!==($file = readdir($handle))) {
- if ($file != "." && $file != "..") {
- $diff = time() - filectime("$path/$file");
- if ($diff > $expiretime) unlink("$path/$file");
- }
- }
- closedir($handle);
- }
- }
-
- function getPluginConfigurationKeys()
- {
- lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
- lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
-
- return( Array(
- Array( "name" => "plugin_authimage_enabled", "type" => "boolean" ),
- Array( "name" => "plugin_authimage_length", "validator" => new IntegerValidator(), "type" => "integer", "allowEmpty" => true ),
- Array( "name" => "plugin_authimage_key", "validator" => new StringValidator(), "type" => "string", "allowEmpty" => true ),
- Array( "name" => "plugin_authimage_expiredtime",
- "validator" => new IntegerValidator(),
- "type" => "integer",
- "allowEmpty" => true ),
- ));
- }
- }
-
-?>
Copied: plugins/branches/lifetype-1.2/extrafields/pluginextrafields.class.php (from rev 6157, plugins/branches/lifetype-1.2/extrafields/pluginauthimage.class.php)
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/pluginextrafields.class.php (rev 0)
+++ plugins/branches/lifetype-1.2/extrafields/pluginextrafields.class.php 2008-01-11 12:59:30 UTC (rev 6158)
@@ -0,0 +1,53 @@
+<?php
+
+ lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
+
+ class PluginExtraFields extends PluginBase
+ {
+ var $_value;
+
+ function PluginExtraFields( $source = "" )
+ {
+ $this->PluginBase( $source );
+
+ $this->id = "extrafields";
+ $this->author = "Jon Daley";
+ $this->desc = 'This plugin is an example of how to have an additional per-blog setting.';
+ $this->version = "20080111";
+
+ $this->locales = Array( "en_UK" );
+
+ if( $source == "admin" )
+ $this->initAdmin();
+ }
+
+ function initAdmin()
+ {
+ $this->registerAdminAction( "extrafields", "PluginExtraFieldsConfigAction" );
+ $this->registerAdminAction( "updateExtraFieldsConfig", "PluginExtraFieldsUpdateConfigAction" );
+
+ $menu =& Menu::getMenu();
+ $this->addMenuEntry( "/menu/controlCenter/manageSettings", "ExtraFields", "?op=extrafields", "");
+ }
+
+ function register()
+ {
+ $blogSettings = $this->blogInfo->getSettings();
+ $this->_value = $blogSettings->getValue( "plugin_extrafields_value" );
+ }
+
+ function getField() {
+ return $this->_value;
+ }
+
+ function getPluginConfigurationKeys()
+ {
+ lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+
+ return( Array(
+ Array( "name" => "plugin_extrafields_value", "validator" => new StringValidator(), "type" => "string", "allowEmpty" => true )
+ ));
+ }
+ }
+
+?>
Modified: plugins/branches/lifetype-1.2/extrafields/readme.txt
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/readme.txt 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/readme.txt 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,22 +1,10 @@
-Plugin: AuthImage
-Author: Mark Wu
-Idea From: Gudlyf
-Release Date: 2005/02/15
-Version: 1.0
-
-This plugin offers extra comment authentication for LifeType. The idea is inspired by <a href="http://www.gudlyf.com/index.php?p=376">WordPress AuthImage Plugin</a> written by Gudlyf.
-
-In order to use, simply include the following:
-1. $authimage->isEnabled() to check the plugin is enabled or not.
-2. $authimage->show() to get the authentication image.
-
-Install:
-Add the following code to commentform.template:
-{if $authimage && $authimage->isEnabled()}
-<div>
- <label for="authImage">{$locale->tr("authimage_type_code")}</label>
- <input type="text" name="authImage" id="authImage" value="" /> {$authimage->show()}
-</div>
-{/if}
-
-You can add your own default background image to /plugin/authimage/backgrounds. This plugin only support GIF format currently.
+Plugin: ExtraFields
+Author: Jon Daley
+
+This plugin allows you to add an additional field for each blog.
+This was requested here:
+
+http://forums.lifetype.net/viewtopic.php?p=41110
+
+In order to use, simply include the following wherever you want it:
+ $extrafields->getField()
Deleted: plugins/branches/lifetype-1.2/extrafields/templates/authimage.template
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/templates/authimage.template 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/templates/authimage.template 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1,73 +0,0 @@
-{include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=AuthImage title=$locale->tr("authimage_plugin")}
-
-<form name="authimageluginConfig" action="admin.php" method="post">
- <fieldset class="inputField">
- <legend>{$locale->tr("label_configuration")}</legend>
- {include file="$admintemplatepath/successmessage.template"}
- {include file="$admintemplatepath/errormessage.template"}
- <div class="field">
- <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
- <div class="formHelp">
- <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled}checked="checked"{/if} value="1" {user_cannot_override key=plugin_authimage_enabled}disabled="disabled"{/user_cannot_override} />{$locale->tr("authimage_plugin_enabled")}
- </div>
- </div>
-
- <div class="field">
- <label for="length">{$locale->tr("label_length")}</label>
- <span class="required">*</span>
- <div class="formHelp">{$locale->tr("authimage_length")}</div>
- <input class="text" type="text" name="length" id="length" value="{$length}" {user_cannot_override key=plugin_authimage_length}readonly="readonly"{/user_cannot_override} />
- </div>
-
- <div class="field">
- <label for="key">{$locale->tr("label_key")}</label>
- <span class="required">*</span>
- <div class="formHelp">{$locale->tr("authimage_key")}</div>
- <input class="text" type="text" name="key" id="key" value="{$key}" {user_cannot_override key=plugin_authimage_key}readonly="readonly"{/user_cannot_override} />
- </div>
-
- <div class="field">
- <label for="expiredTime">{$locale->tr("label_expiredtime")}</label>
- <span class="required">*</span>
- <div class="formHelp">{$locale->tr("authimage_expiredtime")}</div>
- <input class="text" type="text" name="expiredTime" id="expiredTime" value="{$expiredTime}" {user_cannot_override key=plugin_authimage_expiredtime}readonly="readonly"{/user_cannot_override} />
- </div>
-
- <div class="field">
- <label for="default">{$locale->tr("label_default")}</label>
- <div class="formHelp">{$locale->tr("authimage_default")}</div>
- <table summary="">
- <thead>
- <tr>
- <th style="width:20px;"></th>
- <th style="width:130px;">{$locale->tr("authimage_background_name")}</th>
- <th style="width:450px;">{$locale->tr("authimage_background_image")}</th>
- </tr>
- </thead>
- <tbody>
- {foreach from=$backgrounds item=background}
- <tr>
- <td>
- <input class="radio" type="radio" name="default" id="default" value="{$background}" {if $default==$background} checked="checked" {/if} {user_cannot_override key=plugin_authimage_default}readonly="readonly"{/user_cannot_override} />
- </td>
- <td>
- {$background}
- </td>
- <td>
- <img src="{$url->getUrl("/plugins/authimage/backgrounds/$background")}" alt="{$background}" />
- </td>
- </tr>
- {/foreach}
- </tbody>
- </table>
- </div>
- </fieldset>
- <div class="buttons">
- <input type="hidden" name="op" value="updateAuthImageConfig" />
- <input type="reset" name="{$locale->tr("reset")}" />
- <input type="submit" name="{$locale->tr("settings")}" value="{$locale->tr("update")}" />
- </div>
-</form>
-{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
Deleted: plugins/branches/lifetype-1.2/extrafields/templates/authimageshow.template
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/templates/authimageshow.template 2008-01-11 12:36:44 UTC (rev 6157)
+++ plugins/branches/lifetype-1.2/extrafields/templates/authimageshow.template 2008-01-11 12:59:30 UTC (rev 6158)
@@ -1 +0,0 @@
-{$authimage->showImage()}
\ No newline at end of file
Copied: plugins/branches/lifetype-1.2/extrafields/templates/config.template (from rev 6157, plugins/branches/lifetype-1.2/extrafields/templates/authimage.template)
===================================================================
--- plugins/branches/lifetype-1.2/extrafields/templates/config.template (rev 0)
+++ plugins/branches/lifetype-1.2/extrafields/templates/config.template 2008-01-11 12:59:30 UTC (rev 6158)
@@ -0,0 +1,24 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=Settings title=$locale->tr("extrafields_plugin")}
+
+<form action="admin.php" method="post">
+ <fieldset class="inputField">
+ <legend>{$locale->tr("label_configuration")}</legend>
+ {include file="$admintemplatepath/successmessage.template"}
+ {include file="$admintemplatepath/errormessage.template"}
+
+ <div class="field">
+ <label for="name">{$locale->tr("label_name")}</label>
+ <div class="formHelp">{$locale->tr("extrafields_name")}</div>
+ <input class="text" type="text" name="name" id="name" value="{$name}" {user_cannot_override key=plugin_extrafields_name}readonly="readonly"{/user_cannot_override} />
+ </div>
+
+ </fieldset>
+ <div class="buttons">
+ <input type="hidden" name="op" value="updateExtraFieldsConfig" />
+ <input type="reset" name="{$locale->tr("reset")}" />
+ <input type="submit" name="{$locale->tr("settings")}" value="{$locale->tr("update")}" />
+ </div>
+</form>
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
More information about the pLog-svn
mailing list