[pLog-svn] r804 - in plugins/trunk: recentcomments recentcomments/class/action recenttrackbacks recenttrackbacks/class/action topcommentposts topcommentposts/class/action topcommentvisitors topcommentvisitors/class/action topreadposts topreadposts/class/action toptrackbackposts toptrackbackposts/class/action

mark at devel.plogworld.net mark at devel.plogworld.net
Sun Jan 23 16:48:07 GMT 2005


Author: mark
Date: 2005-01-23 16:48:06 +0000 (Sun, 23 Jan 2005)
New Revision: 804

Added:
   plugins/trunk/recentcomments/readme.txt
   plugins/trunk/recenttrackbacks/readme.txt
   plugins/trunk/topcommentposts/readme.txt
   plugins/trunk/topcommentvisitors/readme.txt
   plugins/trunk/topreadposts/readme.txt
   plugins/trunk/toptrackbackposts/readme.txt
Modified:
   plugins/trunk/recentcomments/class/action/pluginrecentcommentsupdateconfigaction.class.php
   plugins/trunk/recentcomments/pluginrecentcomments.class.php
   plugins/trunk/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php
   plugins/trunk/recenttrackbacks/pluginrecenttrackbacks.class.php
   plugins/trunk/topcommentposts/class/action/plugintopcommentpostsupdateconfigaction.class.php
   plugins/trunk/topcommentposts/plugintopcommentposts.class.php
   plugins/trunk/topcommentvisitors/class/action/plugintopcommentvisitorsupdateconfigaction.class.php
   plugins/trunk/topcommentvisitors/plugintopcommentvisitors.class.php
   plugins/trunk/topreadposts/class/action/plugintopreadpostsupdateconfigaction.class.php
   plugins/trunk/topreadposts/plugintopreadposts.class.php
   plugins/trunk/toptrackbackposts/class/action/plugintoptrackbackpostsupdateconfigaction.class.php
   plugins/trunk/toptrackbackposts/plugintoptrackbackposts.class.php
Log:
Move the description to readme.txt to reduce the pluign loading time.

