首頁
新聞
功能
下載
開發
支援
論壇
文件
搜尋
關於我們
LifeType 1.0/Plugins/karma
原始碼
出自LifeType 中文文件計畫
LifeType 1.0/Plugins/karma
的原始碼
跳轉到:
導航
,
搜尋
根據以下的原因,您並無權限去做編輯頁面:
您剛才的請求只有
用戶
使用者組的使用者才能使用。
你可以檢視並複製本頁面的原始碼。
__NOTOC__ '''名稱''': karma '''版本''': 1.0 '''下載連結''': [http://prdownloads.sourceforge.net/lifetype/1.1_karma.zip?download http://prdownloads.sourceforge.net/lifetype/1.1_karma.zip?download] '''程式授權''': GPL '''作者''': [http://www.renalias.net/ 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: <smarty> {if !empty($karma)} {if $karma->isEnabled()} {assign var="positiveKarma" value=$post->getField("positiveKarma")} {if $positiveKarma == ""}{assign var="positiveKarma" value=0}{/if} {assign var="negativeKarma" value=$post->getField("negativeKarma")} {if $negativeKarma == ""}{assign var="negativeKarma" value=0}{/if} :: {$locale->tr("karma")} (<a href="{$karma->getPositiveUrl($post)}">+{$positiveKarma}</a>/<a href="{$karma->getNegativeUrl($post)}">-{$negativeKarma}</a>) {/if} {/if} </smarty> 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: <smarty> {if !empty($karma)} {if $karma->isEnabled()} <li><a title="{$locale->tr("karma_moderated_down_articles")}" href="{$karma->pluginTemplatePage()}">{$locale->tr("karma_moderated_down_articles")}</a></li> {/if} {/if} </smarty> 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. = 注意事項 = 其他需要使用者特別注意的事項,或是告知潛在的問題。 [[Category:Plugins]]
返回到
LifeType 1.0/Plugins/karma
。
個人工具
登入
檢視
頁面
討論
原始碼
歷史
搜尋
導航
首頁
社群入口
現時事件
近期變動
隨機頁面
使用說明
工具箱
鏈入頁面
相關頁面修訂記錄
特殊頁面