[pLog-svn] r6298 - in plugins/branches/lifetype-1.2/cssnaked: . class/view locale templates

reto at devel.lifetype.net reto at devel.lifetype.net
Sun Apr 6 12:56:46 EDT 2008


Author: reto
Date: 2008-04-06 12:56:46 -0400 (Sun, 06 Apr 2008)
New Revision: 6298

Modified:
   plugins/branches/lifetype-1.2/cssnaked/class/view/admincssnakedconfigview.class.php
   plugins/branches/lifetype-1.2/cssnaked/locale/locale_en_UK.php
   plugins/branches/lifetype-1.2/cssnaked/plugincssnaked.class.php
   plugins/branches/lifetype-1.2/cssnaked/templates/pluginsettings.template
Log:
fixed typo, better help text on settings page, updated default to next naked day, fixed preg_replace bug for the naked notice.

Modified: plugins/branches/lifetype-1.2/cssnaked/class/view/admincssnakedconfigview.class.php
===================================================================
--- plugins/branches/lifetype-1.2/cssnaked/class/view/admincssnakedconfigview.class.php	2008-04-06 16:51:20 UTC (rev 6297)
+++ plugins/branches/lifetype-1.2/cssnaked/class/view/admincssnakedconfigview.class.php	2008-04-06 16:56:46 UTC (rev 6298)
@@ -2,7 +2,7 @@
 	
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
     
-    define("DEFAULT_DATE", "2007-04-05");
+    define("DEFAULT_DATE", "2008-04-09");
     
 	/**
 	 * implements the configuration view

Modified: plugins/branches/lifetype-1.2/cssnaked/locale/locale_en_UK.php
===================================================================
--- plugins/branches/lifetype-1.2/cssnaked/locale/locale_en_UK.php	2008-04-06 16:51:20 UTC (rev 6297)
+++ plugins/branches/lifetype-1.2/cssnaked/locale/locale_en_UK.php	2008-04-06 16:56:46 UTC (rev 6298)
@@ -1,16 +1,16 @@
 <?php
 $messages["manageAppearancePlugins"] = "Appearance Management";
 $messages['cssnaked'] = 'CSS Naked';
-$messages['cssnaked_plugin'] = 'CSS Naked';
+$messages['cssnaked_plugin'] = 'CSS Naked Plugin';
 $messages['cssnaked_plugin_enabled'] = 'Enable the CSS Naked Plugin';
 
 $messages['label_cssnaked_addNotice'] = 'Add Notice';
 $messages['help_cssnaked_addNotice'] = 'Add the message below at the top of your page while your blog is naked. (The message can be edited in the locale files at ./plugins/cssnaked/locale).';
 
 $messages['label_cssnaked_startDate'] = 'Start Date';
-$messages['help_cssnaked_startDate'] = 'The day you want to start getting naked. [Default = 2007-04-05]';
+$messages['help_cssnaked_startDate'] = 'The day you want to start getting naked in the format yyyy-mm-dd.';
 $messages['label_cssnaked_endDate'] = 'End Date';
-$messages['help_cssnaked_endDate'] = 'The day you\'d like to get dressed again (usually the same date).  [Default = 2007-04-05]';
+$messages['help_cssnaked_endDate'] = 'The day you\'d like to get dressed again in the format yyyy-mm-dd (usually the same date).';
 
 
 $messages['cssnaked_settings_saved_ok'] = 'CSS Naked settings saved successfully!';

Modified: plugins/branches/lifetype-1.2/cssnaked/plugincssnaked.class.php
===================================================================
--- plugins/branches/lifetype-1.2/cssnaked/plugincssnaked.class.php	2008-04-06 16:51:20 UTC (rev 6297)
+++ plugins/branches/lifetype-1.2/cssnaked/plugincssnaked.class.php	2008-04-06 16:56:46 UTC (rev 6298)
@@ -21,7 +21,7 @@
 			//$this->_l =& LoggerManager::getLogger( "naked" );
 			
 			$this->id = "cssnaked";
-			$this->version = "20070403";
+			$this->version = "20080406";
 			$this->author = "Reto Hugi";
 			$this->desc = "Deactivates all CSS Styles on the active template. This Template was written to easily participate at the <a href=\"http://naked.dustindiaz.com/\">CSS Naked Day</a>. The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and of course, a good 'ol play on words. It's time to show off your &lt;body&gt;.";
 			
@@ -112,16 +112,11 @@
             
             //$this->_l->debug( "----- START isNakedDay() ---------" );	
 
-        	if ($this->_timeFrame === 48) {
 
-        		// Start of the Day on GMT+12
-        		$stime = gmmktime( -12, 0, 0, date('n',$this->_startDate), date('j',$this->_startDate) ); 
-        		// End of the Day on GMT-12
-        		$etime = gmmktime(36, 0, 0, date('n',$this->_endDate), date('j',$this->_endDate) );
-        	}
-        	else {
-        	    //TODO: other time frame than 48h and taking the blogs time offset into account
-        	}
+    		// Start of the Day on GMT+12
+    		$stime = gmmktime( -12, 0, 0, date('n',$this->_startDate), date('j',$this->_startDate), date('Y',$this->_startDate) ); 
+    		// End of the Day on GMT-12
+    		$etime = gmmktime(36, 0, 0, date('n',$this->_endDate), date('j',$this->_endDate), date('Y',$this->_endDate) );
 
         	$ntime = time(); // Time now
 
@@ -130,9 +125,9 @@
         	if ($ntime >= $stime && $ntime <= $etime) {
         		return true;
         	}
-        	else {
-        		return false;
-        	}
+        	
+        	return false;
+        	
         }
 
         // parts of this method where inspired by http://www.ajalapus.com
@@ -153,7 +148,7 @@
         function _addNotice(&$content, &$notice) {
 	
             $pattern = '/<body(.*)>/U';
-            
+            $notice = "$0".$notice;
             return preg_replace($pattern, $notice, $content);
         }
 	}

Modified: plugins/branches/lifetype-1.2/cssnaked/templates/pluginsettings.template
===================================================================
--- plugins/branches/lifetype-1.2/cssnaked/templates/pluginsettings.template	2008-04-06 16:51:20 UTC (rev 6297)
+++ plugins/branches/lifetype-1.2/cssnaked/templates/pluginsettings.template	2008-04-06 16:56:46 UTC (rev 6298)
@@ -1,5 +1,5 @@
 {include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=cssnakedPluginSettings title=$locale->tr("cssnaked_plugin")}
+{include file="$admintemplatepath/navigation.template" showOpt=cssnaked title=$locale->tr("cssnaked_plugin")}
 
 
 <form name="cssnakedPluginSettings" method="post" action="admin.php">



More information about the pLog-svn mailing list