Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[插件] 首页横板紧凑后台管理插件_For_D4.10[测试成功已发布方法]

[复制链接]
aicainiao 发表于 2006-3-26 09:22:01 | 显示全部楼层 |阅读模式
说明:


1、后台管理设置横板显示的板块

可以两格或四个

2、无变形问题,可以使用窄版

3、版主显示支持下拉菜单

4、帖子标题显示全部及发表时间

5、显示版面说明

6、显示版面图片

需要修改的文件:
升级数据库

admin/settings.inc.php

templates/default/admincp.lang.php

templates/default/templates.lang.php

templates/default/css.htm

修改成功了2006.2.26,测试无误!

修改方法

1、升级数据库 (请在后台 数据升级中贴上以下代码,然后提交!)
[注:cdb_ 为您的论坛数据库表头,默认为 cdb_ 如果您有修改,请确认后修改 cdb_ 为您的表头,再进行执行!]


  1. INSERT INTO `cdb_settings` VALUES ('index_fcount', '2');
  2. INSERT INTO `cdb_settings` VALUES ('index_fwidth', '50%');
  3. INSERT INTO `cdb_settings` VALUES ('index_intabulae', '1,2,3');
  4. INSERT INTO `cdb_settings` VALUES ('index_fcount1', '4');
  5. INSERT INTO `cdb_settings` VALUES ('index_fwidth1', '25%');
  6. INSERT INTO `cdb_settings` VALUES ('index_intabulae1', '100');
复制代码


反安装SQL语句


  1. DELETE FROM `cdb_settings` WHERE variable = 'index_fcount';
  2. DELETE FROM `cdb_settings` WHERE variable = 'index_fwidth';
  3. DELETE FROM `cdb_settings` WHERE variable = 'index_intabulae';
  4. DELETE FROM `cdb_settings` WHERE variable = 'index_fcount1';
  5. DELETE FROM `cdb_settings` WHERE variable = 'index_fwidth1';
  6. DELETE FROM `cdb_settings` WHERE variable = 'index_intabulae1';
复制代码


2,修改 settings.inc.php,请打开 admin/settings.inc.php 文件,进行以下修改!
找到:

  1. showsetting('settings_modreasons', 'settingsnew[modreasons]', $settings['modreasons'], 'textarea');
复制代码


下面一行添加:
  1. // 论坛横板显示方式 by http://www.18i8.com
  2. showsetting('settings_index_fcount', 'settingsnew[index_fcount]', $settings['index_fcount'], 'text');
  3. showsetting('settings_index_fwidth', 'settingsnew[index_fwidth]', $settings['index_fwidth'], 'text');
  4. showsetting('settings_index_intabulae', 'settingsnew[index_intabulae]', $settings['index_intabulae'], 'text');
  5. showsetting('settings_index_fcount1', 'settingsnew[index_fcount1]', $settings['index_fcount1'], 'text');
  6. showsetting('settings_index_fwidth1', 'settingsnew[index_fwidth1]', $settings['index_fwidth1'], 'text');
  7. showsetting('settings_index_intabulae1', 'settingsnew[index_intabulae1]', $settings['index_intabulae1'], 'text');
  8. // 论坛横板显示方式 by http://www.18i8.com
复制代码


再找到:
  1. 'jscachelife', 'waptpp', 'wapppp', 'wapmps'
复制代码


后面添加:
  1. ,'index_fcount','index_fwidth','index_fcount1','index_fwidth1'
复制代码

3,修改 admincp.lang.php 语言包,请打开 templates/default/admincp.lang.php 文件,进行以下修改!

找到:
  1. 'submit' => '提 交',
复制代码

上面一行添加:

  1. 'settings_index_fcount' => '首页横板样式1显示数量:',
  2. 'settings_index_fcount_comment' => '需要横板显示多少个,如:2,4',
  3. 'settings_index_fwidth' => '首页横板样式1显示宽度:',
  4. 'settings_index_fwidth_comment' => '每个板块显示的宽度,如:2个就用50%,4个就用25%',
  5. 'settings_index_intabulae' => '使用横板样式1的分类ID:',
  6. 'settings_index_intabulae_comment' => '设置分类ID号码即可,多个用逗号隔开',
  7. 'settings_index_fcount1' => '首页横板样式2显示数量:',
  8. 'settings_index_fcount1_comment' => '需要横板显示多少个,如:2,4',
  9. 'settings_index_fwidth1' => '首页横板样式2显示宽度:',
  10. 'settings_index_fwidth1_comment' => '每个板块显示的宽度,如:2个就用50%,4个就用25%',
  11. 'settings_index_intabulae1' => '使用横板样式2的分类ID:',
  12. 'settings_index_intabulae1_comment' => '设置分类ID号码即可,多个用逗号隔开',
