后台设置用户组是否拥有买卖贴免付费权限
上一篇 /
下一篇 2006-01-06 11:41:57
查看( 4348 ) /
评论( 45 )
QUOTE:
安装方法:
<1>升级数据库:
ALTER TABLE `cdb_usergroups` ADD `issellfree` TINYINT( 1 ) DEFAULT '0' NOT NULL ;
<2>修改admin/groups.inc.php
查找:
showsetting('usergroups_edit_post', 'allowpostnew', $group['allowpost'], 'radio');
在前面加入
showsetting('usergroups_sellfree_post', 'issellfreenew', $group['issellfree'], 'radio');
再找
allowpost='$allowpostnew',
前面加入
issellfree='$issellfreenew',
<3>修改admincp.lang.php语言包
查找:
'usergroups_edit_post' => '允许发新话题:',
上面添加:
'usergroups_sellfree_post' => '买卖贴免付费:',
'usergroups_sellfree_post_comment' => '设置是否拥有买卖贴免付费权限',
<4>修改viewthread.php
查找:
if($thread['price'] > 0) {
上面加上:
if($thread['price'] > 0 && $issellfree && ($maxchargespan && $timestamp - $thread['dateline'] < $maxchargespan * 3600)){
$newprice=$thread['price'];
$thread['price']=0;
}
查找:
if($forum['password'] && $forum['password'] != $_DCOOKIE['fidpw'.$fid]) {
上面加上:
if($newprice){
$thread['price']=$newprice."[ 你所在的用户组(".$grouptitle."),享有免付费特权。]";
}
完工.
[
本帖最后由 lu5266 于 2006-1-20 20:54 编辑 ]
论坛模式
推荐
收藏
分享给好友
管理
TAG: