[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><p><br />{assign var=comments value=\$recentcomments->getRecentComments()}<br />{foreach from=\$comments item=comment}<br />{assign var=postid value=\$comment->getArticleId()}<br />{assign var=post value=\$recentcomments->getCommentArticle(\$postid)}<br />{if \$comment->getUserUrl()}<br /><li><a title="{\$comment->getText()|truncate:150:"..."|escape}" href="{\$comment->getUserUrl()}">{\$comment->getUsername()}</a> &gt;&gt; <a href="{\$url->postPermalink(\$post)}">{\$post->getTopic()}</a></li> <br />{else}<br /><li><a title="{\$comment->getText()|truncate:150:"..."|escape}" href="{\$url->postPermalink(\$post)}">{\$comment->getUsername()}</a> &gt;&gt; <a href="{\$url->postPermalink(\$post)}">{\$post->getTopic()}</a></li><br />{/if}<br />{/foreach}<br /></p></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><p><br />{assign var=trackbacks value=\$recenttrackbacks->getRecentTrackbacks()}<br />{foreach from=\$trackbacks item=trackback}<br />{assign var=postid value=\$trackback->getArticleId()}<br />{assign var=post value=\$recenttrackbacks->getTrackbackArticle(\$postid)}<br /><li><a title="{\$trackback->getTitle()}" href="{\$trackback->getUrl()}">{\$trackback->getBlogName()}</a> &gt;&gt; <a href="{\$url->postPermalink(\$post)}">{\$post->getTopic()}</a></li><br />{/foreach}<br /></p></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><p><br /><strong>Top Comment Post</strong><br /><br />{assign var=posts value=\$topcommentposts->getTopCommentPosts()}<br />{foreach from=\$posts item=post}<br />{assign var=postid value=\$post->getId()}<br /><li><a title="{\$post->getText()|truncate:150:"..."|escape}" href="{\$url->postLink(\$post)}">{\$post->getTopic()}</a> ({\$topcommentposts->getArticleCommentCount(\$postid)} ½g)</li><br />{/foreach}<br /></p></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><p><br /><strong>Top Comment Visitors</strong><br /><br />{assign var=visitors value=\$topcommentvisitors->getTopCommentVisitors()}<br />{foreach from=\$visitors item=visitor}<br /><li class="comment-bullet"><a title="{\$visitor.user_name}" href="{\$visitor.user_url}">{\$visitor.user_name}</a> ({\$visitor.user_count})</li><br />{/foreach}<br /></p></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><p><br /><strong>Top Read Posts</strong><br /><br />{assign var=posts value=\$topreadposts->getTopReadPosts()}<br />{foreach from=\$posts item=post}<br /><li><a title="{\$post->getText()|truncate:150:"..."|escape}" href="{\$url->postLink(\$post)}">{\$post->getTopic()}</a> ({\$post->getNumReads()} Times)</li><br />{/foreach}<br /></p></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><p><br /><strong>Top Trackback Post</strong><br /><br />{assign var=posts value=\$toptrackbackposts->getTopTrackbackPosts()}<br />{foreach from=\$posts item=post}<br />{assign var=postid value=\$post->getId()}<br /><li><a title="{\$post->getText()|truncate:150:"..."|escape}" href="{\$url->postLink(\$post)}">{\$post->getTopic()}</a> ({\$toptrackbackposts->getArticleTrackbackCount(\$postid)} ½g)</li><br />{/foreach}<br /></p></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