复制代码


4,修改 css.htm 文件,如果您想在默认风格中使用,请修改 templates/default/css.htm 文件,否则请修改对应风格模板之 css.htm 文件。
找到:

  1. a                        { text-decoration: none; color: {LINK} }
复制代码

上面一行添加:
  1. img { border: 0px; }
复制代码


5,index.htm 的对照与修改

index.htm 找到:
  1. <!--{loop $forumlist $key $forum}-->
  2.         <!--{if $forum['type'] == 'group' && $forumlist[($key + 1)]['type'] == 'forum'}-->
  3.                 <!--{if $key}--></tbody></table><br></div><!--{/if}-->
  4.                 <div class="maintable">
  5.                 <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
  6.                 <tr><td colspan="7" class="header"><table cellspacing="0" cellpadding="0" width="100%">
  7.                 <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
  8.                 <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
  9.                 <a href="###" onclick="toggle_collapse('category_$forum[fid]');"><img id="category_$forum[fid]_img" src="{IMGDIR}/$forum[collapseimg]" border="0"></a>
  10.                 </td></tr></table></td></tr>
  11.                 <tr class="category" align="center">
  12.                 <td width="5%"> </td>
  13.                 <td width="51%">{lang forum_name}</td>
  14.                 <td width="5%">{lang forum_threads}</td>
  15.                 <td width="5%">{lang forum_posts}</td>
  16.                 <td width="5%">{lang forum_todayposts}</td>
  17.                 <td width="13%">{lang forum_lastpost}</td>
  18.                 <td width="16%">{lang forum_moderators}</td>
  19.                 </tr><tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
  20.         <!--{elseif $forum['permission']}-->
  21.                 <tr>
  22.                 <td class="altbg1" align="center">$forum[folder]</td>
  23.                 <td class="altbg2" align="left" onMouseOver="this.className='altbg1'" onMouseOut="this.className='altbg2'">
  24.                 $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
  25.                 <br><span class="smalltxt">$forum[description]<!--{if isset($forum['subforums'])}--><br><span class="bold">{lang forum_subforums}:</span> $forum[subforums]<!--{/if}--></span></td>
  26.                 <td class="altbg1" align="center">$forum[threads]</td>
  27.                 <td class="altbg2" align="center">$forum[posts]</td>
  28.                 <td class="altbg1" align="center">$forum[todayposts]</td>
  29.                 <!--{if $forum['permission'] == 1}-->
  30.                         <td class="altbg2" align="center"><span class="smalltxt"></span>{lang private_forum}</span></td>
  31.                 <!--{else}-->
  32.                         <!--{if is_array($forum['lastpost'])}-->
  33.                                 <td class="altbg2"><table cellpadding="0" cellspacing="0" border="0" width="100%">
  34.                                 <tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $forum[lastpost][subject]" nowrap>
  35.                                 $forum[lastpost][dateline]<br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--></td>
  36.                                 <td nowrap> <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
  37.                                 </tr></table></td>
  38.                         <!--{else}-->
  39.                                 <td class="altbg2" align="center"><span class="smalltxt">{lang never}</span></td>
  40.                         <!--{/if}-->
  41.                 <!--{/if}-->
  42.                 <td class="altbg1" align="center" style="word-break: keep-all"><span class="smalltxt">$forum[moderators]</span></td></tr>
  43.         <!--{/if}-->
  44. <!--{/loop}-->

  45. <!--{if empty($gid) && ($_DCACHE['forumlinks'] || $whosonlinestatus || $bdaystatus == 1 || $bdaystatus == 3)}-->
  46.         <!--{if empty($forumlist)}--><br><br><!--{else}--></table><br></div><div class="maintable"><!--{/if}-->
  47.         <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
  48. <!--{/if}-->
复制代码


