| Blogging Tools » MediaWiki talk:Userinvalidcssjstitle » MediaWiki talk:Exif-componentsconfiguration » Patrol-log-header » LifeType 1.0/Plugins/karma |
出自LifeType 中文文件計畫
(修訂版本間差異)
(→設定) |
|||
| (5個中途的修訂版本沒有顯示。) | |||
| 第1行: | 第1行: | ||
| - | {{ | + | __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] | ||
| + | |||
| + | = 用途 = | ||
| + | 本外掛程式提供文章評鑑功能,允許你的讀者評鑑文章,甚至當文章的負向評鑑值達一定數量時,讓文章自動從前端下架。 | ||
| + | |||
| + | = 設定 = | ||
| + | |||
| + | 解壓縮本外掛程式後,請確認已將 karma.php 檔案移到 LifeType 的根目錄下,以讓它與 index.php 或 admin.php 在同一層。否則,本外掛程式將不會執行,當你評鑑文章時,將會重複出現 404 錯誤。 | ||
| + | |||
| + | 本外掛程式使用 2 個自訂欄位,以便儲存評鑑資訊,所以不建議移除下列欄位: | ||
| + | |||
| + | *positiveKarma | ||
| + | *negativeKarma | ||
| + | |||
| + | 被下架的文章狀態將會被標示為「下架(Karma Moderated down)」。不論是想改變文章的狀態或評鑑分數,唯一需要做的是去編輯該篇文章,並儲存它。然而,這是不被建議的。 | ||
| + | |||
| + | 為讓使用者對文章給予正向或負向評鑑,必須將下列語法加到 '''postandcomments.template''': | ||
| + | |||
| + | <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> | ||
| + | |||
| + | 本外掛程式也可產生內含所有下架文章的網頁。你可將下列語法加到模版中,以便連結該網頁。 | ||
| + | |||
| + | <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> | ||
| + | |||
| + | 本外掛程式的模版可在 plugins/karma/templates/moderateddownlist.template 找到。此模版檔案是被所有網誌所共用。 | ||
| + | |||
| + | = 注意事項 = | ||
| + | |||
| + | [[Category:Plugins]] | ||
當前修訂版本
名稱: karma
版本: 1.0
下載連結: http://prdownloads.sourceforge.net/lifetype/1.1_karma.zip?download
程式授權: GPL
作者: Oscar Renalias
用途
本外掛程式提供文章評鑑功能,允許你的讀者評鑑文章,甚至當文章的負向評鑑值達一定數量時,讓文章自動從前端下架。
設定
解壓縮本外掛程式後,請確認已將 karma.php 檔案移到 LifeType 的根目錄下,以讓它與 index.php 或 admin.php 在同一層。否則,本外掛程式將不會執行,當你評鑑文章時,將會重複出現 404 錯誤。
本外掛程式使用 2 個自訂欄位,以便儲存評鑑資訊,所以不建議移除下列欄位:
- positiveKarma
- negativeKarma
被下架的文章狀態將會被標示為「下架(Karma Moderated down)」。不論是想改變文章的狀態或評鑑分數,唯一需要做的是去編輯該篇文章,並儲存它。然而,這是不被建議的。
為讓使用者對文章給予正向或負向評鑑,必須將下列語法加到 postandcomments.template:
:: {$locale->tr("karma")} (<a href="{$karma->getPositiveUrl($post)}">+{$positiveKarma}</a>/<a href="{$karma->getNegativeUrl($post)}">-{$negativeKarma}</a>)
本外掛程式也可產生內含所有下架文章的網頁。你可將下列語法加到模版中,以便連結該網頁。
<li><a title="{$locale->tr("karma_moderated_down_articles")}" href="{$karma->pluginTemplatePage()}">{$locale->tr("karma_moderated_down_articles")}</a></li>
本外掛程式的模版可在 plugins/karma/templates/moderateddownlist.template 找到。此模版檔案是被所有網誌所共用。

