LifeType 1.0/Plugins/karma |
出自LifeType 中文文件計畫
名稱: karma
版本: 1.0
下載連結: http://prdownloads.sourceforge.net/lifetype/1.1_karma.zip?download
程式授權: GPL
作者: Oscar Renalias
用途
本外掛程式提供文章評鑑功能,允許你的讀者評鑑文章,甚至當文章的負向評鑑值達一定數量時,讓文章自動從前端下架。
設定
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.