繁體
|
簡體
Sclub交友聊天~加入聊天室當版主
(檢舉)
分享
新浪微博
QQ空间
人人网
腾讯微博
Facebook
Google+
Plurk
Twitter
Line
论坛统计
关于我们
我的宠物
首页
社区
板块
风格
代码
聊天
搜索
搜索
游客
爱秀代码
游客仅可浏览部分版块
请登录解锁全部权限
首页
板块
关于
登录
注册
首页
/
Sclub模板修改与美化
Sclub模板修改与美化
102
主题 ·
1236
帖子
1. 本版仅限sclub代码开发者之间的技术交流,以及开发者宣传自己的主题、插件
2. 代码发布请选择“发布”<font color="#c60a00">分类</font>;技术知识分享,请选择“分享”分类;除此之外,请一律选择“交流”分类
3. 发帖请严格按照分类进行发帖,分类错误将直接删帖,情节严重者将做禁言处罚
4. 优秀的“分享”内容可获得金币奖励
5. 不得对他人进行恶意攻击,侮辱,包括图片、回帖等形式,情节严重者将做禁言处罚
全部
精华
最新
热门
最多阅读
2020-4-14
精华
【点击特效】富强民主文明和谐等等
演示效果:大家去我的网站狂点鼠标即可 {:5_280:} 教程: 首先需要安装jq库: 805 模板目录下新建jquery模板,然后粘贴压缩内代码 然后把路径记下来,这2段代码放在头部即可,其中文字可以随便替换 <script src=" <script type="text/javascript"> var a_idx = 0; jQuery(document).ready(function($) { $("body").click(function(e) { var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善"); var $i = $("<span />").text(a ); a_idx = (a_idx + 1) % a.length; var x = e.pageX, y = e.pageY; $i.css({ "z-index": 99999999999999999999999999999999999999999999999999999999999999999999999999 , "top": y - 20, "left": x, "position": "absolute", "font-weight": "bold", "color": "#ff6651" }); $("body").append($i); $i.animate({ "top": y - 180, "opacity": 0 }, 1500, function() { $i.remove(); }); }); }); </script>
2020-4-14
282733 阅读
7 评论
琼斯博士
2018-10-16
批量上传图片附件有预览,插入帖子中不会再搞错了
效果如图: 516 修改方法: 编辑ajax_attachlist模版找到 <span>$attach <a href="javascript:;" class="lighttxt" onclick="{if $attach['isimage']}insertAttachimgTag('$attach '){else}insertAttachTag('$attach '){/if}" title="{lang upload_msg}">$attach </a></span> 在下边加 <span style="float:right;"><!--{if $attach['isimage']}--><img src="$attach /$attach " id="image_$attach " width="$attach " _width="$attach " _height="110" onload="thumbImg(this, 1)" style="max-height: 28px;height: 28px;width: auto;float: right;" /><!--{/if}--></span>
2018-10-16
134979 阅读
14 评论
icode
2020-4-14
【替换匿名头像】让你的论坛更个性一点点
本帖最后由 琼斯博士 于 2020-4-14 21:37 编辑 前言: {:5_280:}因为有时候发帖又不想让人知道是谁发的,比如一些公告贴,或者水帖的开贴者,但默认匿名头像不好看,所以用这个方法更换,高版本的dz论坛貌似可以直接上传图片替换,但是7.2没有ftp权限,所以通过修改模板代码来实现。 1.我们知道阅读页楼层模板是viewthread_node, 搜索noavatar,会找到两处 small大小一处: <img class="xtx" src="/uc_server/avatar.php?uid=$thread['authorid']&size=middle" onerror="this.onerror=null;this.src=' middle大小一处: <div align="center" width="140" height="140"><img src=" height="140" width="140" /> 更换两处图片地址,就可以个性化默认头像了! 如: 808 二:下面是可选部分,根据个人情况安装修改 适用于你的主题列表显示发帖人头像图标例如我的站,不适用于本站 论坛主题列表模板是forumdisplay 搜索noavatar_small可以找到以下代码: <img src=" style="width:25px;height:25px;border:1px solid #ccc;padding:2px;margin:0px;background-color:#fff;">{else}<img src="uc_server/avatar.php?uid=$thread &size=small" style="width:25px;height:25px;border:1px solid #ccc;padding:2px;margin:0px;background-color:#fff;" onerror="this.onerror=null;this.src=' /> 更换图片地址即可~
2020-4-14
167934 阅读
6 评论
琼斯博士
2018-10-16
爱秀代码---帖内发言框美化
1、打开viewthread_node模版找到 {$pluginhooks [$postcount]} 在上边添加 <img height="42" src=" width="36/" style="margin-top: -7px;margin-left: 7px;"> <div><a class="avatar_say" href="space.php?uid=$post " target="_blank" title="$post ">$post </a> $post 说:</div> 2、在css_common模版最下边加 .t_msgfontfix { border: 1px #847777 solid!important; box-shadow: 5px 11px 1px 0px rgba(0, 0, 0, 0.15); border-radius: 5px; padding: 10px; background: #fffff1; } .avatar_say img { width: 40px; } 3、替换链接的图片 517
2018-10-16
193084 阅读
22 评论
icode
2018-9-6
精华
免刷新切换论坛背景,保存到cookie。
安装此代码的前提是,已经安装过 jquery 285 1、新建一个模板命名为 i_set_body 代码是 $jq(document).ready(function(){ var cookieClass = getCookie('class'); $jq("body").attr("class",cookieClass); $jq(".skin_list li").each(function(){ $jq(this).click(function(){ var className=$jq(this).attr("class"); $jq("body").attr("class",className,30); function SetCookie(name,value,day) { var exp = new Date(); exp.setTime(exp.getTime() + day*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } SetCookie("class",className,30); }) }); }); function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca ; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } 2、将下边css放到css_common模板的最下边 #set_style_menu{padding: 6px 10px 10px;} .sslct_btn i {float: left;display: inline;margin: 1px;width: 10px;height: 10px;background: #2E80D1;overflow: hidden;font-style: normal;} #set_style_menu li {float: left;margin: 4px 4px 0 0;width: 12px;height: 12px;border: 1px solid #CDCDCD;cursor: pointer;list-style: none;} #set_style_menu li i {float: left;display: inline;margin: 1px;width: 10px;height: 10px;background: #2E80D1;overflow: hidden;font-style: normal;} .default{background: #FFF url(默认背景图片) repeat-x 0 0;} .red{background: #FCFAF0 url(图片1) no-repeat 50% 0;} .orange{background: #FCFAF0 url(图片2) no-repeat 50% 0;} .blue{background: #FFFFFF url(图片3) no-repeat 50% 0 fixed;text-align: center;} .green{background: #FFF url(图片4) no-repeat 50% 0;} .purple{background: #FFF url(图片5) no-repeat 50% 24px;} #toptb {min-width: 960px;border-bottom: 1px solid #CDCDCD;background: #F2F2F2;line-height: 28px;margin-top: -7px;} .zsc a{float: left;padding: 0 4px;height: 28px;color: #333;} 3、header模板找到 <body id="{CURSCRIPT}" onkeydown="if(event.keyCode==27) return false;"> 在下边加 <div id="set_style_menu" class="p_pop" style="display: none;"> <div class="skin_list"> <li class="default" title="默认"><i></i></li> <li class="red" title="红"><i style="background:#BA350F"></i></li> <li class="orange" title="橙"><i style="background:#FE9500"></i></li> <li class="blue" title="蓝"><i style="background:#0053B9"></i></li> <li class="green" title="青"><i style="background:#429296"></i></li> <li class="purple" title="紫"><i style="background:#9934B7"></i></li> </div> </div> <div id="toptb" class="cl"> <div class="wp" style="margin: 0 auto;width: 960px;"> <div class="zsc" style="float: left;"><a href="javascript:void(0)" onclick="SetHome(this,window.location)">设为首页</a><a href="javascript:void(0)" onclick="shoucang(document.title,window.location)">收藏本站</a><script type="text/javascript">var _speedMark = new Date();</script></div> <div id="y" style="float: right;margin-top: 5px;"> <a href="javascript:" id="set_style" onmouseover="showMenu({'ctrlid':'set_style'});" initialized="true" > <img align="absmiddle" src="图标"> </a> </div> </div> </div> 图标在这里 284 4、最后在第三方放入 <script type="text/javascript" src="templates/default/i_set_body.htm"></script>
2018-9-6
205755 阅读
26 评论
icode
2018-8-26
瀑布流
簡介說明: 这个瀑布流要在所有图片载入完成之后再排序! 預覽圖: 109 以下按裝步驟如下 一首先至後台界面/模版管理新建一个名為:aaa_pubu的模板 将以下内容复制到貼上该模板文件內: <!--{if ($_GET["op"]=="pubu")}--> {subtemplate header} <style>.clearfix{clear:both}#wrapper{width:100%;}#wrapper hgroup{text-align:center}#wrapper h2{margin:5px 0;color:#ff6d99;text-shadow:1px 1px 2px #a50031;font-size:33px;font-family:Arial Narrow,Arial,sans-serif}#wrapper h3{font-style:italic;font-weight:normal;font-size:18px;text-shadow:1px 1px 0 #fff;color:#888;margin:5px 0}#container{position:relative;width:960px;margin:0 auto 25px;padding-bottom:10px}.grid{width:188px;min-height:100px;padding:15px;background:#fff;margin:8px;font-size:12px;float:left;box-shadow:0 1px 3px rgba(34,25,25,0.7);-moz-box-shadow:0 1px 3px rgba(34,25,25,0.7);-webkit-box-shadow:0 1px 3px rgba(34,25,25,0.7);-webkit-transition:top 1s ease,left 1s ease;-moz-transition:top 1s ease,left 1s ease;-o-transition:top 1s ease,left 1s ease;-ms-transition:top 1s ease,left 1s ease}.grid strong{border-bottom:1px solid #ccc;margin:10px 0;display:block;padding:0 0 5px;}.grid .meta{text-align:right;color:#777;font-style:italic}.grid .imgholder img{max-width:100%;background:#ccc;display:block}@media screen and (max-width :1240px){body{overflow:auto}}@media screen and (max-width :900px){#backlinks{float:none;clear:both}#backlinks a{display:inline-block;padding-right:20px}#wrapper{margin-top:90px}}#filters{list-style-type:none;text-align:center;margin:0 5% 0 11%}#filters li{font-size:12px;float:left;padding:6px 0 4px 0;cursor:pointer;margin:0 1% 0 1%;width:8%;-webkit-transition:all .15s ease-out;-moz-transition:all .15s ease-out;-o-transition:all .15s ease-out;transition:all .15s ease-out;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#filters li:hover{background:#dedede}</style> <div id="nav"><a href="$indexname">$bbname</a> » 瀑布流</div> <div style="border: 1px solid rgb(208,208,208);width: 960px;margin: 0 auto;"> <section id="wrapper"> <div id="container"> {eval request('自定义_瀑布流');} </div> </section> </div> {subtemplate footer} <!--{/if}--> 二至工具/数据调用 1新建一个名为自定义_瀑布流的主题列表 調整內容显示数据条数:100(建议而已) 数据缓存时间(秒):1(建议而已) 2自定义_瀑布流的主题列表,內框內 写入以下内容: ;if(!Array.prototype.indexOf){Array.prototype.indexOf=function(a){var b=this.length>>>0;var c=Number(arguments[1])||0;c=c<0?Math.ceil(c):Math.floor(c);if(c<0)c+=b;for(;c<b;c++){if(c in this&&this ===a)return c}return-1}}var f=function(){e=[];for(var a=0;a<b.numOfCol;a++){g("empty-"+a,a,0,1,-b.offsetY)}};var g=function(a,c,d,f,g){for(var h=0;h<f;h++){var i=new Object;i.x=c+h;i.size=f;i.endY=d+g+b.offsetY*2;e.push(i)}};var h=function(a,b){for(var c=0;c<b;c++){var d=i(a+c,"x");e.splice(d,1)}};var i=function(a,b){for(var c=0;c<e.length;c++){var d=e ;if(b=="x"&&d.x==a){return c}else if(b=="endY"&&d.endY==a){return c}}};var j=function(a,b){var c=[];for(var d=0;d<b;d++){c.push(e .endY)}var f=Math.min.apply(Math,c);var g=Math.max.apply(Math,c);return };var k=function(a){if(a>1){var b=e.length-a;var c=false;var d,f;for(var g=0;g<e.length;g++){var h=e ;var i=h.x;if(i>=0&&i<=b){var k=j(i,a);if(!c){c=true;d=k;f=i}else{if(k[1]<d[1]){d=k;f=i}}}}return ]}else{d=j(0,e.length);return ,d[0]]}};var l=function(a,c){if(!a.data("size")||a.data("size")<0){a.data("size",1)}else if(a.data("size")>b.numOfCol){a.data("size",b.numOfCol)}var e=k(a.data("size"));var f=d*a.data("size")-(a.outerWidth()-a.width());a.css({width:f-b.offsetX*2,left:e[0]*d,top:e[1],position:"absolute"});var i=a.outerHeight();h(e[0],a.data("size"));g(a.attr("id"),e[0],e[1],a.data("size"),i)};a.fn.BlocksIt=function(g){if(g&&typeof g==="object"){a.extend(b,g)}c=a(this);d=c.width()/b.numOfCol;f();c.children(b.blockElement).each(function(b){l(a(this),b)});var h=j(0,e.length);c.height(h[1]+b.offsetY);return this}})(jQuery)</script> <script> jQuery.noConflict(); var jq=jQuery; jq(document).ready(function() { //blocksit define jq(window).load( function() { jq('#container').BlocksIt({ numOfCol: 5, offsetX: 8, offsetY: 8, blockElement: '.grid' }); }); //window resize var currentWidth = 1100; jq(window).resize(function() { var winWidth = jq(window).width(); var conWidth; if(winWidth < 660) { conWidth = 440; col = 2 } else if(winWidth < 880) { conWidth = 660; col = 3 } else if(winWidth < 1100) { conWidth = 880; col = 4; } else { conWidth = 1100; col = 5; } if(conWidth != currentWidth) { currentWidth = conWidth; jq('#container').width(conWidth); jq('#container').BlocksIt({ numOfCol: col, offsetX: 8, offsetY: 8 }); } }); }); </script> <div class="grid"> <div class="imgholder"> <a href="{link}"><img src="{imgattach}" /></a> </div> <strong>{subject}</strong> <p>{message}</p> <div class="meta">by :<a>{author_nolink}</a></div> </div> 三最后在faq模板最上面加入[ code] {subtemplate aaa_pubu} 備註:記得事先備份你,要修改該模版的代碼原文件先 以免修改後有異常現象發生,可以立既恢復原狀。 以上提供各位參考。
2018-8-26
339162 阅读
47 评论
老闆
2023-2-15
头部
<script src="templates/colors/jquery_331.htm"></script> <script src="templates/colors/jjj.htm"></script> <script src="templates/colors/i_yudu.htm"></script> <script src="templates/colors/i_yczd.htm"></script> <script src="templates/colors/d_move.htm"></script> <script src="templates/colors/croom_move.htm"></script> <script src="templates/colors/postinner.htm"></script> <script src="templates/colors/i_footprint.htm"></script> <script src="templates/colors/atx_2.htm"></script> <script src="templates/colors/i_chatroom.htm"></script> <script>if(location.href.indexOf("redirect.php?tid=12&goto=lastpost#lastpost") > 0){document.location.href=" <link rel="Shortcut Icon" href="
2023-2-15
126269 阅读
1 评论
icode
2018-9-27
discuz 7.2至 discuzx3主题评鉴图章位子调整方法
预览图: 464 7.2调整位子修改 如下: 至templates/default/css_script.htm文件 查找 #threadstamp { position:absolute;margin-top: -70px;margin-left:300px; } 替换为 #threadstamp { position:absolute;margin-top: -60px;margin-left:450px; } 2其它x係列版本修改方法 你的模板风格里找到module.css #threadstamp img { position: absolute; top: -20px; right: 140px; } 主题评鑒图 1 482 2 475 3 476 4 477 5 481 6 480 7 479 8 478 记得请自行先备份,原始该文件,以免修改错误情况 可立既恢複原状 該主題鑑評圖,修正去除AD字樣,以更新完成
2018-9-27
117811 阅读
19 评论
老闆
2020-10-1
美化版discuz 7.2【20200919】
hi,大家好啊,这个是我自己高仿X3.1的discuz 7.2包 【Version:20200919】 1.集成JQ库模板 2.集成仿X3.1图标 3.删除其他自带模板风格,只保留默认风格模板及jeans风格模板 4.自带仿X3模板(整套) 5.删除discuz默认插件 6.集成discuz 7.2专属的云平台 7.集成常用模板 932 933
2020-10-1
122363 阅读
17 评论
夜影夜空
2018-11-13
精华
首页添加自定义板块
如图: 652 预览地址 安装方法: 1、打开discuz模板找到 <!--{if $_DCACHE['forumlinks'][0] || $_DCACHE['forumlinks'][1] || $_DCACHE['forumlinks'][2]}--> 在上边加 <div id="wj-tb" class="wj-chat"> <ul> <li id="wj-tbm_1" onmouseover="x:HoverLiz(1);" class="wj-tlb-hover1">AAAAA</li> <li id="wj-tbm_2" onmouseover="x:HoverLiz(2);" class="wj-tlb-normal1">BBBBB</li> <li id="wj-tbm_3" onmouseover="x:HoverLiz(3);" class="wj-tlb-normal1">CCCCC</li> </ul> </div> <div style="height: 380px;border: solid #DDDDDD;border-width: 1px;border-top: none;background: #fff;border-radius: 5px;margin-bottom: 20px;"> <div class="wj-tlb-dism" id="wj-tbcm_01"> <ul style="padding-top: 24px;margin-left: 11px;"> {eval request('主题列表_573');} </ul> </div> <div class="wj-tlb-undism" id="wj-tbcm_02"> <ul style="padding-top: 24px;margin-left: 11px;"> {eval request('主题列表_573_aA4');} </ul> </div> <div class="wj-tlb-undism" id="wj-tbcm_03"> <ul style="padding-top: 24px;margin-left: 11px;"> {eval request('主题列表_573_mIK');} </ul> </div> </div> <script> function g(o) { return document.getElementById(o); } function HoverLiz(n) { for(var i=1;i<=3;i++) { g('wj-tbm_'+i).className='wj-tlb-normal1'; g('wj-tbcm_0'+i).className='wj-tlb-undism'; } g('wj-tbcm_0'+n).className='wj-tlb-dism'; g('wj-tbm_'+n).className='wj-tlb-hover1'; } </script> 2、在css_append加 .wj-chat { background: #fff; line-height: 45px; margin-bottom: 20px; font-size: 16px; border-radius: 5px; background-color: #ecf2f4; overflow: hidden; } .wj-chat ul { height: 32px; padding-left: 5px; line-height: 30px; } .wj-chat li { float: left; text-align: center; width: 150px; } .wj-tlb-hover1 { background: #FFF; font-weight: 700; color: #333; display: block; margin-top: 2px; } .wj-tlb-normal1 { display: block; } .wj-tlb-dism { display: block; } .wj-tlb-undism { display: none; } ul,li { list-style: none; } .wj-tlb-dism li { float: left; white-space: nowrap; margin: 0 10px 10px 0; text-overflow: ellipsis; padding: 10px; border: solid #DDDDDD; border-width: 1px; background-color: #F8F8F8; text-align: center; overflow: hidden; } 3、解压下面文件后在后台数据调用导入 653
2018-11-13
155587 阅读
6 评论
icode
2018-8-29
精华
两步安装X系列搜索框(无需上传图片,外链永久有效。)
只需两步安装精仿X系列搜索框(无需上传图片,外链永久有效。) 186 187 1、新建一个模版命名为search_bar,内容是 <style> #scbar_type_menu li {text-align: left;} #scbar_type_menu a:hover{color:#369!important;} #scbar_type_menu li:hover{background:#E5EDF2;} #tlbscbar{margin:0 auto;width:961px;height:1px;line-height:30px} #scbar{position:relative;overflow:hidden;height:42px;border-top:1px solid #FFF;border-bottom:1px solid #e9eff5;background:#e8eff5;line-height:42px} #scbar{background-position:0 0;background-repeat:repeat-x} #scbar td{padding:0} #scbar_txt{margin-bottom:2px;width:260px;outline:0;border:1px solid #FFF;font-size:12px} #scbar_type{display:block;padding-left:10px;text-align:left;text-decoration:none} #scbar_btn{overflow:hidden;margin:0;padding:0;height:28px;border:0;background:transparent none;cursor:pointer} #scbar_hot{overflow:hidden;padding-left:8px;height:45px} #scbar_hot a,#scbar_hot strong{float:left;margin-right:8px;white-space:nowrap;line-height:44px} #scbar{border:1px solid #c2d5e3;border-top-width:0!important;border-left-width:1px!important;border-right-width:1px!important} #scbar{position:relative;overflow:visible} #scbar_txt:focus{width:260px} #scbar_hot a{color:#369!important;font-size:12px} .scbar_narrow #sg{width:260px} .scbar_txt_td,.scbar_type_td{background:url( repeat-x 0 -93px} .scbar_icon_td{width:21px;background:url( no-repeat 0 -50px} .scbar_type_td{width:61px;background:url( no-repeat 0 -193px} .scbar_btn_td{width:38px;background:url( no-repeat 8px -142px} .xg1,.xg1 a{color:#999} .xs2{color:#369;font-size:12px} .pn strong{margin:8px 0 0 8px;padding:14px;line-height:84px;cursor:pointer} .xw1{font-weight:700} #sousuo{margin:0 auto 5px} .stype{margin:0 0 0 6px;border:0;color:#999;font-size:12px} #sg{width:456px;border:1px solid #b2c7da;background:#FFF} #sg li{padding:0 8px;font-size:14px;line-height:30px} #sg li span{color:#999} .sml{background:#FFF;cursor:default} .smo{background:#e5edf2;cursor:default} .p_pop a{display:block;padding:3px 5px;border-bottom:1px solid #e5edf2;white-space:nowrap} .p_pof,.p_pop,.sllt{padding:4px;min-width:60px;border:1px solid;border-color:#DDD;background:#fefefe;box-shadow:1px 2px 2px rgba(0,0,0,.3)} .select_box{position:relative;padding-right:10px;width:45px;background:url( no-repeat 160px center} .select_box span{display:block;overflow:hidden;margin:0;width:100%;height:25px;color:#999;line-height:25px;cursor:pointer} .select_box ul li{cursor:pointer} .son_ul{position:absolute;top:25px;left:0;z-index:99;width:54px;border:1px dashed #ccc;background:#fff} .son_ul li{display:block;padding:3px 5px;width:45px;line-height:25px} .select_box li:hover{background:#e5edf2} .select_box li a:hover{color:#369!important;text-decoration:none} #clab {cursor: pointer;} </style> <div id="tlbscbar"> <div id="scbar" class="cl"> <form id="scbar_form" method="{if $_G && !empty($searchparams )}get{else}post{/if}" autocomplete="off" onsubmit="searchFocus($('scbar_txt'))" action="{if $_G && !empty($searchparams )}$searchparams {else}search.php?searchsubmit=yes{/if}" target="_blank"> <input type="hidden" name="mod" id="scbar_mod" value="search" /> <input type="hidden" name="formhash" value="{FORMHASH}" /> <input type="hidden" name="srchtype" value="title" /> <input type="hidden" name="srhfid" value="$_G " /> <input type="hidden" name="srhlocality" value="$_G['basescript']::{CURMODULE}" /> <!--{if !empty($searchparams )}--> <!--{loop $searchparams $key $value}--> <!--{eval $srchotquery .= '&' . $key . '=' . rawurlencode($value);}--> <input type="hidden" name="$key" value="$value" /> <!--{/loop}--> <input type="hidden" name="source" value="discuz" /> <input type="hidden" name="fId" id="srchFId" value="$_G " /> <input type="hidden" name="q" id="cloudsearchquery" value="" /> <div style="display: none; position: absolute; top:37px; left:44px;" id="sg"> <div id="st_box" cellpadding="2" cellspacing="0"></div> </div> <!--{/if}--> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="scbar_icon_td"></td> <td class="scbar_txt_td"> <input type="text" name="srchtxt" id="scbar_txt" autocomplete="off" class=" xg1" baidusug="1" x-webkit-speech="" x-webkit-grammar="bUIltin:search" placeholder="请输入搜索内容"> </td> <td class="scbar_type_td"> <a href="javascript:;" id="scbar_type" class="xg1" onclick="showMenu(this.id)" hidefocus="true">帖子</a> </td> <td class="scbar_btn_td"> <button type="submit" name="searchsubmit" id="scbar_btn" class="pn pnc" value="true"> <strong class="xi2 xs2" color="#000000">搜索</strong> </button> </td> <td class="scbar_hot_td"> <div id="scbar_hot"> <strong class="xw1">热搜: </strong> {eval request('边栏模块_标签');} </div> </td> </tr> </tbody> </table> </form> </div> </div> <ul id="scbar_type_menu" class="p_pop" style="display: none;"> <li><a id="clab" type="button" onclick="myFunction()">帖子</a></li> <li><a id="clab" type="button" onclick="myFunction1()">用户</a></li> </ul> <script> function myFunction() { x = document.getElementById("scbar_type"); x.innerHTML = "帖子"; } function myFunction1() { y = document.getElementById("scbar_type") y.innerHTML = "用户" } </script> 2、打开header模版找到 $pluginhooks 在它的上边加代码 {subtemplate search_bar} 即可。
2018-8-29
106968 阅读
48 评论
icode
2018-11-3
精华
discuz7.2翻页特效代码,爱秀代码首发。
重新编写翻页代码,页码条精简为5页,加入上一页按钮,加入输入页码跳转,随意定义颜色样式。 修改后如图: 615 614 616 页码有板块和帖子两处,要分别修改。 一、修改板块翻页 1、编辑forumdisplay模板找到 $multipage 一共有两个 ,修改为 <!--{if $maxpage > 1}--> <div class="page"> {eval $bpage = $page - 1;} {eval $npage = $page + 1;} <!--{if $bpage==0}--> <a href="javascript:;" class="greynone">上一页</a> <!--{else}--> <a href="forumdisplay.php?fid=$fid&page=$bpage" class="grey">上一页</a> <!--{/if}--> {eval $pbpage = $page - 2;} {eval $papage = $page - 1;} {eval $napage = $page + 1;} {eval $nbpage = $page + 2;} {eval $endpage = $maxpage - 2;} <!--{if $page>4}--> <a href="forumdisplay.php?fid=$fid&page=1" class="icodepa">1 ...</a> <!--{/if}--> <a {if $page<3}style="display:none;"{/if} href="forumdisplay.php?fid=$fid&page=$pbpage" class="icodepa">$pbpage</a> <a {if $page<2}style="display:none;"{/if} href="forumdisplay.php?fid=$fid&page=$papage" class="icodepa">$papage</a> <a href="forumdisplay.php?fid=$fid&page=$page" style="background-color: #f26c4f;" class="icodepa">$page</a> <a {if $napage>$maxpage}style="display:none;"{/if} href="forumdisplay.php?fid=$fid&page=$napage" class="icodepa">$napage</a> <a {if $nbpage>$maxpage}style="display:none;"{/if} href="forumdisplay.php?fid=$fid&page=$nbpage" class="icodepa">$nbpage</a> <!--{if $maxpage>4}--> <!--{if $page==1}--> <a href="forumdisplay.php?fid=$fid&page=4" class="icodepa">4</a> <a href="forumdisplay.php?fid=$fid&page=5" class="icodepa">5</a> <!--{elseif $page==2}--> <a href="forumdisplay.php?fid=$fid&page=5" class="icodepa">5</a> <!--{/if}--> <!--{/if}--> <!--{if $page<$endpage}--> <a href="forumdisplay.php?fid=$fid&page=$maxpage" class="icodepa">...Max</a> <!--{/if}--> <div class="pgzongyeshu"> <label> <input name="custompage" title="输入页码,按回车快速跳转" class="px" onkeydown="if(event.keyCode==13) {window.location='forumdisplay.php?fid=$fid&page='+this.value;; doane(event);}" type="text" size="2" value="$page" style="height:14px;margin-top: -6px;"> <span title="共 $maxpage 页"> / $maxpage 页 </span> </label> </div> <!--{if $page==$maxpage}--> <a href="javascript:;" class="prevnone">下一页</a> <!--{else}--> <a href="forumdisplay.php?fid=$fid&page=$npage" class="prev">下一页</a> <!--{/if}--> </div> <!--{/if}--> 2、然后在 {subtemplate header} 下边加 <style> .pgzongyeshu { float: left; display: inline; border-radius: 3px; margin: 0 4px; padding: 0 6px; height: 26px; border: 1px solid; border-color: #f26c4f73; background-color: #f26c4f73; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .icodepa { float: left; display: inline; margin-left: 4px; border-radius: 3px; padding: 0 8px; height: 26px; border: 1px solid; border-color: #f26c4f73; background-color: #f26c4f73; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .grey { border: 1px solid #f26c4f; border-radius: 3px; padding: 5px 20px; background: #f26c4f; color: #fff; line-height: 16px; float: left; } .greynone { color: #ebf2f5; background: #f26c4f73; border: 1px solid #f26c4f73; border-radius: 3px; padding: 5px 20px; line-height: 16px; float: left; } .prev { border: 1px solid #f26c4f; border-radius: 3px; padding: 5px 20px; background: #f26c4f; color: #fff; line-height: 16px; float: left; } .prevnone { color: #ebf2f5; background: #f26c4f73; border: 1px solid #f26c4f73; border-radius: 3px; padding: 5px 20px; line-height: 16px; float: left; } .pgzongyeshu .px { color: #f26c4f; border: none; } .page{ float: right; line-height: 28px; } </style> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 二、修改帖子页翻页 1、编辑viewthread模板找到 $multipage 一共有两个 ,修改为 <!--{if $maxpage > 1}--> <div class="page"> {eval $bpage = $page - 1;} {eval $npage = $page + 1;} <!--{if $bpage==0}--> <a href="javascript:;" class="greynone">上一页</a> <!--{else}--> <a href="thread-$tid-$bpage-1.html" class="grey">上一页</a> <!--{/if}--> {eval $pbpage = $page - 2;} {eval $papage = $page - 1;} {eval $napage = $page + 1;} {eval $nbpage = $page + 2;} {eval $endpage = $maxpage - 2;} <!--{if $page>4}--> <a href="thread-$tid-1-1.html" class="icodepa">1 ...</a> <!--{/if}--> <a {if $page<3}style="display:none;"{/if} href="thread-$tid-$pbpage-1.html" class="icodepa">$pbpage</a> <a {if $page<2}style="display:none;"{/if} href="thread-$tid-$papage-1.html" class="icodepa">$papage</a> <a href="thread-$tid-$page-1.html" style="background-color: #2196F3;" class="icodepa">$page</a> <a {if $napage>$maxpage}style="display:none;"{/if} href="thread-$tid-$napage-1.html" class="icodepa">$napage</a> <a {if $nbpage>$maxpage}style="display:none;"{/if} href="thread-$tid-$nbpage-1.html" class="icodepa">$nbpage</a> <!--{if $maxpage>4}--> <!--{if $page==1}--> <a href="thread-$tid-4-1.html" class="icodepa">4</a> <a href="thread-$tid-5-1.html" class="icodepa">5</a> <!--{elseif $page==2}--> <a href="thread-$tid-5-1.html" class="icodepa">5</a> <!--{/if}--> <!--{/if}--> <!--{if $page<$endpage}--> <a href="thread-$tid-$maxpage-1.html" class="icodepa">...Max</a> <!--{/if}--> <div class="pgzongyeshu"> <label> <input name="custompage" title="输入页码,按回车快速跳转" class="px" onkeydown="if(event.keyCode==13) {window.location='viewthread.php?tid=$tid&page='+this.value;; doane(event);}" type="text" size="2" value="$page" style="height:14px;margin-top: -6px;"> <span title="共 $maxpage 页"> / $maxpage 页 </span> </label> </div> <!--{if $page==$maxpage}--> <a href="javascript:;" class="prevnone">下一页</a> <!--{else}--> <a href="thread-$tid-$npage-1.html" class="prev">下一页</a> <!--{/if}--> </div> <!--{/if}--> 2、然后在 {subtemplate header} 下边加 <style> .pgzongyeshu { float: left; display: inline; border-radius: 3px; margin: 0 4px; padding: 0 6px; height: 26px; border: 1px solid; border-color: #f26c4f73; background-color: #f26c4f73; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .icodepa { float: left; display: inline; margin-left: 4px; border-radius: 3px; padding: 0 8px; height: 26px; border: 1px solid; border-color: #f26c4f73; background-color: #f26c4f73; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .grey { border: 1px solid #f26c4f; border-radius: 3px; padding: 5px 20px; background: #f26c4f; color: #fff; line-height: 16px; float: left; } .greynone { color: #ebf2f5; background: #f26c4f73; border: 1px solid #f26c4f73; border-radius: 3px; padding: 5px 20px; line-height: 16px; float: left; } .prev { border: 1px solid #f26c4f; border-radius: 3px; padding: 5px 20px; background: #f26c4f; color: #fff; line-height: 16px; float: left; } .prevnone { color: #ebf2f5; background: #f26c4f73; border: 1px solid #f26c4f73; border-radius: 3px; padding: 5px 20px; line-height: 16px; float: left; } .pgzongyeshu .px { color: #f26c4f; border: none; } .page{ float: right; line-height: 28px; } </style> 三,如果想修改色系,我在这里提供三种配色,代码如下 橙色 .pgzongyeshu { float: left; display: inline; border-radius: 3px; margin: 0 4px; padding: 0 6px; height: 26px; border: 1px solid; border-color: #f26c4f73; background-color: #f26c4f73; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .icodepa { float: left; display: inline; margin-left: 4px; border-radius: 3px; padding: 0 8px; height: 26px; border: 1px solid; border-color: #f26c4f73; background-color: #f26c4f73; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .grey { border: 1px solid #f26c4f; border-radius: 3px; padding: 5px 20px; background: #f26c4f; color: #fff; line-height: 16px; float: left; } .prev { border: 1px solid #f26c4f; border-radius: 3px; padding: 5px 20px; background: #f26c4f; color: #fff; line-height: 16px; float: left; } .prevnone { color: #ebf2f5; background: #f26c4f73; border: 1px solid #f26c4f73; border-radius: 3px; padding: 5px 20px; line-height: 16px; float: left; } .pgzongyeshu .px { color: #f26c4f; border: none; } .page{ float: right; line-height: 28px; } 绿色 .grey { border: 1px solid #4CAF50; border-radius: 3px; padding: 5px 20px; background: #4CAF50; color: #fff; line-height: 16px; float: left; } .icodepa { float: left; display: inline; margin-left: 4px; border-radius: 3px; padding: 0 8px; height: 26px; border: 1px solid; border-color: #4caf506e; background-color: #4caf506e; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .pgzongyeshu { float: left; display: inline; border-radius: 3px; margin: 0 4px; padding: 0 6px; height: 26px; border: 1px solid; border-color: #4CAF50; background-color: #4CAF50; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .pgzongyeshu .px { color: #4CAF50; border: none; } .prev { border: 1px solid #4CAF50; border-radius: 3px; padding: 5px 20px; background: #4CAF50; color: #fff; line-height: 16px; float: left; } .page{ float: right; line-height: 28px; } 蓝色 .grey { border: 1px solid #2196F3; border-radius: 3px; padding: 5px 20px; background: #2196F3; color: #fff; line-height: 16px; float: left; } .icodepa { float: left; display: inline; margin-left: 4px; border-radius: 3px; padding: 0 8px; height: 26px; border: 1px solid; border-color: #2196f37a; background-color: #2196f37a; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .pgzongyeshu { float: left; display: inline; border-radius: 3px; margin: 0 4px; padding: 0 6px; height: 26px; border: 1px solid; border-color: #2196F3; background-color: #2196F3; background-repeat: no-repeat; color: #fff; overflow: hidden; text-decoration: none; } .pgzongyeshu .px { color: #2196F3; border: none; } .prev { border: 1px solid #2196F3; border-radius: 3px; padding: 5px 20px; background: #2196F3; color: #fff; line-height: 16px; float: left; } .page{ float: right; line-height: 28px; }
2018-11-3
216128 阅读
31 评论
icode
2021-3-30
社区风格帖子信息分类美化完整版(佳品水族首发)
分类信息显示的样式 948 发帖显示的样式,可自行上传图片 949 后台→板块→分类信息选项 创建一下名称以及变量 显示顺序 名称 变量名 类型 1 演示图片 tupian 图片(image) 2 风格名称 fenggemingcheng 字串(text) 3 适用版本 banben 字串(text) 4 语言编码 yuyanbianma 字串(text) 5 适用站点 shiyongzhandian 字串(text) 6 版权所属 suoshu 字串(text) 然后到 板块→分类信息类别 风格信息 添加好后,点击 详情 950 把下面代码复制到 “风格信息 - 分类信息帖子显示模板”下面 <div class="moban_info cl"> <div class="moban_left"> <ul> <li>{fenggemingcheng} : </li> <li>{banben} : </li> <li>{yuyanbianma} : </li> <li>{shiyongzhandian} : </li> <li>{suoshu} : </li> <li style="border:0;color:#FF4416 !important;">版权所有,禁止匿名转载;禁止商业使用;侵权请联系站内管理。</li> <div id="td_0730"> <div id="td_0732"> <div class="bm_t0"><span onclick="window.open(' </span> </div> </ul></div> <div class="cl"></div> </div> <style> #td_0730 {position: relative; top: -215px; right: -482px;}.bm_t0 img {width: 240px;height: 220px;border-right: 1px solid #e6e6e6;padding: 1px;}.bm_t0 {width: 1px;height: 1px;} .moban_info:hover { border: 1px solid #0079FF; } .moban_info { padding: 15px 20px 5px; border: 1px solid #CCC; border-radius: 8px; margin-bottom: 14px; }.moban_left { float: left; width: 490px; }.moban_info ul { margin-bottom: 10px; }.moban_info li { background-image: url( color: #8D9095; background-position: 0px center; background-repeat: no-repeat; display: block; padding-left: 25px; height: 34px; line-height: 34px; border-bottom: 1px solid #E1E1E1; } </style> 代码中的图片请替换下,图片随时会失效 提交 最后到版块管理→编辑版块→分类信息→启用分类信息:是→选择(风格信息)提交 更新缓存 951
2021-3-30
320765 阅读
10 评论
开心
2018-10-16
爱秀代码---板块主题下显示帖子缩略图
516 修改方法: 1、打开forumdisplay模版找到 <!--{if $thread }--> <span class="threadpages">$thread </span> <!--{/if}--> </th> 在 </th> 的上边加 {eval $q2 = $db->query("SELECT * FROM cdb_attachments WHERE tid='".$thread ."' AND isimage !=0 ORDER BY pid DESC LIMIT 5");} {eval $icodeimg=Array();} {eval $i=0;} {eval while ($asdfgh=$db->fetch_array($q2)) $icodeimg[$i++] = $asdfgh ; } {eval while ($asdfgh=$db->fetch_array($q2)) $q2 =$asdfgh ;} <div class="mbn savephotop"> <!--{loop $icodeimg $thing}--> <li><a href="javascript:void(0);"><img src="attachments/$thing "></a></li> <!--{/loop}--> </div> 2、然后把下边代码放到css_common的最下边即可 .savephotop li { list-style: none; float: left; width: 100px; overflow: hidden; display: table-cell; height: 100px; text-align: center; vertical-align: middle; padding-right: 5px; } .savephotop li img { width: 100px; height: auto; min-height: 100px; }
2018-10-16
76828 阅读
26 评论
icode
2018-10-16
爱秀代码---指定板块默认为图片模式
1、新建一个模版命名为default_image_mode内容是 {subtemplate header} <!--{if $forum['ismoderator']}--> <script type="text/javascript" src="{$jspath}moderate.js?{VERHASH}"></script> <!--{/if}--> <div id="nav"><a id="fjump" href="$indexname"{if $forumjump == 1} class="dropmenu" onmouseover="showMenu({'ctrlid':this.id})"{/if}>$bbname</a> $navigation</div> <!--{if $admode && !empty($advlist['text'])}--> <div id="ad_text" class="ad_text" > <table summary="Text Ad" cellpadding="0" cellspacing="0">$advlist </table> </div> <!--{else}--> <div id="ad_text"></div> <!--{/if}--> <div id="wrap"{if $infosidestatus['allow'] < 2} class="wrap s_clear"{else} class="wrap with_side s_clear"{/if}> <!--{if $infosidestatus == 2}--> <a id="sidebar_img" href="javascript:;" onclick="sidebar_collapse(['{lang sidebar_collapsed_yes}', '{lang sidebar_collapsed_no}']);" class="$collapseimg "><!--{if $collapseimg == 'collapsed_yes'}-->{lang sidebar_collapsed_yes}<!--{else}-->{lang sidebar_collapsed_no}<!--{/if}--></a> <!--{elseif $infosidestatus == 1}--> <a id="sidebar_img" href="javascript:;" onclick="sidebar_collapse(['', '{lang sidebar_collapsed_no}']);" class="collapsed_yes">{lang sidebar_collapsed_yes}</a> <!--{/if}--> <div class="main"> <div class="content"> $pluginhooks <div id="forumheader" class="s_clear"> <h1 style="{if $forum }color: {$forum };{/if}">$forum </h1> <p class="forumstats">[ <strong>$forum </strong> {lang thread} / {echo $forum -$forum } {lang reply} ]</p> <div class="forumaction"> <div class="right"> $pluginhooks <!--{if $discuz_uid}--> <a href="my.php?item=attention&type=forum&action=add&fid=$fid" id="ajax_attention" class="attention" onclick="ajaxmenu(this);doane(event);">{lang attention_forum}</a> <a href="my.php?item=favorites&fid=$fid" id="ajax_favorite" onclick="ajaxmenu(this);doane(event);">{lang thread_favorite}</a> <!--{/if}--> <!--{if $rssstatus}--><a href="rss.php?fid=$fid&auth=$rssauth" target="_blank" class="feed">RSS</a><!--{/if}--> </div> <!--{if $forum['recyclebin'] && $forum['ismoderator']}--> <a href="{if $adminid == 1}admincp.php?action=recyclebin&frames=yes{elseif $forum['ismoderator']}modcp.php?action=recyclebins&fid=$fid{/if}" class="recyclebin" target="_blank">{lang forum_recyclebin}</a> <!--{/if}--> </div> <!--{if $forum }--><p class="channelinfo">{lang forum_description}: $forum </p><!--{/if}--> <p id="modedby"> <!--{if $forum['ismoderator']}--> <div class="modlink"> $pluginhooks <!--{if $forum['modworks']}--> <!--{if $reportnum}--><a href="modcp.php?action=report&fid=$fid" target="_blank">{lang mod_works_report_existence}</a> |<!--{/if}--> <!--{if $modnum}--><a href="modcp.php?action=moderate&op=threads&fid=$fid" target="_blank">{lang mod_works_modpost_existence}</a> |<!--{/if}--> <!--{if $modusernum}--><a href="modcp.php?action=moderate&op=members&fid=$fid" target="_blank">{lang mod_works_moduser_existence}</a> |<!--{/if}--> <!--{/if}--> <a href="modcp.php?fid=$fid" target="_blank">{lang modcp}</a> </div> <!--{/if}--> {lang forum_modedby}: <!--{if $moderatedby}-->$moderatedby<!--{else}-->{lang forum_opening}<!--{/if}--> </p> </div> $pluginhooks <!--{if $forum['recommendlist'] || $forum['rules']}--> <div id="modarea" class="s_clear"> <div class="list"> <span class="headactions"><img onclick="toggle_collapse('modarea_c');" alt="{lang spread}" title="{lang spread}" src="{IMGDIR}/$collapseimg .gif" id="modarea_c_img" class="toggle" /></span> <h3> <!--{if $forum['recommendlist']}--> <a href="javascript:;" id="tab_1" class="current" {if $forum['rules']} onclick="switchTab('tab', 1, 2)"{/if}>{lang forum_recommend}</a><!--{if $forum['ismoderator'] && $allowrecommendthread}--><a href="modcp.php?action=forums&op=recommend&show=all&fid=$fid" target="_blank">[{lang edit}]</a><!--{/if}--> <!--{/if}--> <!--{if $forum['recommendlist'] && $forum['rules']}--><span class="pipe">|</span><!--{/if}--><!--{if $forum['rules']}--><a href="javascript:;" id="tab_2"{if !$forum['recommendlist']} class="current"{/if} {if $forum['recommendlist']} onclick="switchTab('tab', 2, 2)"{/if}>{lang forum_rules}</a><!--{/if}--> </h3> </div> <div id="modarea_c" style="$collapse "> <!--{if $forum['recommendlist']}--> <div id="tab_c_1"> {subtemplate recommend} </div> <!--{/if}--> <!--{if $forum['rules']}--> <div id="tab_c_2"{if $forum['recommendlist']} style="display:none"{/if} class="rule">$forum </div> <!--{/if}--> </div> </div> <!--{/if}--> <!--{if $subexists}--> <div id="subforum" class="mainbox list">{template forumdisplay_subforum}</div> <!--{/if}--> $pluginhooks <div class="pages_btns s_clear"> $multipage <span <!--{if $visitedforums}-->id="visitedforums" onmouseover="$('visitedforums').id = 'visitedforumstmp';this.id = 'visitedforums';showMenu({'ctrlid':this.id})"<!--{/if}--> class="pageback"><a href="$indexname">{lang return_index}</a></span> <span class="postbtn" id="newspecial" prompt="post_newthread" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"><a href="post.php?action=newthread&fid=$fid"{if !$forum['allowspecialonly']} onclick="showWindow('newthread', this.href);return false;"{/if}>{lang send_posts}</a></span> </div> <!--{if $forum['threadtypes'] && $forum['threadtypes']['listable'] || $forum['threadsorts']}--> <div class="threadtype"> <!--{if $forum['threadtypes'] && $forum['threadtypes']['listable']}--> <p> <!--{if $typeid || $sortid}--><a href="forumdisplay.php?fid=$fid">{lang forum_viewall}</a><!--{else}--><strong>{lang forum_viewall}</strong><!--{/if}--> <!--{loop $forum['threadtypes']['flat'] $id $name}--><!--{if $typeid != $id}--><a href="forumdisplay.php?fid=$fid&filter=type&typeid=$id$sortadd">$name</a><!--{else}--><strong>$name</strong><!--{/if}--> <!--{/loop}--> <!--{if $forum['threadtypes']['selectbox']}--> <span id="threadtypesmenu" class="dropmenu" onmouseover="showMenu({'ctrlid':this.id})">{lang admin_type_more}</span> <div class="popupmenu_popup headermenu_popup" id="threadtypesmenu_menu" style="display: none"> <ul> <!--{loop $forum['threadtypes']['selectbox'] $id $name}--> <li> <!--{if $typeid != $id}--> <a href="forumdisplay.php?fid=$fid&filter=type&typeid=$id$sortadd">$name</a> <!--{else}--> <strong>$name</strong> <!--{/if}--> </li> <!--{/loop}--> </ul> </div> <!--{/if}--> </p> <!--{/if}--> <!--{if $forum['threadsorts']}--> <p> <!--{if !$forum['threadtypes']['listable']}--><!--{if $sortid}--><a href="forumdisplay.php?fid=$fid">{lang forum_viewall}</a><!--{else}--><strong>{lang forum_viewall}</strong><!--{/if}--><!--{/if}--> <!--{loop $forum['threadsorts']['flat'] $id $name}--><!--{if $sortid != $id}--><a href="forumdisplay.php?fid=$fid&filter=sort&sortid=$id$typeadd">$name</a><!--{else}--><strong>$name</strong><!--{/if}--> <!--{/loop}--> <!--{if $forum['threadsorts']['selectbox']}--> <span id="threadsortsmenu" class="dropmenu" onmouseover="showMenu({'ctrlid':this.id})">{lang admin_type_more}</span> <div class="popupmenu_popup headermenu_popup" id="threadsortsmenu_menu" style="display: none"> <ul> <!--{loop $forum['threadsorts']['selectbox'] $id $name}--> <li> <!--{if $sortid != $id}--> <a href="forumdisplay.php?fid=$fid&filter=sort&sortid=$id$typeadd">$name</a> <!--{else}--> <strong>$name</strong> <!--{/if}--> </li> <!--{/loop}--> </ul> </div> <!--{/if}--> </p> <!--{/if}--> </div> <!--{/if}--> <div id="threadlist" class="threadlist datalist" style="position: relative;"> <form method="post" name="moderate" id="moderate" action="topicadmin.php?action=moderate&fid=$fid&infloat=yes&nopost=yes"> <input type="hidden" name="formhash" value="{FORMHASH}" /> <input type="hidden" name="listextra" value="$extra" /> <style> .tl .by { width: 105px; line-height: 14px; } .waterfall { position: relative; margin-left: 22px; } .waterfall li { float: left; width: 215px; overflow: hidden; margin: 0 10px 10px 0; padding: 0 0 3px; text-align: left; border-width: 1px 0 0; border-top: 1px solid #EAEAEA; background: url( no-repeat 100% 100%; } .waterfall .c { overflow: hidden; padding-bottom: 0; max-height: 800px; } .waterfall .c, .waterfall h3 { padding: 10px; border: solid #EAEAEA; border-width: 0 1px; background-color: #F8F8F8; } .waterfall .c, .waterfall h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 10px; border: solid #EAEAEA; border-width: 0 1px; background-color: #F8F8F8; } .waterfall .auth { padding: 0 10px 10px; border-width: 0 1px 1px; border-style: solid; border-color: transparent #EAEAEA #B9B9B9; background: #F8F8F8; } </style> <style>#threadlist {padding-top: 20px;}</style> <table summary="forum_$fid" id="forum_ajax" cellspacing="0" cellpadding="0" class="datatable"> <tbody id="$thread " onmouseover="gtview_showover(this)" onmouseout="gtview_showout(this)"> <ul id="waterfall" class="ml waterfall cl"> <!--{loop $threadlist $key $thread}--> <li id="$thread "> <div class="c cl"> {eval $q2 = $db->query("SELECT * FROM cdb_attachments WHERE tid='".$thread ."' AND isimage!=0 ORDER BY pid DESC");} {eval while ($asdfgh=$db->fetch_array($q2)) $thread =$asdfgh ;} <!--{if $thread }--> <a href="viewthread.php?tid=$thread &extra=$extra"$thread " target="_blank"><img src="attachments/$thread " alt="$thread " title="$thread " width="100%" height="145" /></a> <!--{else}--> <a href="viewthread.php?tid=$thread &extra=$extra"$thread " target="_blank"><img src=" title="$thread " width="100%" height="145" /></a> <!--{/if}--> </div> <h3 class="xw0"> <!--{if $forum['ismoderator']}--> <!--{if $thread['fid'] == $fid && $thread['digest'] >= 0}--> <!--{if $thread['displayorder'] <= 3 || $adminid == 1}--> <input onclick="tmodclick(this)" class="checkbox" type="checkbox" name="moderate[]" value="$thread " /> <!--{else}--> <input class="checkbox" type="checkbox" disabled="disabled" /> <!--{/if}--> <!--{else}--> <input class="checkbox" type="checkbox" disabled="disabled" /> <!--{/if}--> <!--{/if}--> <a href="viewthread.php?tid=$thread &extra=$extra"$thread " onclick="atarget(this)" title="$thread ">$thread </a> </h3> <div class="auth cl"> <cite class="xg1 y" style="float: right;color:#999;"> 喜欢: $thread 回复: <a href="thread-$thread -1-1.html" title="$thread 回复">$thread </a> </cite> <!--{if $thread['authorid'] && $thread['author']}--> <a href="space.php?uid=$thread ">$thread </a> <!--{else}--> <!--{if $forum['ismoderator']}--> <a href="space.php?uid=$thread ">匿名</a> <!--{else}--> {lang anonymous} <!--{/if}--> <!--{/if}--> </div> </li> <!--{/loop}--> </ul> </tbody> </table> <!--{if $forum['ismoderator'] && $threadcount}--> {template topicadmin_modlayer} <!--{/if}--> </form> </div> <div class="pages_btns s_clear"> $multipage <span <!--{if $visitedforums}-->id="visitedforums" onmouseover="$('visitedforums').id = 'visitedforumstmp';this.id = 'visitedforums';showMenu({'ctrlid':this.id})"<!--{/if}--> class="pageback"><a href="$indexname">{lang return_index}</a></span> <span class="postbtn" id="newspecialtmp" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"><a href="post.php?action=newthread&fid=$fid"{if !$forum['allowspecialonly']} onclick="showWindow('newthread', this.href);return false;"{/if}>{lang send_posts}</a></span> </div> <!--{if $whosonlinestatus}--> <dl id="onlinelist"> <!--{if $detailstatus}--> <dd> <span class="headactions"><a href="forumdisplay.php?fid=$fid&page=$page&showoldetails=no#online"><img src="{IMGDIR}/collapsed_no.gif" alt="" /></a></span> <h3>{lang forum_activeusers}</h3> </dd> <dd> <ul class="s_clear"> <!--{loop $whosonline $key $online}--> <li title="{lang time}: $online {LF} {lang action}: $online {LF} {lang forum}: $forumname"> <img src="images/common/$online " alt="" /> <!--{if $online['uid']}--> <a href="space.php?uid=$online ">$online </a> <!--{else}--> $online <!--{/if}--> </li> <!--{/loop}--> </ul> </dd> <!--{else}--> <dt> <span class="headactions"><a href="forumdisplay.php?fid=$fid&page=$page&showoldetails=yes#online" class="nobdr"><img src="{IMGDIR}/collapsed_yes.gif" alt="" /></a></span> <h3>{lang forum_activeusers}</h3> </dt> <!--{/if}--> </dl> <!--{/if}--> $pluginhooks </div> </div> <!--{if $infosidestatus == 2}--> <div id="sidebar" class="side" style="$collapse "> <!--{if !empty($qihoo['status']) && ($qihoo['searchbox'] & 2)}--> <div id="qihoosearch" class="sidebox"> <form method="post" action="search.php?srchtype=qihoo" onSubmit="this.target='_blank';"> <input type="hidden" name="searchsubmit" value="yes" /> <input type="text" class="txt" name="srchtxt" size="20" value="$qihoo_searchboxtxt" /> <button type="submit">{lang search}</button> </form> </div> <!--{/if}--> <!--{if $infosidestatus[0]}--> <!--{if !empty($qihoo['status']) && ($qihoo['searchbox'] & 2)}--> <hr class="shadowline"/> <!--{/if}--> <div id="infoside"> {eval request($infosidestatus, 1, 0);} </div> <!--{/if}--> </div> <!--{/if}--> <!--{if $allowpost && ($allowposttrade || $allowpostpoll || $allowpostreward || $allowpostactivity || $allowpostdebate || $threadplugins || $forum['threadsorts'])}--> <ul class="popupmenu_popup postmenu" id="newspecial_menu" style="display: none"> <!--{if !$forum['allowspecialonly']}--><li><a href="post.php?action=newthread&fid=$fid" onclick="showWindow('newthread', this.href);doane(event)">{lang post_newthread}</a></li><!--{/if}--> <!--{if $allowpostpoll}--><li class="poll"><a href="post.php?action=newthread&fid=$fid&special=1">{lang post_newthreadpoll}</a></li><!--{/if}--> <!--{if $allowpostreward}--><li class="reward"><a href="post.php?action=newthread&fid=$fid&special=3">{lang post_newthreadreward}</a></li><!--{/if}--> <!--{if $allowpostdebate}--><li class="debate"><a href="post.php?action=newthread&fid=$fid&special=5">{lang post_newthreaddebate}</a></li><!--{/if}--> <!--{if $allowpostactivity}--><li class="activity"><a href="post.php?action=newthread&fid=$fid&special=4">{lang post_newthreadactivity}</a></li><!--{/if}--> <!--{if $allowposttrade}--><li class="trade"><a href="post.php?action=newthread&fid=$fid&special=2">{lang post_newthreadtrade}</a></li><!--{/if}--> <!--{if $threadplugins}--> <!--{loop $forum['threadplugin'] $tpid}--> <!--{if array_key_exists($tpid, $threadplugins) && @in_array($tpid, $allowthreadplugin)}--> <li class="popupmenu_option"{if $threadplugins[$tpid] } style="background-image:url($threadplugins[$tpid] )"{/if}><a href="post.php?action=newthread&fid=$fid&specialextra=$tpid">{$threadplugins[$tpid] }</a></li> <!--{/if}--> <!--{/loop}--> <!--{/if}--> <!--{if $forum['threadsorts'] && !$forum['allowspecialonly']}--> <!--{loop $forum['threadsorts']['types'] $id $threadsorts}--> <!--{if $forum['threadsorts']['show'][$id]}--> <li class="popupmenu_option"><a href="post.php?action=newthread&fid=$fid&extra=$extra&sortid=$id">$threadsorts</a></li> <!--{/if}--> <!--{/loop}--> <!--{loop $forum['typemodels'] $id $model}--> <li class="popupmenu_option"><a href="post.php?action=newthread&fid=$fid&extra=$extra&modelid=$id">$model </a></li> <!--{/loop}--> <!--{/if}--> </ul> <!--{/if}--> <ul class="popupmenu_popup headermenu_popup filter_popup" id="filtertype_menu" style="display: none;"> <li><a href="forumdisplay.php?fid=$fid">{lang forum_viewall}</a></li> <!--{if $showpoll}--><li {if $filter == 'poll'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=poll">{lang thread_poll}</a></li><!--{/if}--> <!--{if $showtrade}--><li {if $filter == 'trade'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=trade">{lang thread_trade}</a></li><!--{/if}--> <!--{if $showreward}--><li {if $filter == 'reward'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=reward">{lang thread_reward}</a></li><!--{/if}--> <!--{if $showactivity}--><li {if $filter == 'activity'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=activity">{lang thread_activity}</a></li><!--{/if}--> <!--{if $showdebate}--><li {if $filter == 'debate'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=debate">{lang thread_debate}</a></li><!--{/if}--> <!--{if $threadplugins}--> <!--{loop $forum['threadplugin'] $tpid}--> <!--{if array_key_exists($tpid, $threadplugins) && @in_array($tpid, $allowthreadplugin)}--> <li {if $filter == 'special' && $extraid == $tpid}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=special&extraid=$tpid">{$threadplugins[$tpid] }</a></li> <!--{/if}--> <!--{/loop}--> <!--{/if}--> </ul> <!--{if $visitedforums}--> <ul class="popupmenu_popup" id="visitedforums_menu" style="display: none"> $visitedforums </ul> <!--{/if}--> <!--{if $forumjump}--> <div class="popupmenu_popup" id="fjump_menu" style="display: none"> $forummenu </div> <!--{/if}--> <!--{if $maxpage > 1}--> <script type="text/javascript">document.onkeyup = function(e){keyPageScroll(e, {if $page > 1}1{else}0{/if}, {if $page < $maxpage}1{else}0{/if}, 'forumdisplay.php?fid=$fid$forumdisplayadd', $page);}</script> <!--{/if}--> {subtemplate footer} 2、编辑forumdisplay模版在最上边加 <!--{if $fid==55}--> {template default_image_mode} <!--{else}--> 说明: 55 就是指定的板块id,请根据自己要开启的板块修改! 3、在forumdisplay模版在最下边加 <!--{/if}--> 即可。 代码中涉及的图片请自行下载替换。 关于修改图片的大小修改width: 215px;即可。
2018-10-16
84055 阅读
28 评论
icode
2018-10-16
爱秀代码---开启板块图片模式(重新整理)
514 1、打开forumdisplay模版在最上边加 {eval $wj_image_mode = $_COOKIE["wj_image_mode"];} 2、继续找到 <div id="threadlist" class="threadlist datalist" style="position: relative;"> 在上边加 <!--{if $wj_image_mode != 1}--> <td> <a onclick="setcookie('wj_image_mode', 1, 999999);location.reload();" title="开启图片模式" class="unchk" href="javascript:;">图片模式</a> </td> <!--{/if}--> <!--{if $wj_image_mode == 1}--> <td> <a onclick="setcookie('wj_image_mode', 2, 999999);location.reload();" title="关闭图片模式" class="chked" href="javascript:;">图片模式</a> </td> <!--{/if}--> 3、继续找到 <!--{if $page == 1 && !empty($announcement)}--> 在上边加 <!--{if $wj_image_mode != 1}--> 4、继续找到 <tbody><tr><th colspan="6"><p class="nodata">{lang forum_nothreads}</p></th></tr></tbody> <!--{/if}--> 在下边加 <!--{/if}--> 5、加完第四步看到下边有个</table>么?在这个</table>下边加 {template i_f_imagemode} 6、新建一个模版命名为 i_f_imagemode 内容是 <style> .tl .by { width: 105px; line-height: 14px; } .chked { padding-left: 15px; line-height: 16px; background: url( no-repeat 0 3px; color: #1E547F; cursor: pointer; background-position: 0 -37px; } .unchk { padding-left: 15px; line-height: 16px; background: url( no-repeat 0 3px; color: #1E547F; cursor: pointer; } .waterfall { position: relative; margin-left: 22px; } .waterfall li { float: left; width: 215px; overflow: hidden; margin: 0 10px 10px 0; padding: 0 0 3px; text-align: left; border-width: 1px 0 0; border-top: 1px solid #EAEAEA; background: url( no-repeat 100% 100%; } .waterfall .c { overflow: hidden; padding-bottom: 0; max-height: 800px; } .waterfall .c, .waterfall h3 { padding: 10px; border: solid #EAEAEA; border-width: 0 1px; background-color: #F8F8F8; } .waterfall .c, .waterfall h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 10px; border: solid #EAEAEA; border-width: 0 1px; background-color: #F8F8F8; } .waterfall .auth { padding: 0 10px 10px; border-width: 0 1px 1px; border-style: solid; border-color: transparent #EAEAEA #B9B9B9; background: #F8F8F8; } </style> <!--{if $wj_image_mode == 1}--> <style>#threadlist {padding-top: 20px;}</style> <table summary="forum_$fid" id="forum_ajax" cellspacing="0" cellpadding="0" class="datatable"> <tbody id="$thread " onmouseover="gtview_showover(this)" onmouseout="gtview_showout(this)"> <ul id="waterfall" class="ml waterfall cl"> <!--{loop $threadlist $key $thread}--> <li id="$thread "> <div class="c cl"> {eval $q2 = $db->query("SELECT * FROM cdb_attachments WHERE tid='".$thread ."' AND isimage!=0 ORDER BY pid DESC");} {eval while ($asdfgh=$db->fetch_array($q2)) $thread =$asdfgh ;} <!--{if $thread }--> <a href="viewthread.php?tid=$thread &extra=$extra"$thread " target="_blank"><img src="attachments/$thread " alt="$thread " title="$thread " width="100%" height="145" /></a> <!--{else}--> <a href="viewthread.php?tid=$thread &extra=$extra"$thread " target="_blank"><img src=" title="$thread " width="100%" height="145" /></a> <!--{/if}--> </div> <h3 class="xw0"> <!--{if $forum['ismoderator']}--> <!--{if $thread['fid'] == $fid && $thread['digest'] >= 0}--> <!--{if $thread['displayorder'] <= 3 || $adminid == 1}--> <input onclick="tmodclick(this)" class="checkbox" type="checkbox" name="moderate[]" value="$thread " /> <!--{else}--> <input class="checkbox" type="checkbox" disabled="disabled" /> <!--{/if}--> <!--{else}--> <input class="checkbox" type="checkbox" disabled="disabled" /> <!--{/if}--> <!--{/if}--> <a href="viewthread.php?tid=$thread &extra=$extra"$thread " onclick="atarget(this)" title="$thread ">$thread </a> </h3> <div class="auth cl"> <cite class="xg1 y" style="float: right;color:#999;"> 喜欢: $thread 回复: <a href="thread-$thread -1-1.html" title="$thread 回复">$thread </a> </cite> <!--{if $thread['authorid'] && $thread['author']}--> <a href="space.php?uid=$thread ">$thread </a> <!--{else}--> <!--{if $forum['ismoderator']}--> <a href="space.php?uid=$thread ">匿名</a> <!--{else}--> {lang anonymous} <!--{/if}--> <!--{/if}--> </div> </li> <!--{/loop}--> </ul> </tbody> </table> <!--{/if}--> 最后替换一下代码里的图片完成。
2018-10-16
95430 阅读
23 评论
icode
上一页
1
2
3
4
…
7
下一页
/ 7 页
下拉加载更多
首页
板块
登录
每日签到
红包中心
论坛统计
关于我们