[pLog-svn] r4263 - plugins/branches/lifetype-1.1/unported/topcommentposts

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Nov 8 04:40:12 GMT 2006


Author: jondaley
Date: 2006-11-08 04:40:09 +0000 (Wed, 08 Nov 2006)
New Revision: 4263

Modified:
   plugins/branches/lifetype-1.1/unported/topcommentposts/plugintopcommentposts.class.php
   plugins/branches/lifetype-1.1/unported/topcommentposts/readme.txt
Log:
updated to 1.1

Modified: plugins/branches/lifetype-1.1/unported/topcommentposts/plugintopcommentposts.class.php
===================================================================
--- plugins/branches/lifetype-1.1/unported/topcommentposts/plugintopcommentposts.class.php	2006-11-08 04:33:31 UTC (rev 4262)
+++ plugins/branches/lifetype-1.1/unported/topcommentposts/plugintopcommentposts.class.php	2006-11-08 04:40:09 UTC (rev 4263)
@@ -81,7 +81,8 @@
                 $query .= " LIMIT " . $this->maxPosts;
             }
 
-            $result = $comments->_db->Execute( $query ); 
+            $db =& Db::getDb();
+            $result = $db->Execute( $query ); 
 
             if( !$result ) 
                 return false; 
@@ -107,7 +108,8 @@
             $query .= ";";
 
             // we send the query and then fetch the first array with the result
-            $result = $articles->_db->Execute( $query );
+            $db =& Db::getDb();
+            $result = $db->Execute( $query ); 
 
             if( $result == false )
                 return false;
@@ -117,7 +119,7 @@
 
             $row = $result->FetchRow( $result );
 
-            $article = $articles->_fillArticleInformation( $row );
+            $article = $articles->mapRow( $row );
 
             return $article;
         }

Modified: plugins/branches/lifetype-1.1/unported/topcommentposts/readme.txt
===================================================================
--- plugins/branches/lifetype-1.1/unported/topcommentposts/readme.txt	2006-11-08 04:33:31 UTC (rev 4262)
+++ plugins/branches/lifetype-1.1/unported/topcommentposts/readme.txt	2006-11-08 04:40:09 UTC (rev 4263)
@@ -1,7 +1,7 @@
 Plugin: Top Comment Posts
 Author: Mark Wu
-Release Date: 2005/01/23
-Version: 1.0
+Release Date: 2006/11/07
+Version: 1.1
 
 This plugin offers the rank list of articles by number of comments. Usage as follow:
 
@@ -14,12 +14,13 @@
 2. $based is return the site-wide or blog-wide posts. "BLOG" means blog-wide, and "SITE" means site-wide. Default is "BLOG".
 
 Example:
-{if $topcommentposts->isEnabled()}
+{if $topcommentposts && $topcommentposts->isEnabled()}
 <h2>Top Comment Posts</h2>
 <ul>  
 {assign var=commentposts value=$topcommentposts->getTopCommentPosts()}
 {foreach from=$commentposts item=commentpost}
-<li><a href="{$url->postLink($commentpost)}">{$commentpost->getTopic()} ({$commentpost->getTotalComments()} Posts)</a></li>
+<li><a href="{$url->postLink($commentpost)}">{$commentpost->getTopic()}
+      ({$commentpost->getTotalComments()} Posts)</a></li>
 {/foreach}
 </ul>    
-{/if}
\ No newline at end of file
+{/if}



More information about the pLog-svn mailing list