替换为:
  1. {eval $incompact = explode(',', $index_intabulae);}
  2. {eval $incompact1= explode(',', $index_intabulae1);}
  3. <!--{loop $forumlist $key $forum}-->
  4. <!--{if $forum['type'] == 'group' && $forumlist[($key + 1)]['type'] == 'forum'}-->
  5. <!--{if $key}-->
  6. <!--{if $fcount}-->
  7. <td colspan="$fcount"> </td></tr></tbody></table><br></div>
  8. <!--{else}-->
  9. <!--{if in_array($forum[fid], array_merge($incompact,$incompact1))}-->
  10. </tbody></table><br></div>
  11. <!--{else}-->
  12. </tr></tbody></table><br></div>
  13. <!--{/if}-->
  14. <!--{/if}-->
  15. <!--{else}-->
  16. <!--{/if}-->
  17. <!--{if in_array($forum[fid], $incompact)}-->
  18. <div class="maintable">
  19. <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
  20. <tr><td colspan="$index_fcount" class="header"><table cellspacing="0" cellpadding="0" width="100%">
  21. <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
  22. <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
  23. <a href="###" onclick="toggle_collapse('category_$forum[fid]');"><img id="category_$forum[fid]_img" src="{IMGDIR}/$forum[collapseimg]" border="0"></a></td></tr></table></td></tr>
  24. <tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">

  25. <tr class="altbg2">
  26. {eval $fcount = $index_fcount;}
  27. <!--{elseif in_array($forum[fid], $incompact1)}--><div class="maintable">
  28. <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
  29. <tr><td colspan="$index_fcount1" class="header"><table cellspacing="0" cellpadding="0" width="100%">
  30. <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
  31. <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
  32. <a href="###" onclick="toggle_collapse('category_$forum[fid]');"><img id="category_$forum[fid]_img" src="{IMGDIR}/$forum[collapseimg]" border="0"></a>
  33. </td></tr></table></td></tr>
  34. <tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
  35. <tr class="altbg2">
  36. {eval $fcount = $index_fcount1;}
  37. <!--{else}--><div class="maintable">
  38. <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
  39. <tr><td colspan="7" class="header"><table cellspacing="0" cellpadding="0" width="100%">
  40. <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
  41. <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
  42. <a href="###" onclick="toggle_collapse('category_$forum[fid]');"><img id="category_$forum[fid]_img" src="{IMGDIR}/$forum[collapseimg]" border="0"></a>
  43. </td></tr></table></td></tr>
  44. <tr class="category" align="center">
  45. <td width="5%"> </td>
  46.                 <td width="51%">{lang forum_name}</td>
  47.                 <td width="5%">{lang forum_threads}</td>
  48.                 <td width="5%">{lang forum_posts}</td>
  49.                 <td width="5%">{lang forum_todayposts}</td>
  50.                 <td width="13%">{lang forum_lastpost}</td>
  51.                 <td width="16%">{lang forum_moderators}</td>
  52. </tr><tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
  53. {eval $fcount = 0;}
  54. <!--{/if}-->
  55. <!--{elseif $forum['permission']}-->
  56. <!--{if in_array($forum[fup],$incompact)}-->
  57. {eval $fcount--;}
  58. <!--{if $fcount == -1}--></tr><tr class="altbg2">{eval $fcount = $index_fcount-1;}<!--{/if}-->
  59. <td width="$index_fwidth%" class="altbg2">
  60. <table cellpadding="0" cellspacing="3" border="0" width="100%">
  61. <tr>
  62. <td colspan="2">
  63. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  64. <tr>
  65. <td width="80%">                $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
  66.                 <br><span class="smalltxt">$forum[description]</span></td>
  67. <td width="20%" align="left" class=smalltxt><b>{lang forum_moderators}:$forum[moderators]</b><br>{lang forum_threads}: $forum[threads] {lang forum_posts}: $forum[posts]<br>{lang forum_todayposts}:$forum[todayposts]</td></tr></table>
  68. </td></tr>
  69. <tr>
  70. <td align="left" class=smalltxt><!--{if $forum['permission'] == 1}-->{lang
  71. private_forum}<!--{else}--><!--{if is_array($forum['lastpost'])}--><div style="overflow: hidden; text-overflow: ellipsis; width: 180px"> <nobr><b>{lang subject}</b>:<a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="{lang title}:$forum['lastpost'][subject]{LF}{lang time}:$forum['lastpost'][dateline]">$forum['lastpost'][subject]</a></nobr></div><!--{else}-->{lang never}<!--{/if}--><!--{/if}--></td></tr>
  72. </table></td>
  73. <!--{elseif in_array($forum[fup],$incompact1)}-->
  74. {eval $fcount--;}
  75. <!--{if $fcount == -1}--></tr><tr class="altbg2">{eval $fcount = $index_fcount1-1;}<!--{/if}-->
  76. <td width="$index_fwidth1%" class="altbg2" align="left" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
  77. <table cellpadding="3" cellspacing="0" border="0" width="100%">
  78. <tr>
  79. <td colspan="1" valign="top">
  80. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  81. <tr>
  82. <td>                $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
  83.                 </td>
  84. </tr></table>
  85. </td></tr>
  86. <tr>
  87. <td align="left" class=smalltxt>{lang forum_moderators}:$forum[moderators]<!--{if $forum['permission'] == 1}-->{lang private_forum}<!--{else}--><span class="smalltxt">$forum[description]</span><!--{if is_array($forum['lastpost'])}--><div style="overflow: hidden; text-overflow: ellipsis; width: 100px"> <nobr><b>{lang subject}</b>:<a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="{lang title}:$forum['lastpost'][subject]{LF}{lang time}:$forum['lastpost'][dateline]">$forum['lastpost'][subject]</a></nobr></div><!--{else}-->{lang never}<!--{/if}--><!--{/if}--><br>{lang forum_threads}: $forum[threads]
  88. {lang forum_posts}: $forum[posts]
  89. {lang forum_todayposts}:$forum[todayposts]
  90. </td></tr>
  91. </table>
  92. </td>
  93. <!--{else}-->
  94. <tr>
  95. <td class="altbg1" align="center">$forum[folder]</td>
  96.                 <td class="altbg2" align="left" onMouseOver="this.className='altbg1'" onMouseOut="this.className='altbg2'">
  97.                 $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
  98.                 <br><span class="smalltxt">$forum[description]<!--{if isset($forum['subforums'])}--><br><span class="bold">{lang forum_subforums}:</span> $forum[subforums]<!--{/if}--></span></td>
  99.                 <td class="altbg1" align="center">$forum[threads]</td>
  100.                 <td class="altbg2" align="center">$forum[posts]</td>
  101.                 <td class="altbg1" align="center">$forum[todayposts]</td>
  102.                 <!--{if $forum['permission'] == 1}-->
  103.                         <td class="altbg2" align="center"><span class="smalltxt"></span>{lang private_forum}</span></td>
  104.                 <!--{else}-->
  105.                         <!--{if is_array($forum['lastpost'])}-->
  106.                                 <td class="altbg2"><table cellpadding="0" cellspacing="0" border="0" width="100%">
  107.                                 <tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $forum[lastpost][subject]" nowrap>
  108.                                 $forum[lastpost][dateline]<br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--></td>
  109.                                 <td nowrap> <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
  110.                                 </tr></table></td>
  111.                         <!--{else}-->
  112.                                 <td class="altbg2" align="center"><span class="smalltxt">{lang never}</span></td>
  113.                         <!--{/if}-->
  114.                 <!--{/if}-->
  115.                 <td class="altbg1" align="center" style="word-break: keep-all"><span class="smalltxt">$forum[moderators]</span></td></tr>
  116. <!--{/if}-->
  117. <!--{/if}-->
  118. <!--{/loop}-->

  119. <!--{if empty($gid) && ($_DCACHE['forumlinks'] || $whosonlinestatus || $bdaystatus == 1 || $bdaystatus == 3)}-->
  120. <!--{if empty($forumlist)}--><br><br><!--{else}--><!--{if $fcount}--><td colspan="$fcount"> </td><!--{/if}--></tr></tbody></table></div><div class="maintable"><!--{/if}--><br>
  121. <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
  122. <!--{/if}-->
