Discuz!6插件收集
[color=red]首页四格for Discuz!6正式版[/color]需要修改文件:./index.php
./templates/风格/discuz.html
第一步:
打开./index.php
注:有朋友反应标题超长$hack_cut_str = 25; 这个数字可以根据自己的需要修改
查找:[code]$rsshead = $rssstatus ? ('<link rel="alternate" type="application/rss+xml" title="'.$bbname.'" href="'.$boardurl.'rss.php?auth='.$rssauth."\" />\n") : '';
[/code]在上面加上:[code]//----首页四格代码开始
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新贴
$hack_cut_str = 26; //标题字数
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
$nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
$nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
$nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist[] = $nthread;
}
//新回复
$hack_cut_str = 26; //标题字数
$hack_cut_strauthor = 9;
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, 10");
while($rthread = $db->fetch_array($query)) {
$rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
$rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
$rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist[] = $rthread;
}
//热帖
$hack_cut_str = 26; //标题字数
$hack_cut_strauthor = 9;
$new_hot_threadlist = array();
$mthread = array();
$ctime=$timestamp-3600*24*7;//最后7是天数为本周
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND t.dateline>$ctime AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.views DESC LIMIT 0, 10");
while($mthread = $db->fetch_array($query)) {
$mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
$mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
$mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
$mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
$mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
if($mthread['highlight']) {
$string = sprintf('%02d', $mthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$mthread['highlight'] = 'style="';
$mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$mthread['highlight'] .= '"';
} else {
$mthread['highlight'] = '';
}
$new_hot_threadlist[] = $mthread;
}
//----首页四格代码结束[/code]第2步:
最好首先把./template/default/discuz.html文件复制下来,打开复制的文件(discuz.html)里面
查找
[quote]div id="ad_text"></div>[/quote]
在下面加上:
[quote]<!-- 首页四格 -->
<div class="mainbox forumlist">
<table cellspacing="0" cellpadding="0">
<thead class="category">
<tr>
<td align="center" style="padding:1px"><h3>≡ 论坛图片 ≡</h3></td>
<td align="center" style="padding:1px"><h3>≡ 最新帖子 ≡</h3></td>
<td align="center" style="padding:1px"><h3>≡ 最新回复 ≡</h3></td>
<td align="center" style="padding:1px"><h3>≡ 热门帖子 ≡</h3></td>
</tr>
</thead>
<tr>
<td width="25%" align="center">
<?php
require_once 'pic.php';
?>
</td>
<td width="25%">
<!--{loop $new_post_threadlist $nthread}-->
<table border="0" width="100%" cellspacing="2">
<tr>
<td height="12" width="100%" style="border-top: 0px;padding:1px">
<!--{if $nthread[replies]}-->
<img src="images/picli.gif" border="0" /><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='最新话题 {LF}所在论坛: $nthread[forumname]{LF}主题标题: $nthread[subject] {LF}主题作者: $nthread[author]{LF}发表时间: $nthread[date]{LF}浏览次数: $nthread[views] 次 {LF}回复次数: $nthread[replies] 次{LF}最后回复: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a>
<!--{else}-->
<img src="images/picli.gif" border="0" /><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='最新话题 {LF}所在论坛: $nthread[forumname]{LF}主题标题: $nthread[subject] {LF}主题作者: $nthread[author]{LF}发表时间: $nthread[date]{LF}浏览次数: $nthread[views] 次 {LF}回复次数: $nthread[replies] 次{LF}最后回复: 暂时没有回复'>$nthread[view_subject]</a>
<!--{/if}-->
</td>
</tr>
</table>
<!--{/loop}-->
</td>
<td width="25%">
<!--{loop $new_reply_threadlist $rthread}-->
<table border="0" width="100%" cellspacing="2">
<tr>
<td height="12" width="100%" style="border-top: 0px;padding:1px"><img src="images/picli.gif" border="0" /><a href="viewthread.php?tid=$rthread[tid]" $rthread['highlight'] title='最新回复 {LF}所在论坛: $rthread[forumname]{LF}主题标题: $rthread[subject]{LF}主题作者: $rthread[author]{LF}发表时间: $rthread[date]{LF}浏览次数: $rthread[views] 次{LF}回复次数: $rthread[replies] 次{LF}最后回复: $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]'>$rthread[view_subject]</a></td>
</tr>
</table>
<!--{/loop}-->
</td>
<td width="25%">
<!--{loop $new_hot_threadlist $mthread}-->
<table border="0" width="100%" cellspacing="2">
<tr>
<td height="12" width="100%" style="border-top: 0px;padding:1px"><img src="images/picli.gif" border="0" /><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title='热门话题 {LF}所在论坛: $mthread[forumname]{LF}主题标题: $mthread[subject]{LF}主题作者: $mthread[author]{LF}发表时间: $mthread[date]{LF}浏览次数: $mthread[views] 次{LF}回复次数: $mthread[replies] 次{LF}最后回复: $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]'>$mthread[view_subject]</a></td>
</tr>
</table>
<!--{/loop}-->
</td>
</tr>
</table>
</div>
<!-- 首页四格 -->[/quote]
修改好之后把文件保存在./templates/你的风格目录下面
第三步:
上传附件,进入后台更新缓存,OK!
[attach]709[/attach]
另附上已经修改好的index.php和discuz.html,上传的时候请注意路径。
[attach]1224[/attach] 20070909版
[attach]1463[/attach]
[attach]9398[/attach]
[attach]10103[/attach]
[url=http://www.discuz.net/thread-696558-1-1.html]http://www.discuz.net/thread-696558-1-1.html[/url]
[attach]11758[/attach]
[attach]11759[/attach]
[attach]11760[/attach]
[attach]11962[/attach] 插件名称:社区银行 Ver 4.0 For DZ6.0
程序作者:LFLY1573
本意是为了看下bank_install.php的架构,看完之后稍作修改的升级程序。
适合初次接触插件升级的站长使用。
此升级包技术含量较低,纯粹是看完LFLY1573整个PHP文件后的去除相关不需要语句从而顺利绕过数据库避免反安装的删减版本。
保留了原先的检验体制,从而最大限度的保证了升级安装的成功。
有经验的完全可以在1~2分钟内手动完成倒入升级。手动过程也十分十分简洁。
全新安装:全部为原LFLY1573文件
1.二进制上传至FTP,非WIN用户目录权限请设置为777
2.运行[url]www.yourwebsite.com/bank_install.php[/url]
3.按照提示安装至完成。
升级安装:
1.二进制上传至FTP,非WIN用户目录权限请设置为777
2.更新缓存
[attach]711[/attach]
节日红包插件
节日红包插件 For DZ6.0 这个在DZ6.1上也可以正常使用安装使用方法:
如果先前没有安装过该插件的朋友,请下载程序压缩包解压后,将所有文件(文件夹)按目录结构拷贝至论坛根目录,运行money_install.php按照提示进行安装。安装完成后,进入系统后台更新缓存,即可使用。如果想卸载插件,只要再次money_install.php,按照提示即可完成卸载。
[attach]712[/attach] 社区银行出现“金融业整顿中,请返回稍后再来。”
系统设置 > 扩展设置 > 插件设置 > 社区银行 > 插件参数设置 > 是否关闭银行 > 否
把“是否关闭银行”的值“close”改为“open”即可。
插件变量配置 是否关闭银行 open 开关(radio)
配置变量名:
设置配置项目的变量名,用于插件程序中调用,可包含英文、数字和下划线,在同一个插件中需要保持变量名的唯一性,最多 40 个字节
把close”改为“open”即可。
如何使Discuz显示flash附件?
进入后台管理-帖子管理-帖子相关-Discuz! 代码 顶一下了!~看看有用没有?【破处 - 风格】For Discuz 6.0正式版提供下载[提供LOGO PNG源文件] By 小强。
[url]http://www.discuz.net/viewthread.php?tid=743669&extra=&highlight=%C6%C6%B4%A6&page=1[/url]关于顶部的链接
可以打开header.htm
找到[code]<li =><a href="index.php">HOME</a></li>
和
<a href="http://dc520.cn">DC520.CN</a>[/code]改成你自己想要的就可以了!
要使用中文的请使用这个css.htm,否则中文字体会很小不美观!
覆盖templates里的css.htm即可使用
[attach]2554[/attach]
[attach]2555[/attach]
[attach]2556[/attach]
《〈〈《那些花儿》〉〉》经典清爽风格推荐下载 for6.0
[url]http://www.discuz.net/viewthread.php?tid=706304&extra=&highlight=%C4%C7%D0%A9%BB%A8%B6%F9&page=1[/url]复制帖子时自动在末尾加帖子来源for 6.0(让别人帮你宣传)
在viewthread.htm中找到[code]</td></tr><!--{if $post['signature'] && !$post['anonymous'] && $showsignatures}-->[/code]在上面添加[code]<script language=javascript>
document.body.oncopy=function(){
event.returnValue=false;
var t=document.selection.createRange().text;
var s="你想要的复制时自动带的文字";
clipboardData.setData('Text','\r\n'+t+'\r\n'+s+'\r\n\r\n\r\n\r\n');
}
</script>[/code]把你想要的复制时自动带的文字换成你想要的在复制时加在末尾的文字就可以了 6.0风格模板 可爱粉红
[attach]3762[/attach]
[quote]/images/default/header_bg.gif 是栏目背景图[/quote] 风格模板 香水
[attach]3782[/attach]
您的等级为游客,目前仅能浏览此帖部分内容
在一些论坛上看到这样的形式:您的等级为游客,目前仅能浏览此帖部分内容方法如下:
viewthread.php 中查
$post['ratings'] = karmaimg($post['rate'], $post['ratetimes']);
后面插入下面代码[code] if(!$discuz_user && $post['count'] == 0 && strlen($post['message']) > 200){
$post['message'] = cutstr($post['message'], 200);
$post['message'] = $post['message']."[quote][b][color=black]您的等级为游客,目前仅能浏览此帖部分内容,请[url=http://bbs.gonet8.com/register.php][color=blue]注册[/color][/url]或[url=http://bbs.gonet8.com/logging.php?action=login][color=blue]登录[/color][/url]。[/color][/b][/quote]";
$post['bbcodeoff'] = 0;
}[/code]另,200这个数值可以根据自己的想法更改。
悠嘻猴表情FO DZ6.0
[quote]此表情为悠嘻猴,版权归悠嘻猴官方[url]http://www.yoyocici.com[/url][/quote][quote]安装方法:
1.上传文件到你的BBS目录,保持结构
2.在后台帖子管理-表情管理内导入discuz_smilies_悠嘻猴.txt,在你的风格管理里面把本风格的默认表情换成目录yoyocici就可以
3.更新缓存[/quote]
[attach]4030[/attach]
如何设置解决点击贴子在新页面打开
打开templates\default\forumdisplay.htm查找
[code]<a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>
[/code]
改为
[code] <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight] target="_blank">
[/code]
复制地址,推荐给QQ/MSN上的好友 For 6.1.0 静态地址专用 [按钮位于主题帖上方]
相关帖子:[url=http://bbs.gonet8.com/viewthread.php?tid=166&page=3&fromuid=1#pid23115]http://bbs.gonet8.com/viewthread.php?tid=166&page=3&fromuid=1#pid23115[/url]方法:
修改文件 ./templates/default/viewthread.htm 换了风格的把viewthread.htm 复制到风格文件里
找到:
[code]<a href="viewthread.php?tid=$post[tid]&page=$page" rel="nofollow">{lang thread_show_all}</a>
<!--{/if}-->
<!--{/if}-->[/code]
下面加入:
[code] <span>
<!--{if $post['number'] == 1}-->
<script language="JavaScript">
<!--
function copyUrl(url){
var content='';
window.clipboardData.setData("Text",url);
alert("复制成功,请粘贴到你的QQ/MSN上推荐给你的好友");
}//-->
</script>
<a href="javascript:copyUrl('$post[subject]\n{$boardurl}thread-$tid-1-1.html')" font color="#006699">【复制推荐地址发送给QQ/MSN好友】</a></font>
<!--{/if}-->
</span>[/code]
表情大全
[attach]7689[/attach][attach]7690[/attach]
[attach]7691[/attach]
[attach]7692[/attach]
[attach]7693[/attach]
[attach]7711[/attach]
[attach]7712[/attach]
[attach]7713[/attach]
无心宠物V2.5 For DZ6.0
无心宠物V2.5全新安装说明引用:1.安装宠物系统存在风险,安装前请考虑清楚!请自行承担安装此宠物系统带来的各种风险!
2.宠物系统对系统资源消耗较大!
一、备份论坛数据库,防止意外发生
二、上传upload目录里所有文件到论坛根目录下
三、下载宠物图片包,解压缩,把宠物图片上传到 /wxpet/images 目录里面
[url=http://download.9938.cn/petimages.rar]http://download.9938.cn/petimages.rar[/url]
四、对wxpet/log目录和wxpet/system目录修改相关权限
Unix系统给予777权限
Windows系统给予写入权限
五、修改文件include/db_mysql.class.php文件
找到 复制内容到剪贴板 代码:[code]function affected_rows() {
return mysql_affected_rows($this->link);
}[/code]在其下面添加下面的函数 复制内容到剪贴板 代码:[code] function get_one($SQL,$type = '',$result_type = MYSQL_ASSOC){
$query = $this->query($SQL,$type);
$returnrow =& mysql_fetch_array($query,$result_type);
return $returnrow;
}[/code]六、修改templates\default\actions.lang.php文件
[quote] 找到:
复制内容到剪贴板 代码:211 => '修改系统设置',
在下面添加:
复制内容到剪贴板 代码:222 => '宠物中心',[/quote]
七、上传pet_install.php 文件到论坛根目录下
八、用管理员身份运行http://您的论坛地址/pet_install.php,执行数据库安装操作,然后删除此文件
九、进论坛后台导入插件数据discuz_plugin_wxpet.txt
十、全新安装完毕,所以论坛管理员都拥有宠物GM权限
如果要设置其他人为宠物GM,请注意把自己的帐号也加入宠物GM名单中
[quote]无心宠物V2.5更新简要说明一.技能计算公式的变化
二.技能学习条件改变
二.监狱系统
三.师徒系统
四.可增加任意时间的各种倍数的经验卡、金钱卡和攻击卡
五.宠物仓库物品的操作改变
六.PK功能永久删除
七.其他比上面说明更多的东西,自己发掘[/quote]
[url=http://www.discuz.net/thread-856891-1-1.html]http://www.discuz.net/thread-856891-1-1.html[/url]
[url=http://www.discuz.net/thread-881829-1-1.html]http://www.discuz.net/thread-881829-1-1.html[/url]
[quote]解决无心宠物2.5在dz6.1下不能野战的问题
很简单,
把templates目录下default子目录下的css_common.htm 复制一份并改名叫 css.htm 即可。[/quote]
版块横排,添加版块图标的办法
打开 discuz.htm找:[code]<th width="$cat[forumcolwidth]"{$forum[folder]}>[/code]后面添加:[code]<a href="forumdisplay.php?fid=$forum[fid]">{$forum[icon]}</a>[/code]如果要同时去掉前面有无新帖图标,
打开6.0是css.htm,6.1是css_common.htm
找:[code].forumlist th { padding-left: 55px !important; }
.forumlist h2 em { color: {HIGHLIGHTLINK}; }
.forumlist tbody th { background-image: url({IMGDIR}/forum.gif); background-repeat: no-repeat; background-position: 13px 50%; }
.forumlist tbody th.new { background-image: url({IMGDIR}/forum_new.gif); }[/code]删除。
【火狼出品】首页6格For DZ6 完整版
[attach]10102[/attach]【火狼出品】首页6格For DZ6 完整版 (远程抓图/组图) [2008.03.31]
[url]http://www.discuz.net/thread-858457-1-1.html[/url]
1. 上传整个firewolf_indextoplist目录至plugins下,请不要更改文件夹名称。
2. 打开相应语言编码插件数据文本拷贝内容,到后台插件管理区导入该插件数据。
3. 如果你未修改过“index.php”和“模板discuz.htm”(\templates\default),复制本目录中的两个文件到相应目录 覆盖即可,无需第4步。
4. 手动修改文件方法:
[quote] 1). 打开 index.php 程序
搜索“$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;”
在下面插入“eval($hooks['firewolf_indextoplist_require_index']);” ;
2). 打开 discuz.htm 模板,如果您的站点有多套风格模板,请修改所有风格模板的相关文件。
搜索“<div id="ad_text"></div>”
在下面插入“<!--{eval eval($hooks['firewolf_indextoplist_include_template']);}-->”;[/quote]
5. 插件默认名人名言编码为GBK,如论坛编码不是GBK,请将插件根目录的名人名言JS文件选择相应编码JS文件改成dicta.js,覆盖./firewolf_indextoplist/template/dicta.js。
6. 使插件为可用状态,然后到后台插件设置->该插件[模块:参数设置],打开功能并提交即可。
Discuz! 代码 - qq代码设定
下面的是论坛后台中的QQ标签的代码发现有问题,不能正常发信息。[code]<a href="http://wpa.qq.com/msgrd?V=1&Uin={1}&Site=[Discuz!]&Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:{1}:1" border="0"></a>[/code]正确的代码如下:[code]<a target=blank href=tencent://message/?uin={1}&Site=bbs.gonet8.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:{1}:1 alt="点击这里给我发消息"></a>[/code]腾讯QQ互动状态代码生成页[url]http://www.gonet8.com/bbs/thread-5-1-1.html[/url]
页:
[1]
2