AS 锡安ZionTechExchange 
» 游客:  注册 | 登录 | 冻结用户(激活)?sid=xP7msC | 会员

RSS 订阅当前论坛  

上一主题 下一主题
       
标题: [BBShack] 发过很多次:子版横排插件(绿色版)     
 
Phoenix001
妙语书生 Lv5




UID 181234
精华 2
积分 13
帖子 1490
金币 3003 块
阅读权限 10
注册 2019-5-27
状态 离线
发过很多次:子版横排插件(绿色版)

发过很多次:子版横排插件(绿色版)
https://discuz.dismall.com/thread-296357-1-1.html
(出处: Discuz免费开源建站系统)


.............................................................................................................



    插件名:子版横排
    插件用途:强制所有子论坛横排,不具有选择是否横排的判断
    插件作者:不知道
    适合版本:4.1.0
    演示地址:附件
    安装难度:极易
    总结者:netscope



1,为什么叫绿色版

因为本身子版调用是通过代码来调用单独的forumdisplay_subforum.htm文件,所以你不用本插件时只需要把你备份的forumdisplay_subforum.htm的文件覆盖即可

2,使用方法

2.1复制以下代码另存为forumdisplay_subforum.htm

    {eval $count=4;}
    {eval $wid='25%';}
    {eval $incompact=array(13,36,39,52,53,54,55,56,57,61);}
    <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
    <tr><td colspan="$count" class="header"><table cellspacing="0" cellpadding="0" width="100%">
    <tr class="smalltxt"><td class="bold"><span style="color: {HEADERTEXT}">本版子论坛</span></td><td align="right"><a href="###" onclick="toggle_collapse('category_$forum[fid]');"><img id="category_$forum[fid]_img" src="{IMGDIR}/collapsed_no.gif" border="0"></a></td></tr></table></td></tr>
    <tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
    <tr class="altbg2">{eval $fcount = $count;}
    <!--{loop $sublist $sub}--><!--{if $sub['permission']}--><!--{if in_array($sub[fid],$incompact)}-->{eval $fcount--;}
    <!--{if $fcount == -1}--></tr><tr class="altbg2">{eval $fcount = $count-1;}<!--{/if}-->
    <td width="$wid" class="altbg2" align="left" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
    <table cellpadding="1" cellspacing="1" border="0" width="100%">
    <tr>
    <td align="left"><a href="forumdisplay.php?fid=$sub[fid]"><span class="bold">$sub[name]</span></a>
    <td align="right">
    <!--{if is_array($sub['lastpost'])}-->
    <a href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0" alt="标题: $sub[lastpost][subject]{LF}时间: $sub[lastpost][dateline]" align="right"></a><!--{else}-->
    <img src="{IMGDIR}/lastpost.gif" border="0" alt="{lang never}" align="right"><!--{/if}-->
    <tr>
      <td align="left" colspan="2"><table width="100%" height="21" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="33%" style="font-size: 11px">{lang forum_threads}: $sub[threads]</td>
        <td width="34%" style="font-size: 11px">{lang forum_posts}: $sub[posts]</td>
        <td width="33%" style="font-size: 11px">{lang forum_todayposts}: <span style="color: #FF3300">$sub[todayposts]</span></td>
      </tr></table>
    <tr>
      <td align="left" style="font-size: 11px" colspan="2">{lang forum_moderators}: <!--{if count(explode(',',$sub['moderators'])) < 3}-->
    $sub[moderators]<!--{else}-->{eval $mods = explode(',', $sub['moderators']);}$mods[0], $mods[1]  <a href="forumdisplay.php?fid=$sub[fid]"><span style="color: #999999; font-size: 11px"><em>More...</em></span></a><!--{/if}-->
    <tr>
    </table>
    </td><!--{/if}--><!--{/if}--><!--{/loop}-->
    <!--{if $fcount}--><td colspan="$fcount" bgcolor="{ALTBG2}"> </td><!--{/if}-->
    </tr></tbody></table><br>

复制代码


2.2备份你模板目录下的forumdisplay_subforum.htm

2.3将另存为的forumdisplay_subforum.htm文件覆盖模板同名文件即可

3,说明:


    {eval $count=4;} 4为横排的数目
    {eval $wid='25%';}       25%为宽带比例
    {eval $incompact=array(13,36,39,52,53,54,55,56,);} 括号里的数字为你所有子论坛的fid,必须写全,用半角逗号隔开

复制代码


由于代码里不判断是否使用横排而是强制所有子论坛都横排,所以array里的子论坛fid必须写全

4,好处

4.1不用安装繁琐的其它版本横排插件,有的虽然灵活和强大,但是需要升级数据库和一大堆繁琐操作,这个只要覆盖一个文件实现子版横排;
4.2适合只想子版横排的用户,而且操作极其简单和自主化

[ 本帖最后由 netscope 于 2006-5-16 22:16 编辑 ]
2023-2-20 13:57#1
查看资料  发短消息  顶部
       


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题  


 


所有时间为 GMT+8, 现在时间是 2024-5-16 17:31 清除 Cookies - 联系我们 - ZAKE萨尔克岛 - AbyssalSwamp深渊之沼