先來解釋一下什麼是社區通票~
拿個比方~
比方有一個論壇叫泡哥夜店社區~!專討論夜店的!
有一個區是超精華的,『沪深夜店大家谈』,是專門討論最多PLMM夜店的~
壇主泡哥覺得"老兄...這樣的好版子,要進當然要付代價啦~"
所以就可以用本插件,就是要進這個版子就要付款買通票!!!!!!
p.s.以上情節,實屬虛構。如有雷同,純屬巧合!
泡哥是"晚晚去夜店泡噁心MM的老大哥"的意思,沒有暗示成份,亦不是指任何人士。
DISCUZ! v2.5 社區通票插件
程序開發: Winter0706(rubbishman)
鳴謝: ten789和yzgolden
聯系電郵: winter0706@gmail.com
技朮支持: http://www.freediscuz.net
https://discuz.dismall.com
使用聲明: 此乃為 DISCUZ! v2.x 系統所開發的額外功能開源插件,歡迎使用
安裝方法
1.
2.
3.
4.viewthread.php
找
- if($thread['creditsrequire'] && $thread['creditsrequire'] > $credit && !$ismoderator && ($thread['authorid'] !=$discuz_uid)) {
- showmessage('thread_nopermission', NULL, 'NOPERM');
- }
复制代码
下面加
- //==start社區通票2_0 by Rubbishman==================
- function getconfig($plugname){
- global $plugins_script;
- if (!in_array($plugname,$plugins_script)) return '';
- @include DISCUZ_ROOT.'./forumdata/cache/cache_plugins.php';
- return $_DCACHE['plugins_settings'][$plugname];
- }
- $ticc = getconfig('tic');$tdebuy=$ticc['debuy'];
- if($thread['digest'] && $tdebuy==1){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
- $dqbegintime = $timestamp;$time=floor(($tictime-$dqbegintime)/86400);
- if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)&& $time<0){showmessage('你的通票已過期。','plugins.php?p=tic');}
- }else{$tbid=$ticc['bid'];$tfbuy=$ticc['fbuy']; if($tfbuy==1){$dqbegintime = $timestamp;
- $time=floor(($tictime-$dqbegintime)/86400);if($time<0){$ticfidc=$forum['fid'];
- $query= $db->query("SELECT fid,posts FROM $table_forums WHERE fid in($tbid) AND fid='$ticfidc'");
- $ticf = $db->fetch_array($query);$ticfiddc=$ticf['fid'];
- if($ticfiddc){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
- if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)){showmessage('你的通票已過期。','plugins.php?p=tic');}}}}}
- //==end社區通票2_0 by Rubbishman==================
复制代码
5.
~~完~~
從1.0升級安裝方法
1.
2.
3.viewthread.php
找之前社區通票加的代碼~刪掉!!
找
- if($thread['creditsrequire'] && $thread['creditsrequire'] > $credit && !$ismoderator && ($thread['authorid'] !=$discuz_uid)) {
- showmessage('thread_nopermission', NULL, 'NOPERM');
- }
复制代码
下面加
- //==start社區通票2_0 by Rubbishman==================
- function getconfig($plugname){
- global $plugins_script;
- if (!in_array($plugname,$plugins_script)) return '';
- @include DISCUZ_ROOT.'./forumdata/cache/cache_plugins.php';
- return $_DCACHE['plugins_settings'][$plugname];
- }
- $ticc = getconfig('tic');$tdebuy=$ticc['debuy'];
- if($thread['digest'] && $tdebuy==1){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
- $dqbegintime = $timestamp;$time=floor(($tictime-$dqbegintime)/86400);
- if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)&& $time<0){showmessage('你的通票已過期。','plugins.php?p=tic');}
- }else{$tbid=$ticc['bid'];$tfbuy=$ticc['fbuy']; if($tfbuy==1){$dqbegintime = $timestamp;
- $time=floor(($tictime-$dqbegintime)/86400);if($time<0){$ticfidc=$forum['fid'];
- $query= $db->query("SELECT fid,posts FROM $table_forums WHERE fid in($tbid) AND fid='$ticfidc'");
- $ticf = $db->fetch_array($query);$ticfiddc=$ticf['fid'];
- if($ticfiddc){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
- if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)){showmessage('你的通票已過期。','plugins.php?p=tic');}}}}}
- //==end社區通票2_0 by Rubbishman==================
复制代码
4.
~~完~~
[ 本帖最后由 rubbishman 于 2005-10-5 23:23 编辑 ] |