Modified: plugins/trunk/recentcomments/class/action/pluginrecentcommentsupdateconfigaction.class.php
===================================================================
--- plugins/trunk/recentcomments/class/action/pluginrecentcommentsupdateconfigaction.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/recentcomments/class/action/pluginrecentcommentsupdateconfigaction.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -36,7 +36,7 @@
 		        
 		function perform()
 		{
-            // and check which smiley set we should be using, or if none, then the default one
+            // // update the plugin configurations to blog setting
 			$blogSettings = $this->_blogInfo->getSettings();
             $blogSettings->setValue( "plugin_recentcomments_enabled", $this->_pluginEnabled );
             $blogSettings->setValue( "plugin_recentcomments_maxcomments", $this->_maxComments );

Modified: plugins/trunk/recentcomments/pluginrecentcomments.class.php
===================================================================
--- plugins/trunk/recentcomments/pluginrecentcomments.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/recentcomments/pluginrecentcomments.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -20,7 +20,7 @@
   
             $this->id = "recentcomments";
             $this->author = "Mark Wu";
-            $this->desc = "This plugin offers the most recently article comments. Usage as follow:<br /><br />Add the following code to header.template<br /><br /><strong>&lt;p&gt;<br />{assign var=comments value=\$recentcomments-&gt;getRecentComments()}<br />{foreach from=\$comments item=comment}<br />{assign var=postid value=\$comment-&gt;getArticleId()}<br />{assign var=post value=\$recentcomments-&gt;getCommentArticle(\$postid)}<br />{if \$comment-&gt;getUserUrl()}<br />&lt;li&gt;&lt;a title=&quot;{\$comment-&gt;getText()|truncate:150:&quot;...&quot;|escape}&quot; href=&quot;{\$comment-&gt;getUserUrl()}&quot;&gt;{\$comment-&gt;getUsername()}&lt;/a&gt; &amp;gt;&amp;gt; &lt;a href=&quot;{\$url-&gt;postPermalink(\$post)}&quot;&gt;{\$post-&gt;getTopic()}&lt;/a&gt;&lt;/li&gt; <br />{else}<br />&lt;li&gt;&lt;a title=&quot;{\$comment-&gt;getText()|truncate:150:&quot;...&quot;|escape}&quot; href=&quot;{\$url-&gt;postPermalink(\$post)}&quot;&gt;{\$comment-&gt;getUsername()}&lt;/a&gt; &amp;gt;&amp;gt; &lt;a href=&quot;{\$url-&gt;postPermalink(\$post)}&quot;&gt;{\$post-&gt;getTopic()}&lt;/a&gt;&lt;/li&gt;<br />{/if}<br />{/foreach}<br />&lt;/p&gt;</strong><br /><br />You can use <br /><br /><strong>getRecentComments(5)</strong> to get recent 5 comments. The default view is BLOG. <br /><strong>getRecentComments(10, 'SITE')</strong> to get recent 10 comments from SITE view. It is very convenient for pLog Host Provider.<br /><br />";
+            $this->desc = "This plugin offers the most recently article comments.";
   
             $config =& Config::getConfig();
             $this->prefix = $config->getValue('db_prefix');
@@ -36,9 +36,9 @@
 			$this->registerAdminAction( "updateRecentCommentsConfig", "PluginRecentCommentsUpdateConfigAction" );
 			
 			$menu =& Menu::getMenu();
-			if( !$menu->entryExists( "/menu/controlCenter/manageRecentActivities" ))						
-				$this->addMenuEntry( "/menu/controlCenter", "manageRecentActivities", "", "", true, false );			
-            $this->addMenuEntry( "/menu/controlCenter/manageRecentActivities", "RecentComments", "?op=recentcomments", "" );            
+			if( !$menu->entryExists( "/menu/controlCenter/manageRecentPlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageRecentPlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageRecentPlugins", "RecentComments", "?op=recentcomments", "" );            
 		}
 
 		function register()

Added: plugins/trunk/recentcomments/readme.txt
===================================================================
--- plugins/trunk/recentcomments/readme.txt	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/recentcomments/readme.txt	2005-01-23 16:48:06 UTC (rev 804)
@@ -0,0 +1,28 @@
+Plugin: Recent Comments
+Author: Mark Wu
+Release Date: 2005/01/23
+Version: 1.0
+
+This plugin offers the most recently article comments. Usage as follow:
+
+You can use:
+1. $recentcomments->isEnabled() to check the plugin is enabled or not. 
+2. $recentcomments->getRecentComments( $maxComments , $based ) to get the recent comments.
+
+Where:
+1. $maxComments is the the max comments you want to show. Default is 10.
+2. $based is return the site-wide or blog-wide comments. "BLOG" means blog-wide, and "SITE" means site-wide. Default is "BLOG".
+
+Example:
+Add the following code to footer.template or header.template:
+{if $recentcomments->isEnabled()}
+<h2>Recent Comments</h2>
+{assign var=comments value=$recentcomments->getRecentComments()}
+<ul>
+{foreach from=$comments item=comment}
+{assign var=commentpostid value=$comment->getArticleId()}
+{assign var=commentpost value=$recentcomments->getArticle($commentpostid)}
+<li><a title="View comments by {$comment->getUsername()}" href="{$url->postPermalink($commentpost)}#{$comment->getId()}"><b>{$comment->getUsername()}¡G</b>{$comment->getText()|truncate:100:"..."|strip_tags}</a></li>
+{/foreach}
+</ul>            
+{/if}
\ No newline at end of file

Modified: plugins/trunk/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php
===================================================================
--- plugins/trunk/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -36,7 +36,7 @@
 		        
 		function perform()
 		{
-            // and check which smiley set we should be using, or if none, then the default one
+            // // update the plugin configurations to blog setting
 			$blogSettings = $this->_blogInfo->getSettings();
             $blogSettings->setValue( "plugin_recenttrackbacks_enabled", $this->_pluginEnabled );
             $blogSettings->setValue( "plugin_recenttrackbacks_maxtrackbacks", $this->_maxTrackbacks );

Modified: plugins/trunk/recenttrackbacks/pluginrecenttrackbacks.class.php
===================================================================
--- plugins/trunk/recenttrackbacks/pluginrecenttrackbacks.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/recenttrackbacks/pluginrecenttrackbacks.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -19,7 +19,7 @@
   
             $this->id = "recenttrackbacks";
             $this->author = "Mark Wu";
-            $this->desc = "This plugin offers the most recently article trackbacks. Usage as follow:<br /><br />Add the following code to header.template<br /><br /><strong>&lt;p&gt;<br />{assign var=trackbacks value=\$recenttrackbacks-&gt;getRecentTrackbacks()}<br />{foreach from=\$trackbacks item=trackback}<br />{assign var=postid value=\$trackback-&gt;getArticleId()}<br />{assign var=post value=\$recenttrackbacks-&gt;getTrackbackArticle(\$postid)}<br />&lt;li&gt;&lt;a title=&quot;{\$trackback-&gt;getTitle()}&quot; href=&quot;{\$trackback-&gt;getUrl()}&quot;&gt;{\$trackback-&gt;getBlogName()}&lt;/a&gt; &amp;gt;&amp;gt; &lt;a href=&quot;{\$url-&gt;postPermalink(\$post)}&quot;&gt;{\$post-&gt;getTopic()}&lt;/a&gt;&lt;/li&gt;<br />{/foreach}<br />&lt;/p&gt;</strong><br /><br />You can use <br /><br /><strong>getRecentTrackbacks(5)</strong> to get recent 5 trackbacks. The default view is BLOG. <br /><strong>getRecentTrackbacks(10, 'SITE')</strong> to get recent 10 trackbacks from SITE view. It is very convenient for pLog Host Provider.<br /><br />";
+            $this->desc = "This plugin offers the most recently article trackbacks.";
 
             $config =& Config::getConfig();
             $this->prefix = $config->getValue('db_prefix');
@@ -36,9 +36,9 @@
 			$this->registerAdminAction( "updateRecentTrackbacksConfig", "PluginRecentTrackbacksUpdateConfigAction" );
 			
 			$menu =& Menu::getMenu();
-			if( !$menu->entryExists( "/menu/controlCenter/manageRecentActivities" ))						
-				$this->addMenuEntry( "/menu/controlCenter", "manageRecentActivities", "", "", true, false );			
-            $this->addMenuEntry( "/menu/controlCenter/manageRecentActivities", "RecentTrackbacks", "?op=recenttrackbacks", "" );            
+			if( !$menu->entryExists( "/menu/controlCenter/manageRecentPlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageRecentPlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageRecentPlugins", "RecentTrackbacks", "?op=recenttrackbacks", "" );            
 		}
 
 		function register()

Added: plugins/trunk/recenttrackbacks/readme.txt
===================================================================
--- plugins/trunk/recenttrackbacks/readme.txt	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/recenttrackbacks/readme.txt	2005-01-23 16:48:06 UTC (rev 804)
@@ -0,0 +1,28 @@
+Plugin: Recent Trackbacks
+Author: Mark Wu
+Release Date: 2005/01/23
+Version: 1.0
+
+This plugin offers the most recently article trackbacks. Usage as follow:
+
+You can use:
+1. $recenttrackbacks->isEnabled() to check the plugin is enabled or not. 
+2. $recenttrackbacks->getRecentTrackbacks( $maxTrackbacks , $based ) to get the recent trackbacks.
+
+Where:
+1. $maxTrackbacks is the the max trackbacks you want to show. Default is 10.
+2. $based is return the site-wide or blog-wide trackbacks. "BLOG" means blog-wide, and "SITE" means site-wide. Default is "BLOG".
+
+Example:
+Add the following code to footer.template or header.template:
+{if $recenttrackbacks->isEnabled()}
+<h2>Recent Trackbacks</h2>
+{assign var=trackbacks value=$recenttrackbacks->getRecentTrackbacks()}
+<ul>
+{foreach from=$trackbacks item=trackback}
+{assign var=trackbackpostid value=$trackback->getArticleId()}
+{assign var=trackbackpost value=$recenttrackbacks->getArticle($trackbackpostid)}
+<li><a title="View trackbacks by {$trackback->getBlogName()}" href="{$trackback->getUrl()}"><b>{$trackback->getBlogName()}¡G</b>{$trackback->getTitle()}</a></li>
+{/foreach}
+</ul>            
+{/if}

Modified: plugins/trunk/topcommentposts/class/action/plugintopcommentpostsupdateconfigaction.class.php
===================================================================
--- plugins/trunk/topcommentposts/class/action/plugintopcommentpostsupdateconfigaction.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topcommentposts/class/action/plugintopcommentpostsupdateconfigaction.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -36,7 +36,7 @@
 		        
 		function perform()
 		{
-            // and check which smiley set we should be using, or if none, then the default one
+            // // update the plugin configurations to blog setting
 			$blogSettings = $this->_blogInfo->getSettings();
             $blogSettings->setValue( "plugin_topcommentposts_enabled", $this->_pluginEnabled );
             $blogSettings->setValue( "plugin_topcommentposts_maxposts", $this->_maxPosts );

Modified: plugins/trunk/topcommentposts/plugintopcommentposts.class.php
===================================================================
--- plugins/trunk/topcommentposts/plugintopcommentposts.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topcommentposts/plugintopcommentposts.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -20,7 +20,7 @@
   
             $this->id = "topcommentposts";
             $this->author = "Mark Wu";
-            $this->desc = "This plugin offers the rank list of articles by number of comments. Usage as follow:<br /><br />Add the following code to footer.template<br /><br /><strong>&lt;p&gt;<br />&lt;strong&gt;Top Comment Post&lt;/strong&gt;&lt;br /&gt;<br />{assign var=posts value=\$topcommentposts-&gt;getTopCommentPosts()}<br />{foreach from=\$posts item=post}<br />{assign var=postid value=\$post-&gt;getId()}<br />&lt;li&gt;&lt;a title=&quot;{\$post-&gt;getText()|truncate:150:&quot;...&quot;|escape}&quot; href=&quot;{\$url-&gt;postLink(\$post)}&quot;&gt;{\$post-&gt;getTopic()}&lt;/a&gt; ({\$topcommentposts-&gt;getArticleCommentCount(\$postid)} ½g)&lt;/li&gt;<br />{/foreach}<br />&lt;/p&gt;</strong> <br /><br />You can use <br /><br /><strong>getTopCommentPosts(5)</strong> to get top 5 comment posts. The default view is BLOG. <br /><strong>getTopCommentPosts(10, 'SITE')</strong> to get top 10 comment posts from SITE view. It is very convenient for pLog Host Provider.<br /><br />";
+            $this->desc = "This plugin offers the rank list of articles by number of comments.";
   
             $config =& Config::getConfig();
             $this->prefix = $config->getValue('db_prefix');
@@ -36,9 +36,9 @@
 			$this->registerAdminAction( "updateTopCommentPostsConfig", "PluginTopCommentPostsUpdateConfigAction" );
 			
 			$menu =& Menu::getMenu();
-			if( !$menu->entryExists( "/menu/controlCenter/manageTopActivities" ))						
-				$this->addMenuEntry( "/menu/controlCenter", "manageTopActivities", "", "", true, false );			
-            $this->addMenuEntry( "/menu/controlCenter/manageTopActivities", "TopCommentPosts", "?op=topcommentposts", "" );            
+			if( !$menu->entryExists( "/menu/controlCenter/manageTopPlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageTopPlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageTopPlugins", "TopCommentPosts", "?op=topcommentposts", "" );            
 		}
 
 		function register()

Added: plugins/trunk/topcommentposts/readme.txt
===================================================================
--- plugins/trunk/topcommentposts/readme.txt	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topcommentposts/readme.txt	2005-01-23 16:48:06 UTC (rev 804)
@@ -0,0 +1,25 @@
+Plugin: Top Comment Posts
+Author: Mark Wu
+Release Date: 2005/01/23
+Version: 1.0
+
+This plugin offers the rank list of articles by number of comments. Usage as follow:
+
+You can use:
+1. $topcommentposts->isEnabled() to check the plugin is enabled or not. 
+2. $topcommentposts->getTopCommentPosts( $maxPosts , $based ) to get the top comment posts.
+
+Where:
+1. $maxPosts is the the max posts you want to show. Default is 10.
+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()}
+<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>
+{/foreach}
+</ul>    
+{/if}
\ No newline at end of file

Modified: plugins/trunk/topcommentvisitors/class/action/plugintopcommentvisitorsupdateconfigaction.class.php
===================================================================
--- plugins/trunk/topcommentvisitors/class/action/plugintopcommentvisitorsupdateconfigaction.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topcommentvisitors/class/action/plugintopcommentvisitorsupdateconfigaction.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -36,7 +36,7 @@
 		        
 		function perform()
 		{
-            // and check which smiley set we should be using, or if none, then the default one
+            // // update the plugin configurations to blog setting
 			$blogSettings = $this->_blogInfo->getSettings();
             $blogSettings->setValue( "plugin_topcommentvisitors_enabled", $this->_pluginEnabled );
             $blogSettings->setValue( "plugin_topcommentvisitors_maxvisitors", $this->_maxVisitors );

Modified: plugins/trunk/topcommentvisitors/plugintopcommentvisitors.class.php
===================================================================
--- plugins/trunk/topcommentvisitors/plugintopcommentvisitors.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topcommentvisitors/plugintopcommentvisitors.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -18,7 +18,7 @@
   
             $this->id = "topcommentvisitors";
             $this->author = "Mark Wu";
-            $this->desc = "<p>This plugin offers the rank list of visitors by number of comments. Usage as follow:<br /><br />Add the following code to footer.template<br /><br /><strong>&lt;p&gt;<br />&lt;strong&gt;Top Comment Visitors&lt;/strong&gt;&lt;br /&gt;<br />{assign var=visitors value=\$topcommentvisitors-&gt;getTopCommentVisitors()}<br />{foreach from=\$visitors item=visitor}<br />&lt;li class=&quot;comment-bullet&quot;&gt;&lt;a title=&quot;{\$visitor.user_name}&quot; href=&quot;{\$visitor.user_url}&quot;&gt;{\$visitor.user_name}&lt;/a&gt; ({\$visitor.user_count})&lt;/li&gt;<br />{/foreach}<br />&lt;/p&gt;</strong><br /><br />You can use <br /><br /><strong>getTopCommentVisitors(5)</strong> to get top 5 comment visitors. The default view is BLOG. <br /><strong>getTopCommentVisitors(10, 'SITE')</strong> to get top 10 comment visitors from SITE view. It is very convenient for pLog Host Provider.<br /><br /></p><br />";
+            $this->desc = "This plugin offers the rank list of visitors by number of comments.";
   
             $config =& Config::getConfig();
             $this->prefix = $config->getValue('db_prefix');
@@ -36,9 +36,9 @@
 			$this->registerAdminAction( "updateTopCommentVisitorsConfig", "PluginTopCommentVisitorsUpdateConfigAction" );
 			
 			$menu =& Menu::getMenu();
-			if( !$menu->entryExists( "/menu/controlCenter/manageTopActivities" ))						
-				$this->addMenuEntry( "/menu/controlCenter", "manageTopActivities", "", "", true, false );			
-            $this->addMenuEntry( "/menu/controlCenter/manageTopActivities", "TopCommentVisitors", "?op=topcommentvisitors", "" );            
+			if( !$menu->entryExists( "/menu/controlCenter/manageTopPlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageTopPlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageTopPlugins", "TopCommentVisitors", "?op=topcommentvisitors", "" );            
 		}
 
 		function register()

Added: plugins/trunk/topcommentvisitors/readme.txt
===================================================================
--- plugins/trunk/topcommentvisitors/readme.txt	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topcommentvisitors/readme.txt	2005-01-23 16:48:06 UTC (rev 804)
@@ -0,0 +1,25 @@
+Plugin: Top Comment Visitors
+Author: Mark Wu
+Release Date: 2005/01/23
+Version: 1.0
+
+This plugin offers the rank list of articles by number of comments. Usage as follow:
+
+You can use:
+1. $topcommentvisitors->isEnabled() to check the plugin is enabled or not. 
+2. $topcommentvisitors->getTopCommentVisitors( $maxVisitors , $based ) to get the top comment visitors.
+
+Where:
+1. $maxVisitors is the the max visitors you want to show. Default is 10.
+2. $based is return the site-wide or blog-wide visitors. "BLOG" means blog-wide, and "SITE" means site-wide. Default is "BLOG".
+
+Example:
+{if $topcommentvisitors->isEnabled()}
+<h2>Top Comment Visitors</h2>
+<ul>  
+{assign var=commentvisitors value=$topcommentvisitors->getTopCommentVisitors()}
+{foreach from=$commentvisitors item=commentvisitor}
+<li><a href="{$commentvisitor.user_url}">{$commentvisitor.user_name} ({$commentvisitor.user_count})</a></li>
+{/foreach}
+</ul>    
+{/if}
\ No newline at end of file

Modified: plugins/trunk/topreadposts/class/action/plugintopreadpostsupdateconfigaction.class.php
===================================================================
--- plugins/trunk/topreadposts/class/action/plugintopreadpostsupdateconfigaction.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topreadposts/class/action/plugintopreadpostsupdateconfigaction.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -36,7 +36,7 @@
 		        
 		function perform()
 		{
-            // and check which smiley set we should be using, or if none, then the default one
+            // // update the plugin configurations to blog setting
 			$blogSettings = $this->_blogInfo->getSettings();
             $blogSettings->setValue( "plugin_topreadposts_enabled", $this->_pluginEnabled );
             $blogSettings->setValue( "plugin_topreadposts_maxposts", $this->_maxPosts );

Modified: plugins/trunk/topreadposts/plugintopreadposts.class.php
===================================================================
--- plugins/trunk/topreadposts/plugintopreadposts.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topreadposts/plugintopreadposts.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -20,7 +20,7 @@
   
             $this->id = "topreadposts";
             $this->author = "Mark Wu";
-            $this->desc = "This plugin offers the rank list of articles by number of read. Usage as follow:<br /><br />Add the following code to footer.template<br /><br /><strong>&lt;p&gt;<br />&lt;strong&gt;Top Read Posts&lt;/strong&gt;&lt;br /&gt;<br />{assign var=posts value=\$topreadposts-&gt;getTopReadPosts()}<br />{foreach from=\$posts item=post}<br />&lt;li&gt;&lt;a title=&quot;{\$post-&gt;getText()|truncate:150:&quot;...&quot;|escape}&quot; href=&quot;{\$url-&gt;postLink(\$post)}&quot;&gt;{\$post-&gt;getTopic()}&lt;/a&gt; ({\$post-&gt;getNumReads()} Times)&lt;/li&gt;<br />{/foreach}<br />&lt;/p&gt;</strong> <br /><br />You can use <br /><br /><strong>getTopReadPosts(5)</strong> to get top 5 read posts. The default view is BLOG. <br /><strong>getTopReadPosts(10, 'SITE')</strong> to get top 10 read posts from SITE view. It is very convenient for pLog Host Provider.<br /><br />";  
+            $this->desc = "This plugin offers the rank list of articles by number of read.";  
             $config =& Config::getConfig();
             $this->prefix = $config->getValue('db_prefix');
             
@@ -35,9 +35,9 @@
 			$this->registerAdminAction( "updateTopReadPostsConfig", "PluginTopReadPostsUpdateConfigAction" );
 			
 			$menu =& Menu::getMenu();
-			if( !$menu->entryExists( "/menu/controlCenter/manageTopActivities" ))						
-				$this->addMenuEntry( "/menu/controlCenter", "manageTopActivities", "", "", true, false );			
-            $this->addMenuEntry( "/menu/controlCenter/manageTopActivities", "TopReadPosts", "?op=topreadposts", "" );            
+			if( !$menu->entryExists( "/menu/controlCenter/manageTopPlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageTopPlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageTopPlugins", "TopReadPosts", "?op=topreadposts", "" );            
 		}
 
 		function register()

Added: plugins/trunk/topreadposts/readme.txt
===================================================================
--- plugins/trunk/topreadposts/readme.txt	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/topreadposts/readme.txt	2005-01-23 16:48:06 UTC (rev 804)
@@ -0,0 +1,25 @@
+Plugin: Top Read Posts
+Author: Mark Wu
+Release Date: 2005/01/23
+Version: 1.0
+
+This plugin offers the rank list of articles by number of comments. Usage as follow:
+
+You can use:
+1. $topreadposts->isEnabled() to check the plugin is enabled or not. 
+2. $topreadposts->getTopReadPosts( $maxPosts , $based ) to get the top read posts.
+
+Where:
+1. $$maxPosts is the the max posts you want to show. Default is 10.
+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()}
+<h2>Top Read Posts</h2>
+<ul>  
+{assign var=readposts value=$topreadposts->getTopReadPosts()}
+{foreach from=$readposts item=readpost}
+<li><a href="{$url->postLink($readpost)}">{$readpost->getTopic()} ({$readpost->getNumReads()} Times)</a></li>
+{/foreach}
+</ul>    
+{/if}
\ No newline at end of file

Modified: plugins/trunk/toptrackbackposts/class/action/plugintoptrackbackpostsupdateconfigaction.class.php
===================================================================
--- plugins/trunk/toptrackbackposts/class/action/plugintoptrackbackpostsupdateconfigaction.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/toptrackbackposts/class/action/plugintoptrackbackpostsupdateconfigaction.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -36,7 +36,7 @@
 		        
 		function perform()
 		{
-            // and check which smiley set we should be using, or if none, then the default one
+            // // update the plugin configurations to blog setting
 			$blogSettings = $this->_blogInfo->getSettings();
             $blogSettings->setValue( "plugin_toptrackbackposts_enabled", $this->_pluginEnabled );
             $blogSettings->setValue( "plugin_toptrackbackposts_maxposts", $this->_maxPosts );

Modified: plugins/trunk/toptrackbackposts/plugintoptrackbackposts.class.php
===================================================================
--- plugins/trunk/toptrackbackposts/plugintoptrackbackposts.class.php	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/toptrackbackposts/plugintoptrackbackposts.class.php	2005-01-23 16:48:06 UTC (rev 804)
@@ -20,7 +20,7 @@
   
             $this->id = "toptrackbackposts";
             $this->author = "Mark Wu";
-            $this->desc = "This plugin offers the rank list of articles by number of trackbacks. Usage as follow:<br /><br />Add the following code to footer.template<br /><br /><strong>&lt;p&gt;<br />&lt;strong&gt;Top Trackback Post&lt;/strong&gt;&lt;br /&gt;<br />{assign var=posts value=\$toptrackbackposts-&gt;getTopTrackbackPosts()}<br />{foreach from=\$posts item=post}<br />{assign var=postid value=\$post-&gt;getId()}<br />&lt;li&gt;&lt;a title=&quot;{\$post-&gt;getText()|truncate:150:&quot;...&quot;|escape}&quot; href=&quot;{\$url-&gt;postLink(\$post)}&quot;&gt;{\$post-&gt;getTopic()}&lt;/a&gt; ({\$toptrackbackposts-&gt;getArticleTrackbackCount(\$postid)} ½g)&lt;/li&gt;<br />{/foreach}<br />&lt;/p&gt;</strong> <br /><br />You can use <br /><br /><strong>getTopTrackbackPosts(5)</strong> to get top 5 trackback posts. The default view is BLOG. <br /><strong>getTopTrackbackPosts(10, 'SITE')</strong> to get top 10 trackback posts from SITE view. It is very convenient for pLog Host Provider.<br /><br />";
+            $this->desc = "This plugin offers the rank list of articles by number of trackbacks.";
   
             $config =& Config::getConfig();
             $this->prefix = $config->getValue('db_prefix');
@@ -36,9 +36,9 @@
 			$this->registerAdminAction( "updateTopTrackbackPostsConfig", "PluginTopTrackbackPostsUpdateConfigAction" );
 			
 			$menu =& Menu::getMenu();
-			if( !$menu->entryExists( "/menu/controlCenter/manageTopActivities" ))						
-				$this->addMenuEntry( "/menu/controlCenter", "manageTopActivities", "", "", true, false );			
-            $this->addMenuEntry( "/menu/controlCenter/manageTopActivities", "TopTrackbackPosts", "?op=toptrackbackposts", "" );            
+			if( !$menu->entryExists( "/menu/controlCenter/manageTopPlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageTopPlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageTopPlugins", "TopTrackbackPosts", "?op=toptrackbackposts", "" );            
 		}
 
 		function register()

Added: plugins/trunk/toptrackbackposts/readme.txt
===================================================================
--- plugins/trunk/toptrackbackposts/readme.txt	2005-01-23 16:46:34 UTC (rev 803)
+++ plugins/trunk/toptrackbackposts/readme.txt	2005-01-23 16:48:06 UTC (rev 804)
@@ -0,0 +1,25 @@
+Plugin: Top Trackback Posts
+Author: Mark Wu
+Release Date: 2005/01/23
+Version: 1.0
+
+This plugin offers the rank list of articles by number of comments. Usage as follow:
+
+You can use:
+1. $toptrackbackposts->isEnabled() to check the plugin is enabled or not. 
+2. $toptrackbackposts->getTopTrackbackPosts( $maxPosts , $based ) to get the top trackback posts.
+
+Where:
+1. $$maxPosts is the the max posts you want to show. Default is 10.
+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 $toptrackbackposts->isEnabled()}
+<h2>Top Trackback Posts</h2>
+<ul>  
+{assign var=trackbackposts value=$toptrackbackposts->getTopTrackbackPosts()}
+{foreach from=$trackbackposts item=trackbackpost}
+<li><a href="{$url->postLink($trackbackpost)}">{$trackbackpost->getTopic()} ({$trackbackpost->getNumTrackbacks()} ¦¸)</a></li>
+{/foreach}
+</ul>    
+{/if}
\ No newline at end of file




More information about the pLog-svn mailing list