AL8 Forum
   登錄註冊幫助


標題: [D4.0 & 4.1] (D4.1&D5.X)7-30修正-BBS2ME感謝卡V2.0版(感謝作者,THANK U功能)(簡體+繁體)
 阿狗狗
 0025256
Rank: 4Rank: 4Rank: 4Rank: 4
點擊查看 阿狗狗 的詳細資料

頭銜: Lord

帖子: 597

精華: 0

積分: 6574 點

現金: 158 元

存款: 0 元

閱讀權限: 25

註冊: 2005-7-2

狀態: 離線
 
發表於 2006-7-28 09:39  資料  個人空間  短消息  加為好友 
(D4.1&D5.X)7-30修正-BBS2ME感謝卡V2.0版(感謝作者,THANK U功能)(簡體+繁體)

7/28  21:17以前下載者 修正

下載附件 discuz_plugin_thank2.0_7-28更新檔(big5+gbk) 更新檔 重新導入插件數據


打開plugins/thank.inc.php


$allowpostreply = ((!$fpost['closed'] && !checkautoclose()) || $forum['ismoderator']) && ((!$forum['replyperm'] && $allowreply) || ($forum['replyperm'] && forumperm($forum['replyperm'])) || $forum['allowreply']);


改成

$allowpostreply = (!$fpost['closed'] || $forum['ismoderator']) && ((!$forum['replyperm'] && $allowreply) || ($forum['replyperm'] && forumperm($forum['replyperm'])) || $forum['allowreply']);


=======================
7/29 修正解販賣文章

viewthread.php


$query2 = $db->query("SELECT fromuser,fromuseruid FROM {$tablepre}thanklog WHERE tid='$tid' and fromuseruid='$discuz_uid'");
$thanknopay=$th['thanknopay'];


改成