复制代码


6,更新缓存,完成!

设置请到其它设置里面调整
下面是截图:

[ 本帖最后由 aicainiao 于 2006-3-26 19:02 编辑 ]

评分

1

查看全部评分

 楼主| aicainiao 发表于 2006-3-26 09:22:59 | 显示全部楼层
有需要的我分享给大家!

爱吧论坛

希望交换友情连接!

[ 本帖最后由 aicainiao 于 2006-3-26 14:26 编辑 ]
回复

使用道具 举报

MAXJAY 发表于 2006-3-26 09:31:49 | 显示全部楼层
很不错~
赞一个
回复

使用道具 举报

微软少男 发表于 2006-3-26 09:31:58 | 显示全部楼层
分享下吧~~~~~
回复

使用道具 举报

blwuzhu 发表于 2006-3-26 09:47:39 | 显示全部楼层
哪呢哪呢?没下的啊
回复

使用道具 举报

killua_bo 发表于 2006-3-26 09:52:04 | 显示全部楼层
还不错....
回复

使用道具 举报

砸死牛顿的苹果 发表于 2006-3-26 09:53:28 | 显示全部楼层

分享下吧,需要

回复

使用道具 举报

lmzh89 发表于 2006-3-26 11:23:45 | 显示全部楼层
暂不需要,但支持
回复

使用道具 举报

YY之王 发表于 2006-3-26 11:30:56 | 显示全部楼层
LZ发出来啊~
回复

使用道具 举报

grandness 发表于 2006-3-26 11:46:05 | 显示全部楼层
支持下,但排版没我我的好看!
http://0030.com.cn/index.php?styleid=6

[ 本帖最后由 grandness 于 2006-6-1 13:26 编辑 ]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-6 20:34 , Processed in 1.494037 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表