歡迎光臨, 訪客. 請先 登入註冊一個帳號.
三月 28, 2024, 05:16:41 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  外掛程式  |  karma安裝一問 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: karma安裝一問  (閱讀 7003 次)
sadspat
新手見習
*
文章: 2


檢視個人資料
« 於: 三月 25, 2006, 05:44:05 下午 »

我已照著readme的指示更改post.template
但卻一直無法使用評鑑的功能,總是顯示The requested URL /life/karma.php was not found on this server.
問題出在哪?我上哪找karma.php啊~(已經弄一天了><)
各位前輩救救我呀~
如下
引用
<!-- {$url->postTrackbackLink($post)} -->
<h3>{$post->getTopic()}</h3>
{assign var="postDate" value=$post->getDateObject()}
{assign var="postOwner" value=$post->getUserInfo()}
<span class="date">{$postOwner->getUsername()} | {$locale->formatDate($postDate,"%d %B, %Y %H:%M")}</span>
<p>
 {$post->getText()}
</p>
<div class="footer">
   {foreach name=categories from=$post->getCategories() item=postcategory}
     <a href="{$url->categoryLink($postcategory)}">{$postcategory->getName()}</a>
     {if !$smarty.foreach.categories.last}, {/if}
   {/foreach}
:: <a href="{$url->postPermalink($post)}">{$locale->tr("comment on this")} ({$post->getTotalComments()})</a> :: <a title="{$locale->tr("permalink_title")}" href="{$url->postPermalink($post)}">{$locale->tr("permalink")}</a> :: <a href="{$url->postTrackbackStatsLink($post)}">{$locale->tr("trackbacks")} ({$post->getNumTrackbacks()})</a>
{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}
</div>
已記錄
bibicall
LifeType 中文發展團隊
超級會員
*****
文章: 640


我是豬老大


檢視個人資料 個人網站
« 回覆文章 #1 於: 三月 25, 2006, 09:19:50 下午 »

你有仔細依照 readme 說的步驟作嗎?

1. Configurate your Host Block plugin in your pLog control center
2. Modify you post.template with the follow code to get karma link:
程式碼:
{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}
3. Modify your header.template or footer.template to get unmoderated post link:
程式碼:
{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}

又,karma資料夾是否有完整上傳到 plugin下面?
已記錄

我的虛擬主機基本資料如下
Operating system: Linux
Apache version: 1.3.37
PHP version: 4.4.4
MySQL version: 4.1.21-standard
sadspat
新手見習
*
文章: 2


檢視個人資料
« 回覆文章 #2 於: 三月 26, 2006, 03:07:37 上午 »

確實已照著做了
有出現+0、-0 不過按下去就是顯示Not Found
難道是貼錯地方了?

下午兩點更新
--------------------------------------------------------
剛剛用了很奇怪的方法、
就是將plog根目錄下的index.php
複製一份改為karma.php並放在plog的根目錄
結果竟然可以執行了
這是什麼原理呢?(還是原本就要這麼做啊?)
« 最後編輯時間: 三月 26, 2006, 01:13:35 下午 由 sadspat » 已記錄
頁: [1]
LifeType 中文開發論壇  |  開發  |  外掛程式  |  karma安裝一問 « 上篇主題 下篇主題 »
    前往: