Archive

Posts Tagged ‘Discuz’

将阅读权限限制修改为威望(积分)限制

January 23rd, 2009 No comments
将阅读权限限制修改为威望(积分)限制
 
1、修改数据库(可以不修改)
 
登录数据库,表 x__threads (x表示表前缀)中 readperm 字段 结构修改
 
A.将 类型  tinyint  修改为 smallint
B.将 长度 3 修改为6
C.属性  UNSIGNED (不修改)
D.NULL 选择 not null (不修改)
E. 默认值选择 0 (不修改)
 
2. 打开 include/common.inc.php
 
 
到第 157if($thread['readperm'] && $thread['readperm'] > $readaccess && !$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
	showmessage('thread_nopermission', NULL, 'NOPERM');
}
修改为
if($thread['readperm'] && $thread['readperm'] > $extcredits1  && !$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
	showmessage('thread_nopermission', NULL, 'NOPERM');
}
//其中$extcredits1 可以更改为$extcredits 积分; 如extcredits1 积分1(威望); extcredits2 积分2(金钱); extcredits3; extcredits4;extcredits5 ;extcredits6 ;extcredits7; extcredits8,可以自行选择一个,或者自行设置加减。
3. 修改模板文件,将 “阅读权限”替换为 “威望”或“积分”
 
3.1 找到 templates\default\templates.lang.php (一共有3行,修改前两行)
 
第 416'readperm' => '阅读权限',
修改为
'readperm' => '威望',
 
417'readperm_thread' => '所需阅读权限',
修改为
'readperm_thread' => '所需威望',
 
3.2 找到templates\default\messages.lang.php (一共有2行,全部替换)
 
第 47'thread_nopermission' => '对不起,本帖要求阅读权限高于 $thread[readperm] 才可浏览,请返回。',
修改为
'thread_nopermission' => '对不起,本帖要求威望高于 $thread[readperm] 才可浏览,请返回。',
 
第90'attachment_nopermission' => '对不起,本附件要求阅读权限高于 $attach[readperm] 才可下载,请返回。',
修改为
'attachment_nopermission' => '对不起,本附件要求威望高于 $attach[readperm] 才可下载,请返回。',
 
3.3找到templates\default\messages.lang.php
第51'attach_readperm' => '阅读权限',
修改为
'attach_readperm' => '威望',
 
3.3找到\forumdata\cache\目录下 (可替换,也可不替换)
cache_viewpro.php 和 cache_viewthread.php
 
将 阅读权限 替换为 威望
Categories: SoftWare Tags: ,

DISCUZ 6.0 发新贴后标题前自动加入当天日期

January 15th, 2009 No comments
发新贴后标题前自动加入当天日期
1、找到include/newthread.inc.php
2、查找
 
if($post_invalid = checkpost()) {
        showmessage($post_invalid);
}
3、替换为
 
$date_fid = "2,4,6,8"; //需要加日期的版块,用逗号分隔
$date_fid = ",".$date_fid.",";
if(strstr($date_fid, ",".$fid.",")){
    $date = gmdate("y/m/d", $timestamp + $timeoffset * 3600);
  $subject = "[".$date."] ".$subject;}
 
===如果需要所有版块都自动加日期,则替换为===
 
$date = gmdate("y/m/d", $timestamp + $timeoffset * 3600);
        $subject = "[".$date."] ".$subject;
4、更新缓存
Categories: Other Tags: ,

discuz7.0发布了,Discuz 挂了!

December 12th, 2008 No comments

今天下午上班的时候看到discuz发布了,赶紧到官方去看看.结果赶过去的
时候发现论坛只能打开首页,而进所有栏目都会提示出错,不知道是由于
discuz7.0刚发布,下载流量过大还是由于7.0漏洞比较大,被小黑给进去了.我估
计后面一种可能性是比较大的,因为官方的下载首页还是正常的,下载页面也都
正常,下载速度还挺快的,至少我下载的时候速度达到了1M每秒,继续关注事态发

Categories: Site Tags:

修改DIscuz等级图像显示

October 31st, 2008 No comments

找到代码:

 
   function showstars($num) {
           global $starthreshold;
   3.
 
           $alt = 'alt="Rank: '.$num.'"';
           if(empty($starthreshold)) {
                   for($i = 0; $i < $num; $i++) {
                           echo '<img src="'.IMGDIR.'/star_level1.gif" '.$alt.' />';
                   }
           } else {
                  for($i = 3; $i > 0; $i--) {
                          $numlevel = intval($num / pow($starthreshold, ($i - 1)));
                          $num = ($num % pow($starthreshold, ($i - 1)));
                          for($j = 0; $j < $numlevel; $j++) {
                                  echo '<img src="'.IMGDIR.'/star_level'.$i.'.gif" '.$alt.' />';
                          }
                  }
          }
  }
 
下面加上
 
   function showrankstars($num) {
           echo "<img src=images/rank/$num.gif title='Rank: ".$num."'>";
   }
 
第2步:、templates\default\viewthread.htm
找到
 
   showstars
 
替换成
 
   showrankstars
 
第3步:、templates\default\viewpro.htm
 
找到
 
   showstars
 
替换成
 
   showrankstars
 
有三个改后两个就行了,根据自己需要来改,我自己只改了第2个
 
第4:templates\default\my_grouppermission.htm
 
找到
 
   showstars
 
替换成
 
   showrankstars
Categories: Site Tags: ,

Discuz宣传中心文件

March 28th, 2008 No comments
Categories: Other Tags:

给超级版主设置版主权限

March 26th, 2008 No comments


引用:

收藏:easonlee
原作:antgawe http://www.discuz.net/thread-241902-1-1.html
版本:4.1,5.0也可以
只能管理版面上的版主,不能管理和版主相关联的其他管理组人员

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

引用:

附:允许版主修改论坛简介 For 4.1

http://www.discuz.net/viewthread.php?tid=309826&highlight=%B0%E6%D6%F7

没有增加新的管理组,没有新增数据库,只是在原来管理组-->超级版主的权限作了一下修改,使得超级版主增加了设置版主的权限。
引用:

修改文件:
admincp.php
menu.inc.php

打开admincp.php --------------------------------------------------------------------------------------------------------

找到:
复制内容到剪贴板
代码:
}
if($cpscript) {
require_once DISCUZ_ROOT.'./admin/'.$cpscript.'.inc.php';
} else {
cpheader();
cpmsg('noaccess');
}
在上边添加(注意是添加在}号的上一行)
复制内容到剪贴板
代码:
elseif($action == 'forumsedit'|| $action == 'moderators' ) {
$cpscript = 'forums';
}

}
else{
if($action == 'home') {
$cpscript = 'home';
} elseif((($allowedituser || $allowbanuser) && $action == 'editmember') || ($allowbanip && $action == 'ipban')) {
$cpscript = 'members';
} elseif($action == 'forumrules') {
$cpscript = 'forums';
} elseif($allowpostannounce && $action == 'announcements') {
$cpscript = 'announcements';
} elseif(($allowmoduser && $action == 'modmembers') || ($allowmodpost && ($action == 'modthreads' || $action == 'modreplies'))) {
$cpscript = 'moderate';
} elseif(($allowcensorword && $action == 'censor') || $action == 'logout') {
$cpscript = 'misc';
} elseif($allowmassprune && $action == 'prune') {
$cpscript = 'prune';
} elseif($action == 'plugins') {
$cpscript = 'plugins';
} elseif($allowviewlog && ($action == 'ratelog' || $action == 'modslog' || $action == 'banlog')) {
$cpscript = 'logs';
}
找到:
复制内容到剪贴板
代码:
elseif($adminid == 2||$adminid == 3 )
将其改为
复制内容到剪贴板
代码:
elseif($adminid == 2)
打开menu.inc.php --------------------------------------------------------------------------------------------------------

找到
复制内容到剪贴板
代码:
if($allowmassprune) {
$menuarray[] = array('name' => $lang['menu_maint_prune'], 'url' => 'admincp.php?action=prune');
}
在下边添加:
复制内容到剪贴板
代码:
showmenu($lang['menu_forums'], array(array('name' => $lang['menu_forums_add'], 'url' => 'admincp.php?action=forumadd'),
array('name' => $lang['menu_forums_edit'], 'url' => 'admincp.php?action=forumsedit'),
array('name' => $lang['menu_forums_merge'], 'url' => 'admincp.php?action=forumsmerge'),
array('name' => $lang['menu_forums_threadtypes'], 'url' => 'admincp.php?action=threadtypes')));
OK

Categories: Other Tags: ,

实用的顶部导航实用栏添加方法

March 25th, 2008 No comments

2.在后台-基本设置-搜索引擎优化-其它头部信息: 加入代码(红字部分改成你想要连接的地方的绝对或者相对连接地址)(蓝色部分改成你想要的中文名称)
代码:
---------------------------------------------------------------------------------------------

 

Categories: Site Tags:

投票等特殊贴里添加评分功能

March 7th, 2008 No comments

1.viewthread_special.inc.php
查找
Read more...

Categories: Other Tags: ,

更改出售帖子时不用点其他信息

March 7th, 2008 No comments

查找post_newthread.htm中以下代码:

{lang post_otherinfo}

前面,就OK了

Categories: Site Tags:

chm不能查看的解决办法

March 3rd, 2008 No comments

最近下载了一些.chm的书籍都不能阅读,在网上找了一下,应该是由于chm锁定。在文件上点鼠标右键,解除锁定就好了

chm.jpg

Categories: Site Tags: