Recent Trackbacks

Plugin 使用說明 引用 (0)

Plugin: Recent Trackbacks
Author: Mark Wu
Release Date: 2007/04/06
Version: 20070406

This plugin offers the most recently article trackbacks (for regular
templates and an RSS feed). Usage as follow:

You can use:
1. $recenttrackbacks->isEnabled() to check the plugin is enabled or not.
2. $recenttrackbacks->getRecentTrackbacks() to get the recent trackbacks.
3. $recenttrackbacks->getRssFeedUrl() to get the URL to the recent trackbacks feed for the current blog

Example:
Add the following code to your template file:
{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()}:</b>{$trackback->getTitle()}</a></li>
{/foreach}
</ul>
{/if}

Recent Comments

Plugin 使用說明 引用 (0)

Plugin: Recent Comments
Author: Mark Wu
Release Date: 2007/04/06
Version: 20070406

This plugin offers the most recently article comments (for regular
templates and an RSS feed). Usage as follow:

You can use:
1. $recentcomments->isEnabled() to check the plugin is enabled or not.
2. $recentcomments->getRecentComments() to get the recent comments.
3. $recentcomments->getRssFeedUrl() to get the URL to the recent comments feed for the current blog

Example:
Add the following code to your template file:
{if $recentcomments->isEnabled()}
<h2>Recent Comments [<a href="{$recentcomments->getRssFeedUrl()}">rss</a>]</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()}:</b>{$comment->getText()|truncate:100:"..."|strip_tags}</a></li>
{/foreach}
</ul>           
{/if}

Plugin: Top Read Posts

Plugin 使用說明 引用 (0)

Plugin: Top Read Posts
Author: Mark Wu
Release Date: 2006/11/07

This plugin offers the rank list of articles by number of reads. 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 && $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}

Design by N.Design Studio
Powered by Lifetype. Template adapted by Russian Lifetype