LifeType 1.0/Plugins/karma |
出自LifeType 中文文件計畫
名稱: karma
版本: 1.0
下載連結: http://prdownloads.sourceforge.net/lifetype/1.1_karma.zip?download
程式授權: GPL
作者: Oscar Renalias
用途
This plugin offers karma rating for posts and allows your readers to rate up or down posts and even to have them removed from the front page automatically whenever they reach a certain amount of negative votes.
設定
After unpacking the plugin, make sure to move the karma.php file to the root folder of pLog, so that it appears at the same level as index.php or admin.php. If not, the plugin will not work and you will get repeated 404 errors when trying to place votes for a post.
The plugin uses 2 custom post fields in order to store the information about votes, so it is not advisable to remove these fields:
- positiveVotes
- negativeVotes
Posts that have been moderated down will be marked with a custom status called "Karma Moderated down". In order to change either the status of the moderation status of the post or the number of votes it has received, the only thing we need to is to edit the post and save it. However, this is not recommended.
The following changes to the postandcomments.template files are needed in order to display the correct links to allow users to give positive or negative votes to a post:
:: {$locale->tr("karma")} (<a href="{$karma->getPositiveUrl($post)}">+{$positiveKarma}</a>/<a href="{$karma->getNegativeUrl($post)}">-{$negativeKarma}</a>)
It is also possible to make the plugin generate a page including all the moderated down articles. In order to create a link to that page, add the following Smarty code anywhere in your templates:
<li><a title="{$locale->tr("karma_moderated_down_articles")}" href="{$karma->pluginTemplatePage()}">{$locale->tr("karma_moderated_down_articles")}</a></li>
The template used to generate this page can be found under plugins/karma/templates/moderateddownlist.template. The same template file is used for all blogs.