[pLog-svn] r4923 - plugins/branches/lifetype-1.2/blogtimes

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Mar 2 11:31:04 EST 2007


Author: jondaley
Date: 2007-03-02 11:31:04 -0500 (Fri, 02 Mar 2007)
New Revision: 4923

Modified:
   plugins/branches/lifetype-1.2/blogtimes/pluginblogtimes.class.php
   plugins/branches/lifetype-1.2/blogtimes/readme.txt
Log:
update includes.  add call to isEnabled inside show to make template code easier

Modified: plugins/branches/lifetype-1.2/blogtimes/pluginblogtimes.class.php
===================================================================
--- plugins/branches/lifetype-1.2/blogtimes/pluginblogtimes.class.php	2007-03-02 16:29:34 UTC (rev 4922)
+++ plugins/branches/lifetype-1.2/blogtimes/pluginblogtimes.class.php	2007-03-02 16:31:04 UTC (rev 4923)
@@ -1,10 +1,6 @@
 <?php
 
-    include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
-    include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
-    include_once( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
 
     /**
      * Plugin that offers blogtimes for current blog
@@ -37,7 +33,7 @@
             $this->version = "20070301";
   
             // source the neccessary class files
-            include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
 
             $this->prefix = Db::getPrefix();
             $this->db =& Db::getDb();
@@ -59,7 +55,7 @@
         
         function initAdmin()
         {
-            include_once( PLOG_CLASS_PATH."class/template/menu/menu.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/template/menu/menu.class.php" );
 
             $this->init();
 
@@ -130,6 +126,9 @@
         }
         
         function show() {
+            if(!$this->isEnabled())
+                return "";
+            lt_include( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
             $saveFile = $this->cacheFolder."/blogtimes.png";
             $rg =& RequestGenerator::getRequestGenerator( $this->blogInfo );
             $blogtimesTag = "<div align=\"center\"><img src=\"".$rg->getUrl("/".$saveFile)."\" /></div>";
@@ -249,6 +248,7 @@
         # and build an array of # of minutes since midnight for each post
         function getPostTimes($lastDays = 30)
         {
+            lt_include( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
             $blogId = $this->blogInfo->getId();
             
             //

Modified: plugins/branches/lifetype-1.2/blogtimes/readme.txt
===================================================================
--- plugins/branches/lifetype-1.2/blogtimes/readme.txt	2007-03-02 16:29:34 UTC (rev 4922)
+++ plugins/branches/lifetype-1.2/blogtimes/readme.txt	2007-03-02 16:31:04 UTC (rev 4923)
@@ -2,7 +2,7 @@
 Author: Mark Wu
 Idea From: Matt Mullenweg http://photomatt.net
 Release Date: 2005/01/23
-Version: 1.0
+Version: 1.2
 
 This plugin offers you to get the blog times image. Usage as followed:
 
@@ -12,18 +12,6 @@
 
 Install:
 1. Add the following code to bottom of main.template:
-{if !empty($blogtimes)}
-{if $blogtimes->isEnabled()}
-{$blogtimes->show()}
+{if $blogtimes}
+  {$blogtimes->show()}
 {/if}
-{/if}
-
-2.Change plog/tmp/.htacess to allow blogtimes folder can read by web browser
-<Files "*">
- Order deny,allow
- Deny from all
-</Files>
-
-<Files "blogtimes">
- Allow from all
-</files>
\ No newline at end of file



More information about the pLog-svn mailing list