Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

【開發】社區通票2.00(繁/簡+for2.5)(key:限制,通行證)

[复制链接]
rubbishman 发表于 2005-7-19 14:48:23 | 显示全部楼层 |阅读模式
先來解釋一下什麼是社區通票~
拿個比方~
比方有一個論壇叫泡哥夜店社區~!專討論夜店的!
有一個區是超精華的,『沪深夜店大家谈』,是專門討論最多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.
導入plug_tic.txt

2.
把文件放到相應的文件夾中

3.
用sql.txt來資料庫升級

4.
viewthread.php

  1. if($thread['creditsrequire'] && $thread['creditsrequire'] > $credit && !$ismoderator && ($thread['authorid'] !=$discuz_uid)) {
  2.         showmessage('thread_nopermission', NULL, 'NOPERM');
  3. }
复制代码

下面加

  1. //==start社區通票2_0 by Rubbishman==================
  2. function getconfig($plugname){
  3.         global $plugins_script;
  4.         if (!in_array($plugname,$plugins_script)) return '';
  5.         @include DISCUZ_ROOT.'./forumdata/cache/cache_plugins.php';
  6.         return $_DCACHE['plugins_settings'][$plugname];
  7. }
  8. $ticc = getconfig('tic');$tdebuy=$ticc['debuy'];
  9. if($thread['digest'] && $tdebuy==1){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
  10. $dqbegintime = $timestamp;$time=floor(($tictime-$dqbegintime)/86400);
  11. if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)&& $time<0){showmessage('你的通票已過期。','plugins.php?p=tic');}
  12. }else{$tbid=$ticc['bid'];$tfbuy=$ticc['fbuy']; if($tfbuy==1){$dqbegintime = $timestamp;
  13. $time=floor(($tictime-$dqbegintime)/86400);if($time<0){$ticfidc=$forum['fid'];
  14. $query= $db->query("SELECT fid,posts FROM $table_forums WHERE fid in($tbid) AND fid='$ticfidc'");
  15. $ticf = $db->fetch_array($query);$ticfiddc=$ticf['fid'];
  16. if($ticfiddc){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
  17. if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)){showmessage('你的通票已過期。','plugins.php?p=tic');}}}}}
  18. //==end社區通票2_0 by Rubbishman==================
复制代码

5.
include/common.php

  1. m.regdate
复制代码

後面加
  1. , m.tic AS tictime
复制代码

~~完~~

從1.0升級安裝方法
1.
覆蓋導入plug_tic.txt

2.
把文件覆蓋到相應的文件夾中

3.
viewthread.php
找之前社區通票加的代碼~刪掉!!

  1. if($thread['creditsrequire'] && $thread['creditsrequire'] > $credit && !$ismoderator && ($thread['authorid'] !=$discuz_uid)) {
  2.         showmessage('thread_nopermission', NULL, 'NOPERM');
  3. }
复制代码

下面加

  1. //==start社區通票2_0 by Rubbishman==================
  2. function getconfig($plugname){
  3.         global $plugins_script;
  4.         if (!in_array($plugname,$plugins_script)) return '';
  5.         @include DISCUZ_ROOT.'./forumdata/cache/cache_plugins.php';
  6.         return $_DCACHE['plugins_settings'][$plugname];
  7. }
  8. $ticc = getconfig('tic');$tdebuy=$ticc['debuy'];
  9. if($thread['digest'] && $tdebuy==1){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
  10. $dqbegintime = $timestamp;$time=floor(($tictime-$dqbegintime)/86400);
  11. if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)&& $time<0){showmessage('你的通票已過期。','plugins.php?p=tic');}
  12. }else{$tbid=$ticc['bid'];$tfbuy=$ticc['fbuy']; if($tfbuy==1){$dqbegintime = $timestamp;
  13. $time=floor(($tictime-$dqbegintime)/86400);if($time<0){$ticfidc=$forum['fid'];
  14. $query= $db->query("SELECT fid,posts FROM $table_forums WHERE fid in($tbid) AND fid='$ticfidc'");
  15. $ticf = $db->fetch_array($query);$ticfiddc=$ticf['fid'];
  16. if($ticfiddc){if (!$discuz_user){showmessage('請登錄','logging.php?action=login');}
  17. if(!$ismoderator && ($thread['authorid'] !=$discuz_uid)){showmessage('你的通票已過期。','plugins.php?p=tic');}}}}}
  18. //==end社區通票2_0 by Rubbishman==================
复制代码

