[pLog-svn] r4265 -
plugins/branches/lifetype-1.1/unported/topreadposts
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Wed Nov 8 04:45:08 GMT 2006
Author: jondaley
Date: 2006-11-08 04:45:06 +0000 (Wed, 08 Nov 2006)
New Revision: 4265
Modified:
plugins/branches/lifetype-1.1/unported/topreadposts/plugintopreadposts.class.php
plugins/branches/lifetype-1.1/unported/topreadposts/readme.txt
Log:
updated to 1.1
Modified: plugins/branches/lifetype-1.1/unported/topreadposts/plugintopreadposts.class.php
===================================================================
--- plugins/branches/lifetype-1.1/unported/topreadposts/plugintopreadposts.class.php 2006-11-08 04:40:34 UTC (rev 4264)
+++ plugins/branches/lifetype-1.1/unported/topreadposts/plugintopreadposts.class.php 2006-11-08 04:45:06 UTC (rev 4265)
@@ -20,7 +20,8 @@
$this->id = "topreadposts";
$this->author = "Mark Wu";
- $this->desc = "This plugin offers the rank list of articles by number of read.";
+ $this->desc = "This plugin offers the rank list of articles by ".
+ "number of times read.";
$this->prefix = Db::getPrefix();
@@ -31,6 +32,7 @@
function init()
{
+ include_once( PLOG_CLASS_PATH."class/template/menu/menu.class.php" );
$this->registerAdminAction( "topreadposts", "PluginTopReadPostsConfigAction" );
$this->registerAdminAction( "updateTopReadPostsConfig", "PluginTopReadPostsUpdateConfigAction" );
@@ -79,14 +81,15 @@
$query .= " LIMIT " . $this->maxPosts;
}
- $result = $articles->_db->Execute( $query );
+ $db =& Db::getDb();
+ $result = $db->Execute( $query );
if( !$result )
return false;
$topreadposts = Array();
while( $row = $result->FetchRow()) {
- $article = $articles->_fillArticleInformation( $row );
+ $article = $articles->mapRow( $row );
array_push( $topreadposts, $article);
}
Modified: plugins/branches/lifetype-1.1/unported/topreadposts/readme.txt
===================================================================
--- plugins/branches/lifetype-1.1/unported/topreadposts/readme.txt 2006-11-08 04:40:34 UTC (rev 4264)
+++ plugins/branches/lifetype-1.1/unported/topreadposts/readme.txt 2006-11-08 04:45:06 UTC (rev 4265)
@@ -1,7 +1,7 @@
Plugin: Top Read 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 reads. Usage as follow:
@@ -14,7 +14,7 @@
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 $topreadposts->isEnabled()}
+{if $topreadposts && $topreadposts->isEnabled()}
<h2>Top Read Posts</h2>
<ul>
{assign var=readposts value=$topreadposts->getTopReadPosts()}
@@ -22,4 +22,4 @@
<li><a href="{$url->postLink($readpost)}">{$readpost->getTopic()} ({$readpost->getNumReads()} Times)</a></li>
{/foreach}
</ul>
-{/if}
\ No newline at end of file
+{/if}
More information about the pLog-svn
mailing list