蓝雨 发表于 2010-5-26 21:54:20

DZ7.2首页分区内版块下增加任意文字链接



在 templates/风格目录/discuz.htm 中 <div class=”mainbox list”> …</div> (用于循环从数据库中读取板块列表)
<!--论坛子版_开始-->
<table>
<tbody><tr>
<script src="http://localhost/bbs/include/js/main_subforum_{$cat}.js" type="text/javascript"type="text/javascript"></script>
</tbody></tr>
</table>
<!--论坛子版_结束-->注意{$cat} ,是判断所在分区。这也是之前走了很多弯路的地方。比如gid=1,就是第一个建立的分区。JS文件路径可以自己决定。

继续。。新建一个JS文件。文件名为main_subforum_编号.js 【当然了,看个人喜好命名】var __html='<div id="hlx-subforum"><p>内容内容,这里是内容。自己发挥。用心编辑的帖子一定要顶。。</p></div>';document.write(__html);然后根据论坛的板块数。自己选择。/*论坛main子版列表*/
#hlx-subforum{font-size:12px; line-height:25px;color:#999; border-top:#9DB3C5 solid 1px; margin:0px;padding:5px 0px;clear:both;background:#fff}      
#hlx-subforum p{padding:1px 5px; margin:0px 5px;}
#hlx-subforum p a{color:#333333;font-size:12px;}
#hlx-subforum p strong{color:#2E569B;font-size:12px;font-weight:bold;}在这里说明一下,如果你不想某个分区显示该内容。JS代码里边内容为:var __html='';document.write(__html);**** Hidden Message *****
页: [1]
查看完整版本: DZ7.2首页分区内版块下增加任意文字链接