$thanknopay=$th['thanknopay'];
if($thanknopay==true){
$query2 = $db->query("SELECT fromuser,fromuseruid FROM {$tablepre}thanklog WHERE tid='$tid' and fromuseruid='$discuz_uid'");
}





                        }elseif($db->result($query2, 0) && $thanknopay==true) {
              $db->query("UPDATE {$tablepre}threads SET price='-2' WHERE tid='$tid'");
              showmessage("本主題使用感謝卡後重新進入可免費查看。","viewthread.php?tid=$tid");

                

刪除



然後下面

if(!$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
改為
if(!$forum['ismoderator'] && $thread['authorid'] != $discuz_uid  && !$db->result($query2, 0)) {



=============7/30 修正 強制使用感謝卡解除隱藏修改方式======

---如果限制只能用感謝卡解開隱藏帖---


$query = $db->query("SELECT pid FROM {$tablepre}posts WHERE tid='$tid' AND authorid='$discuz_uid' LIMIT 1");

改成
$query = $db->query("SELECT * FROM {$tablepre}threads WHERE tid='$tid' AND authorid='$discuz_uid' LIMIT 1");


newreply.inc.php

if($subject == '' && $message == '') {

上面加

  if(preg_match("/\[hide\].+?\[\/hide\]/is", preg_replace("/(\[code\].*\[\/code\])/is", '', $message))) {
                showmessage('抱歉!回覆不可使用隱藏代碼,請返回修改。');
        }



以上主題作者可以看到自己的隱藏帖 也強制使用感謝卡才能解除
但是必須強制回覆不能使用隱藏標籤 否則回覆作者自己的隱藏內容自己一樣無法看到



===================7/30 以前下載者 修正==========
thank.htm

<select onchange="change_content('layer1', (this.value*{$th[thank]}))" name="thanks" align="absmiddle" tabindex="1">

改成
<!--{if $th['thank']>0}--><select onchange="change_content('layer1', (this.value*{$th[thank]}))" name="thanks" align="absmiddle" tabindex="1"><!--{else}--><select name="thanks" align="absmiddle" tabindex="1"><!--{/if}-->








請你尊重我的辛勞 再亂改版權  抱歉 我不會再提供任何修改方式以及升級了

1.12 版 下載處
http://www.alan888.com/Discuz/viewthread.php?tid=75852

3.0版下載處
http://www.alan888.com/Discuz/viewthread.php?tid=78970&extra=page%3D1


BBS2ME 感謝卡 V2.0
作者:貓仔(阿狗狗)
功能說明:


v 1.12 功能
1.會員可使用感謝卡 感謝發表主題的作者(回覆無法使用)
2.啟用[扣卡制]時  對方會加感謝卡張數  而你手中的感謝卡也會減少
   當你手中的感謝卡用完時 就無法再使用該功能  必須發帖賺取他人給你的感謝卡
3.使用[購買制]時 對方會增加感謝卡張數 而你手中的感謝卡也不會減少 但是 會扣除購買的總金額
使用感謝卡你可以不用回覆 直接觀看文章  避免為了看文章 而隨意回覆一些沒意義的內容(使用後 該主題 連回覆會一起解開隱藏內容)
4.後台可設置 會員註冊時的初始張數 以及對應的積分擴展值  可把積分加至總積分內  如要使用張數換取積分 則後台可以參考下面範例方式 計算
digestposts*1+extcredits1*1+extcredits2*1+extcredits4*0.02
紅色的地方也就是 50 張換取積分一點 由此累堆(範例中extcredits4為 感謝卡使用的積分擴展值)
5.後台可控制 每篇主題可以使用感謝卡的總數  ,該篇主題如超過設定的總卡數, 後面的人 將無法在該文章中繼續使用感謝卡 避免洗太多積分
6.後台可設置 每一次 每篇主題可以送感謝卡的數量
7.後台短訊通知開關
8.前台管理功能  管理員刪除感謝卡紀錄時 自動退回贈與者送出的感謝卡數及熱心值   扣回接受者的感謝卡數及魅力值 該主題贈送感謝卡者 也取消該主題的免隱藏權限

9.可選擇只能用感謝卡解開隱藏帖


v2.0 功能
後台用戶組使用限制
後台版面使用限制
退卡短訊息通知
愛心排序
感謝卡功能開關
刪帖刪除紀錄
刪除紀錄時可選是否退回卡片或金錢
後台開關使用感謝卡免付費




3.0版已完成功能
1.前台搜尋功能
2.魅力值兌換積分交易功能
3.熱心值兌換功能
4.感謝卡兌換功能
5. .........
[attach]28758[/attach]






====================

V 2.0 全新安裝步驟 (升級者查看後面)

=====================
升級數據庫
CREATE TABLE `cdb_thanklog` (
`id` mediumint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
`fromuser` varchar( 15 ) NOT NULL default '',
`fromuseruid` mediumint( 8 ) NOT NULL ,
`touser` varchar( 15 ) NOT NULL default '',
`asfe` varchar( 8 ) NOT NULL default '',
`score` int( 10 ) NOT NULL default '0',
`tid` varchar( 15 ) NOT NULL default '',
`aswhat` varchar( 100 ) NOT NULL default '',
`logdate` date NOT NULL ,
`touseruid` MEDIUMINT( 8 ) NOT NULL,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;



mysql版本不同 如果出錯無法建立則將
ENGINE=MyISAM
替換成
TYPE=MyISAM



ALTER TABLE `cdb_threads` ADD `thank` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',ADD `thankuser` mediumtext NOT NULL DEFAULT '';
ALTER TABLE `cdb_posts` ADD `thank` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `cdb_members` ADD `thankannex` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',ADD `thankgive` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';

ALTER TABLE `cdb_usergroups` ADD `allowthank` TINYINT( 1 ) NOT NULL DEFAULT '1';
ALTER TABLE `cdb_forums` ADD `allowthank` TINYINT( 1 ) NOT NULL DEFAULT '1';


=========================
反安裝語法

DROP TABLE `cdb_thanklog`;
ALTER TABLE `cdb_threads` DROP `thank`,DROP `thankuser`;
ALTER TABLE `cdb_posts` DROP `thank`;
ALTER TABLE `cdb_members` DROP `thankannex`,DROP `thankgive`;
ALTER TABLE `cdb_usergroups`DROP `allowthank`;
ALTER TABLE `cdb_forums`DROP `allowthank`;

移除相關修改

==========================
discuzcode.func.php



$query = $db->query("SELECT pid FROM {$tablepre}posts WHERE tid='$tid' AND authorid='$discuz_uid' LIMIT 1");


上面加
$query2 = $db->query("SELECT fromuser,fromuseruid FROM {$tablepre}thanklog WHERE tid='$tid' and fromuseruid='$discuz_uid'");





|| $db->result($query, 0)

後面插入
|| $db->result($query2, 0)


---如果限制只能用感謝卡解開隱藏帖---


$query = $db->query("SELECT pid FROM {$tablepre}posts WHERE tid='$tid' AND authorid='$discuz_uid' LIMIT 1");

改成
$query = $db->query("SELECT * FROM {$tablepre}threads WHERE tid='$tid' AND authorid='$discuz_uid' LIMIT 1");


newreply.inc.php

if($subject == '' && $message == '') {

上面加

  if(preg_match("/\[hide\].+?\[\/hide\]/is", preg_replace("/(\[code\].*\[\/code\])/is", '', $message))) {
                showmessage('抱歉!回覆不可使用隱藏代碼,請返回修改。');
        }



以上主題作者可以看到自己的隱藏帖 也強制使用感謝卡才能解除
但是必須強制回覆不能使用隱藏標籤 否則回覆作者自己的隱藏內容自己一樣無法看到


-----------------------------------------------------------




misc.lang.php

'post_hide_reply' =>
'post_hide_reply_hidden' =>

後面內容改為(參考 自行更改)
'post_hide_reply' => '以下內容跟帖回復才能看到(贊助會員以上以及使用感謝卡者除外)',
'post_hide_reply_hidden' => '**** 本內容跟帖回復才可瀏覽 (贊助會員以上以及使用感謝卡者除外)*****',





==============

forumdisplay.php

$thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);



下面加
@require DISCUZ_ROOT.'./forumdata/cache/plugin_thank.php';
$th=$_DPLUGIN['thank']['vars'];
$thfull=$thread['thank'];
$thread['thankuser']=mb_strimwidth($thread['thankuser'], 0, 150, "....");
if($thfull<$th['full'] || $th['full']=='0'){
$thread['thank']=$thread['thank']>0?$thread['thank']="<a href=plugin.php?identifier=thank&module=thank&tid=$thread[tid]><img src='images/common/thanks.gif' title='$thread[thankuser]' align='absmiddle' border='0'></a><font color=red><b> x </b>{$thread['thank']}</font>":'';
}else{
$thread['thank']=$thread['thank']>0?$thread['thank']="<a href=plugin.php?identifier=thank&module=thank&tid=$thread[tid]><img src='images/common/thanks.gif' title='$thread[thankuser]' align='absmiddle' border='0'></a><font color=red><b> x </b></font><font color=blue>full</font>":'';
}




isset($orderby) && in_array($orderby, array('dateline', 'replies', 'views')) ? $forumdisplayadd .=

改為
isset($orderby) && in_array($orderby, array('thank', 'dateline', 'replies', 'views')) ? $forumdisplayadd .=



=======================
forumdisplay.htm



$thread[replies]


後面插入
<br>{$thread['thank']}




<option value="lastpost" $check[lastpost]>{lang order_lastpost}</option>

上面加
<option value="thank" $check[thank]>感謝卡數</option>





{lang replies}

後面插入
<img src='./images/common/thanks.gif'><br>
[<a href='forumdisplay.php?fid=$fid&filter=$filter&orderby=thank&ascdesc=DESC'>
<img src='./images/common/s_desc.gif' border='0' title='依感謝卡數降序排列'></a>&nbsp<b>/</b>&nbsp
<a href='forumdisplay.php?fid=$fid&filter=$filter&orderby=thank&ascdesc=ASC'>
<img src='./images/common/s_asc.gif' border='0' title='依感謝卡數升序排列'></a>]





=========================
viewthread.htm

找(2處)
<!--{if $allowpostreply || !$discuz_uid}--> <a href="post.php?action=reply&fid=$fid&tid=$tid&extra=$extra"><img src="{IMGDIR}/reply.gif" border="0"></a><!--{/if}-->



5.0找
<!--{if $allowpostreply || !$discuz_uid}--> <a href="post.php?action=reply&fid=$fid&tid=$tid&extra=$extra"><img src="{IMGDIR}/reply.gif" border="0" alt="" /></a><!--{/if}-->


後面加
<!--{if $discuz_user && $allowpostreply}-->&nbsp;<a href="plugin.php?identifier=thank&module=thank&action=thank&tid=$tid&page=$page"><img src="{IMGDIR}/Thank.gif" border="0" alt="使用感謝卡 免回覆隱藏帖<!--{if $thanknopay==true}-->以及免付費直接查看文章<!--{/if}-->"></a><!--{/if}-->




{lang subject}: $thread[subject]</td><td width="35%" align="right" nowrap>


5.0找
<input name="allsearchsubmit" type="submit" style="height: 1.8em" value="{lang qihoo_search}">
<!--{/if}-->



後面插入
<!--{if $thread['thank']}-->
$thread['thank']<a href="###" onclick="thanku_collapse('thanku');">&nbsp&nbsp查看 [感謝] 名單 &nbsp&nbsp<img id="thanku_img" src="{IMGDIR}/$thanku[collapseimg]" border="0"></a>
<!--{/if}-->



帖子下面加入小按鍵

<span style="font-size: {MSGFONTSIZE}">$post[message]</span>


5.0找
<div style="font-size: {MSGFONTSIZE}">$post[message]</div>


加入
        <!--{if $discuz_user && $post['authorid'] && $post[number]== 1 && $allowpostreply}--><br><a href="plugin.php?identifier=thank&module=thank&action=thank&tid=$tid&page=$page"><img src="{IMGDIR}/thanks.gif" border="0" align="absmiddle" alt="給這篇貼子作者送感謝卡!使用感謝卡 免回覆隱藏帖<!--{if $thanknopay==true}-->以及免付費直接查看文章<!--{/if}-->"></a><!--{/if}-->




type').value+'&searchsubmit=yes');" value="{lang qihoo_search}">
<!--{/if}-->
</td></tr>
</table>


5.0找
$thread[subject]
</div>
</td></tr>



下面加
<tbody id="thanku" style="$collapse[thanku]">
<tr><td class="altbg1">
<fieldset><legend><img src='images/common/thanks.gif' title='感謝卡' align=absmiddle border=0>[感謝名單]</legend>
<!--{if $thread['thankuser']==''}-->暫無感謝者!!<!--{else}-->$thread['thankuser']<!--{/if}--></fieldset>
</td></tr>
</tbody>





==========================
有安裝作者美化框者找
$credit[title]: $post[$key] $credit[unit]<br><!--{/loop}-->

改為

$credit[title]: $post[$key] $credit[unit]<!--{if $key==$ext}-->&nbsp<img src='images/common/thanks.gif' title='手中擁有感謝卡張數'><!--{/if}--><br>
<!--{/loop}-->



然後

下面加

<img src="images/cardframe/biao-18.gif" width="90%" height="1"><br>
<img src="images/cardframe/little.gif" width="12" height="12">
魅力:$post[thankannex]點 &nbsp<img src='images/common/hot.gif' border='0' title='得到感謝卡張數'><br>

<img src="images/cardframe/biao-18.gif" width="90%" height="1"><br>
<img src="images/cardframe/little.gif" width="12" height="12">
熱心:$post[thankgive]點 &nbsp<img src='images/common/ardency.gif' border='0' title='送出感謝卡張數'><br>



=========================
沒有安裝作者美化框者

$credit[unit]

後面插入
<!--{if $key==$ext}-->&nbsp<img src='images/common/thanks.gif' title='手中擁有感謝卡張數'><!--{/if}-->



沒有安裝作者美化框者找

$credit[title] $post[$key] $credit[unit]<br><!--{/loop}-->


下面加
魅力:$post[thankannex]點 &nbsp<img src='images/common/hot.gif' border='0' title='得到感謝卡張數'><br>
熱心:$post[thankgive]點 &nbsp<img src='images/common/ardency.gif' border='0' title='送出感謝卡張數'><br>



5.0找
{lang readperm} $post[readaccess]<br>
上面加
魅力:$post[thankannex]點 &nbsp<img src='images/common/hot.gif' border='0' title='得到感謝卡張數'><br>
熱心:$post[thankgive]點 &nbsp<img src='images/common/ardency.gif' border='0' title='送出感謝卡張數'><br>




=============================

viewthread.php

$db->query("UPDATE {$tablepre}threads SET moderated='0' WHERE tid='$tid'", 'UNBUFFERED');
        }
}


下面加
$thread['thank']=$thread['thank']>0?$thread['thank']="<img src='images/common/thanks.gif' title='感謝卡' align=absmiddle border=0><font color=red><b> x$thread[thank]</font>":'';
if(strpos($_COOKIE['discuz_collapse'], 'thanku ') === FALSE) {
$thanku['collapseimg'] = 'collapsed_yes.gif';
$collapse['thanku'] = 'display: none';
} else {
$thanku['collapseimg'] = 'collapsed_no.gif';
$collapse['thanku'] = '';
}




m.showemail,

後面插入
m.thankannex,m.thankgive,





$postlist[$post['pid']] = $post;

上面加
$ext="extcredits".$th['thext'];





require_once DISCUZ_ROOT.'./include/discuzcode.func.php';

下面加
@require DISCUZ_ROOT.'./forumdata/cache/plugin_thank.php';
$th=$_DPLUGIN['thank']['vars'];






        showmessage('thread_nopermission', NULL, 'NOPERM');
}

下面加
$thanknopay=$th['thanknopay'];
if($thanknopay==true){
$query2 = $db->query("SELECT fromuser,fromuseruid FROM {$tablepre}thanklog WHERE tid='$tid' and fromuseruid='$discuz_uid'");
}




if(!$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {

改為

if(!$forum['ismoderator'] && $thread['authorid'] != $discuz_uid  && !$db->result($query2, 0)) {


               
=========================

common.js


        document.cookie = "discuz_collapse=" + escape(collapsed) + "; expires=" + expires.toGMTString() + "; path=/";
}

下面加
function thanku_collapse(objname) {
        obj = findobj(objname);
        img = findobj(objname+"_img");
        collapsed = getcookie("discuz_collapse");
        cookie_start = collapsed ? collapsed.indexOf(objname) : -1;
        cookie_end = cookie_start + objname.length + 1;

        if(obj.style.display == "none") {
                obj.style.display = "";
                img_re = new RegExp("_yes\\.gif$");
                img.src = img.src.replace(img_re, '_no.gif');
if(cookie_start == -1) collapsed = collapsed + objname + " ";

        } else {
                obj.style.display = "none";
                img_re = new RegExp("_no\\.gif$");
                img.src = img.src.replace(img_re, '_yes.gif');
if(cookie_start != -1) collapsed = collapsed.substring(0, cookie_start) + collapsed.substring(cookie_end, collapsed.length);
        }
        expires = new Date();
        expires.setTime(expires.getTime() + (collapsed ? 0 : -(86400 * 30 * 1000)));
        document.cookie = "discuz_collapse=" + escape(collapsed) + "; expires=" + expires.toGMTString() + "; path=/";
}




========================
viewpro.htm


<tr><td width="45%" class="bold">$credit[title]:</td><td width="55%">{$member[extcredits.$id]} $credit[unit]</td></tr>
<!--{/loop}-->

改為


        <tr><td width="45%" class="bold">$credit[title]:</td><td width="55%">{$member[extcredits.$id]} $credit[unit]<!--{if $id==$th['thext']}-->&nbsp<img src='images/common/thanks.gif' title='手中擁有感謝卡張數'><!--{/if}--></td></tr>
<!--{/loop}-->
<tr><td width="45%" class="bold">魅力:</td><td width="55%">$member[thankannex]點 &nbsp<img src='images/common/hot.gif' border='0' title='得到感謝卡張數'></td></tr>
<tr><td width="45%" class="bold">熱心:</td><td width="55%">$member[thankgive]點 &nbsp<img src='images/common/ardency.gif' border='0' title='送出感謝卡張數'></td></tr>



==============
viewpro.php

$query = $db->query("SELECT COUNT(*) FROM {$tablepre}posts");

下面加
@require DISCUZ_ROOT.'./forumdata/cache/plugin_thank.php';
$th=$_DPLUGIN['thank']['vars'];
$ext="extcredits".$th['thext'];



=====================
admin/database.inc.php
找(3處)

'threadtypes',

後面插入
'thanklog',



============================
admin/groups.inc.php

showsetting('usergroups_edit_direct_post', '', '', "<input type=\"radio\" name=\"allowdirectpostnew\"


上面加
showsetting('是否允許使用感謝卡功能', 'allowsthank', $group['allowthank'], 'radio');




,allowanonymous='$allowanonymousnew'

前面插入
,allowthank='$allowsthank'



========================
forums.inc.php

, allowsmilies='$allowsmiliesnew'


後面插入
,allowthank=$allowthanknew



showsetting('forums_edit_bbcode', 'allowbbcodenew', $forum['allowbbcode'], 'radio');

上面加
showsetting('是否允許在此版面使用感謝卡', 'allowthanknew', $forum['allowthank'], 'radio');



=================
viewthread_pay.htm

<a href="misc.php?action=pay&tid=$tid">[{lang pay}]</a> &nbsp;

上面加
<a href="plugin.php?identifier=thank&module=thank&action=thank&tid=$tid&pay=nopay"><img src="{IMGDIR}/thanks.gif" border="0" align="absmiddle" alt="使用感謝卡免付費!"></a>&nbsp;



=================




後台導入插件數據  設置所有選項

積分設置選項增加積分名稱[感謝卡]
單位[張] 註冊初始值 建議[15]

使用扣卡制 必須先發送感謝卡積分給所有會員 沒有卡片將無法使用扣卡制


上傳所有文件

更新緩存



============================
如果出現以下錯誤訊息
Fatal error: Call to undefined function: mb_strimwidth() in
Fatal error: Call to undefined function: mb_strlen()


請將php.ini  開啟mbstring

;extension=php_mbstring.dll

改成
extension=php_mbstring.dll


不是自己的主機無法修改php.ini者
那就照下面修改
forumdisplay.htm

title='{$thread[thankuser]}

刪除

forumdisplay.php

$thread['thankuser']=mb_strimwidth($thread['thankuser'], 0, 150, "....");

刪除


==================



==================
7/27 以前安裝者修正

admin/database.inc.php
找(3處)

'threadtypes',

後面插入
'thanklog',


升級數據
UPDATE `cdb_plugins` SET `datatables` = 'thanklog' WHERE `datatables` = 'thank'  ;


=======================

        1.12 升級 v2.0 步驟

========================

升級
ALTER TABLE `cdb_usergroups` ADD `allowthank` TINYINT( 1 ) NOT NULL DEFAULT '1';
ALTER TABLE `cdb_forums` ADD `allowthank` TINYINT( 1 ) NOT NULL DEFAULT '1';
ALTER TABLE `cdb_thanklog` ADD `touseruid` MEDIUMINT( 8 ) NOT NULL ;



============================
admin/groups.inc.php

showsetting('usergroups_edit_direct_post', '', '', "<input type=\"radio\" name=\"allowdirectpostnew\"


上面加
showsetting('是否允許使用感謝卡功能', 'allowsthank', $group['allowthank'], 'radio');




,allowanonymous='$allowanonymousnew'

前面插入
,allowthank='$allowsthank'





========================
forums.inc.php

, allowsmilies='$allowsmiliesnew'


後面插入
,allowthank=$allowthanknew



showsetting('forums_edit_bbcode', 'allowbbcodenew', $forum['allowbbcode'], 'radio');

上面加
showsetting('是否允許在此版面使用感謝卡', 'allowthanknew', $forum['allowthank'], 'radio');



========================

forumdisplay.htm

<option value="lastpost" $check[lastpost]>{lang order_lastpost}</option>

上面加
<option value="thank" $check[thank]>感謝卡數</option>





{lang replies}

後面插入
<img src='./images/common/thanks.gif'><br>
[<a href='forumdisplay.php?fid=$fid&filter=$filter&orderby=thank&ascdesc=DESC'>
<img src='./images/common/s_desc.gif' border='0' title='依感謝卡數降序排列'></a>&nbsp<b>/</b>&nbsp
<a href='forumdisplay.php?fid=$fid&filter=$filter&orderby=thank&ascdesc=ASC'>
<img src='./images/common/s_asc.gif' border='0' title='依感謝卡數升序排列'></a>]



====================================

forumdisplay.php

isset($orderby) && in_array($orderby, array('dateline', 'replies', 'views')) ? $forumdisplayadd .=

改為
isset($orderby) && in_array($orderby, array('thank', 'dateline', 'replies', 'views')) ? $forumdisplayadd .=


====================================

viewthread.htm
<!--{if $discuz_user && $post['authorid'] && $post[number]== 1}-->

改為
<!--{if $discuz_user && $post['authorid'] && $post[number]== 1 && $allowpostreply}-->



==================================

viewthread.php

require_once DISCUZ_ROOT.'./include/discuzcode.func.php';

下面加
@require DISCUZ_ROOT.'./forumdata/cache/plugin_thank.php';
$th=$_DPLUGIN['thank']['vars'];




@require DISCUZ_ROOT.'./forumdata/cache/plugin_thank.php';
$th=$_DPLUGIN['thank']['vars'];
$ext="extcredits".$th['thext'];

改為
$ext="extcredits".$th['thext'];






        showmessage('thread_nopermission', NULL, 'NOPERM');
}

下面加
$thanknopay=$th['thanknopay'];
if($thanknopay==true){
$query2 = $db->query("SELECT fromuser,fromuseruid FROM {$tablepre}thanklog WHERE tid='$tid' and fromuseruid='$discuz_uid'");
}



if(!$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {

改為
if(!$forum['ismoderator'] && $thread['authorid'] != $discuz_uid  && !$db->result($query2, 0)) {


============================


viewthread.htm
<!--{if $discuz_user && $allowpostreply}-->&nbsp;<a href="plugin.php?identifier=thank&module=thank&action=thank&tid=$tid&page=$page"><img src="{IMGDIR}/Thank.gif" border="0" alt="使用感謝卡 免回覆隱藏帖!"></a><!--{/if}-->
改成
<!--{if $discuz_user && $allowpostreply}-->&nbsp;<a href="plugin.php?identifier=thank&module=thank&action=thank&tid=$tid&page=$page"><img src="{IMGDIR}/Thank.gif" border="0" alt="使用感謝卡 免回覆隱藏帖<!--{if $thanknopay==true}-->以及免付費直接查看文章<!--{/if}-->"></a><!--{/if}-->



給這篇貼子作者送感謝卡!

改成
給這篇貼子作者送感謝卡!使用感謝卡 免回覆隱藏帖<!--{if $thanknopay==true}-->以及免付費直接查看文章<!--{/if}-->




=========================
viewthread_pay.htm

<a href="misc.php?action=pay&tid=$tid">[{lang pay}]</a> &nbsp;

上面加
<a href="plugin.php?identifier=thank&module=thank&action=thank&tid=$tid&pay=nopay"><img src="{IMGDIR}/thanks.gif" border="0" align="absmiddle" alt="使用感謝卡免付費!"></a>&nbsp;





上傳附件
重新導入數據
設置插件設定
更新緩存



如果你有安裝外部上傳插件 導致感謝名單無法正常縮放
請查看下面118樓回覆 修正
http://www.alan888.com/Discuz/viewthread.php?tid=75852&extra=page%3D1&page=6


[ 本帖最後由 阿狗狗 於 2006-8-14 23:42 編輯 ]



 附件: 您所在的用戶組無法下載或查看附件



香港話 我聽不懂 ~請不要跟我說香港話 謝謝=-=
 AL8 Forum © All rights reserved.
頂部
 阿狗狗
 0025256
Rank: 4Rank: 4Rank: 4Rank: 4
點擊查看 阿狗狗 的詳細資料

頭銜: Lord

帖子: 597

精華: 0

積分: 6574 點

現金: 158 元

存款: 0 元

閱讀權限: 25

註冊: 2005-7-2

狀態: 離線
 
發表於 2006-7-28 09:39  資料  個人空間  短消息  加為好友 
先搶

[ 本帖最後由 阿狗狗 於 2006-7-28 10:24 編輯 ]



 附件: 您所在的用戶組無法下載或查看附件



香港話 我聽不懂 ~請不要跟我說香港話 謝謝=-=
 AL8 Forum © All rights reserved.
頂部
 阿狗狗
 0025256
Rank: 4Rank: 4Rank: 4Rank: 4
點擊查看 阿狗狗 的詳細資料

頭銜: Lord

帖子: 597

精華: 0

積分: 6574 點

現金: 158 元

存款: 0 元

閱讀權限: 25

註冊: 2005-7-2

狀態: 離線
 
發表於 2006-7-28 09:40  資料  個人空間  短消息  加為好友 
上傳用

[ 本帖最後由 阿狗狗 於 2006-7-28 10:31 編輯 ]



 附件: 您所在的用戶組無法下載或查看附件



香港話 我聽不懂 ~請不要跟我說香港話 謝謝=-=
 AL8 Forum © All rights reserved.
頂部
 阿狗狗
 0025256
Rank: 4Rank: 4Rank: 4Rank: 4
點擊查看 阿狗狗 的詳細資料

頭銜: Lord

帖子: 597

精華: 0

積分: 6574 點

現金: 158 元

存款: 0 元

閱讀權限: 25

註冊: 2005-7-2

狀態: 離線
 
發表於 2006-7-28 09:40  資料  個人空間  短消息  加為好友 
更新用

[ 本帖最後由 阿狗狗 於 2006-7-28 10:26 編輯 ]



 附件: 您所在的用戶組無法下載或查看附件



香港話 我聽不懂 ~請不要跟我說香港話 謝謝=-=
 AL8 Forum © All rights reserved.
頂部
 vitamin_x
 0006380
Rank: 1

頭銜: Newbie

帖子: 31

精華: 0

積分: 330 點

現金: 98 元

存款: 0 元

閱讀權限: 10

註冊: 2004-8-29

狀態: 離線
 
發表於 2006-7-28 10:00  資料  個人空間  短消息  加為好友 
千呼萬喚始出來,
感謝阿狗狗的分享唷!




 AL8 Forum © All rights reserved.
頂部
 nickyjelly
 0029774
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6
點擊查看 nickyjelly 的詳細資料

頭銜: Forum Legend

帖子: 2303

精華: 0

積分: 9080 點

現金: 170 元

存款: 5696 元

閱讀權限: 70

註冊: 2005-9-1

狀態: 離線
 
發表於 2006-7-28 10:55  資料  個人空間  短消息  加為好友  添加 nickyjelly 為MSN好友 通過MSN和 nickyjelly 交談
嘩`好長]]||*
[[|..*thz*




 AL8 Forum © All rights reserved.
頂部
 bobbi
 0027612
Rank: 2Rank: 2

頭銜: Member

帖子: 58

精華: 0

積分: 620 點

現金: 22 元

存款: 0 元

閱讀權限: 15

註冊: 2005-8-1

狀態: 離線
 
發表於 2006-7-28 11:01  資料  個人空間  短消息  加為好友 
discuzcode.func.php


$query = $db->query("SELECT pid FROM {$tablepre}posts WHERE tid='$tid' AND authorid='$discuz_uid' LIMIT 1");


這一段有2個
請問狗狗要改那一個?




 AL8 Forum © All rights reserved.
頂部
 阿狗狗
 0025256
Rank: 4Rank: 4Rank: 4Rank: 4
點擊查看 阿狗狗 的詳細資料

頭銜: Lord

帖子: 597

精華: 0

積分: 6574 點

現金: 158 元

存款: 0 元

閱讀權限: 25

註冊: 2005-7-2

狀態: 離線
 
發表於 2006-7-28 11:09  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 bobbi 於 2006-7-28 11:01 發表。&nbsp;