4.
include/common.php

  1. m.regdate
复制代码

後面加
  1. , m.tic AS tictime
复制代码

~~完~~

[ 本帖最后由 rubbishman 于 2005-10-5 23:23 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
 楼主| rubbishman 发表于 2005-7-19 14:48:39 | 显示全部楼层

如果你有Archiver

1.
archiver/include/thread.inc.php

  1. require_once './include/header.inc.php';
复制代码

下面加
  1. //==start社區通票2_0 by Rubbishman==================
  2. function getconfig($plugname){
  3.         global $plugins_script;
  4.         if (!array($plugname,$plugins_script)) return '';
  5.         @include DISCUZ_ROOT.'./forumdata/cache/cache_plugins.php';
  6.         return $_DCACHE['plugins_settings'][$plugname];
  7. }
  8. $ticc = getconfig('tic');$tdebuy=$ticc['debuy'];
  9. $ticfidc=$thread['fid'];$tbid=$ticc['bid'];$tfbuy=$ticc['fbuy'];
  10. $query= $db->query("SELECT fid,posts FROM {$tablepre}forums WHERE fid in($tbid) AND fid='$ticfidc'");
  11. $ticf = $db->fetch_array($query);
  12. //==end社區通票2_0 by Rubbishman==================
复制代码

  1. ?>
  2. <tr><td bgcolor="<?=ALTBG1?>" class="bold"><a href="./"><?=$_DCACHE['settings']['bbname']?></a></td></tr></table><br><br>
  3. <table cellspacing="<?=INNERBORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="<?=TABLEWIDTH?>" align="center" class="tableborder">
  4. <tr><td bgcolor="<?=ALTBG2?>"><br><?=$lang['thread_nonexistence']?><br><br></td></tr></table>
  5. <?
复制代码

下面加
  1. //==start社區通票2_0 by Rubbishman==================
  2. } elseif($thread['digest'] && $tdebuy==1){?>
  3. <tr><td bgcolor="<?=ALTBG1?>" class="bold"><a href="./"><?=$_DCACHE['settings']['bbname']?></a></td></tr></table><br><br>
  4. <table cellspacing="<?=INNERBORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="<?=TABLEWIDTH?>" align="center" class="tableborder">
  5. <tr><td bgcolor="<?=ALTBG2?>"><br><b>**** 精華貼子,請購買社區通票及不要使用Archiver觀看****</b><br><br></td></tr></table>
  6. <?}elseif($ticf && $tfbuy==1){?>
  7. <tr><td bgcolor="<?=ALTBG1?>" class="bold"><a href="./"><?=$_DCACHE['settings']['bbname']?></a></td></tr></table><br><br>
  8. <table cellspacing="<?=INNERBORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="<?=TABLEWIDTH?>" align="center" class="tableborder">
  9. <tr><td bgcolor="<?=ALTBG2?>"><br><b>**** 指定貼子,請購買社區通票及不要使用Archiver觀看****</b><br><br></td></tr></table>
  10. <?
  11. //==end社區通票2_0 by Rubbishman==================
复制代码

[ 本帖最后由 rubbishman 于 2005-7-19 15:10 编辑 ]
回复

使用道具 举报

PerfectWorks 发表于 2005-7-19 14:48:52 | 显示全部楼层
沙发先
Yeah~~抢到了板凳哈哈
没有让你的阴谋得逞~

[ 本帖最后由 文文の封印 于 2005-7-19 14:50 编辑 ]
回复

使用道具 举报

wydgm 发表于 2005-7-19 14:56:05 | 显示全部楼层
等待中
回复

使用道具 举报

freddy 发表于 2005-7-19 15:33:00 | 显示全部楼层
鄙视抢我沙发的人!
正式版后加精!
回复

使用道具 举报

isly 发表于 2005-7-19 15:59:54 | 显示全部楼层
需要简体版本啊
回复

使用道具 举报

_白城听海_ 发表于 2005-7-19 17:31:50 | 显示全部楼层
BATA版,装一下玩玩!
回复

使用道具 举报

神的孩子龙在舞 发表于 2005-7-19 18:15:53 | 显示全部楼层
有没有简体
2。5的
回复

使用道具 举报

PerfectWorks 发表于 2005-7-19 18:20:34 | 显示全部楼层
楼主是典型的没事找抽型
回复

使用道具 举报

xmzyy 发表于 2005-7-19 18:20:54 | 显示全部楼层
等正式版本。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-3 22:41 , Processed in 0.105348 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表