1,插件压缩包目录结构
插件压缩包
|- admin // 上传文件目录
|- upload // 上传文件目录
|- templates // 模板文件目录
|- default // 默认模板目录(以默认模板为标准只修改后文件)
2,升级数据库 (请在后台 数据升级中贴上以下代码,然后提交!)
[注:cdb_ 为您的论坛数据库表头,默认为 cdb_ 如果您有修改,请确认后修改 cdb_ 为您的表头,再进行执行!]
- INSERT INTO `cdb_settings` VALUES ('index_fcount', '2');
- INSERT INTO `cdb_settings` VALUES ('index_fwidth', '50%');
- INSERT INTO `cdb_settings` VALUES ('index_intabulae', '1,2,3');
- INSERT INTO `cdb_settings` VALUES ('index_fcount1', '4');
- INSERT INTO `cdb_settings` VALUES ('index_fwidth1', '25%');
- INSERT INTO `cdb_settings` VALUES ('index_intabulae1', '6,7');
- INSERT INTO `cdb_settings` VALUES ('sub_fcount', '4');
- INSERT INTO `cdb_settings` VALUES ('sub_fwidth', '25%');
- INSERT INTO `cdb_settings` VALUES ('sub_intabulae', '0');
复制代码
3,修改 settings.inc.php,请打开 admin/settings.inc.php 文件,进行以下修改!
找到:
- showsetting('settings_modreasons', 'settingsnew[modreasons]', $settings['modreasons'], 'textarea');
复制代码
下面一行添加:
- showsetting('settings_index_fcount', 'settingsnew[index_fcount]', $settings['index_fcount'], 'text');
- showsetting('settings_index_fwidth', 'settingsnew[index_fwidth]', $settings['index_fwidth'], 'text');
- showsetting('settings_index_intabulae', 'settingsnew[index_intabulae]', $settings['index_intabulae'], 'text');
- showsetting('settings_index_fcount1', 'settingsnew[index_fcount1]', $settings['index_fcount1'], 'text');
- showsetting('settings_index_fwidth1', 'settingsnew[index_fwidth1]', $settings['index_fwidth1'], 'text');
- showsetting('settings_index_intabulae1', 'settingsnew[index_intabulae1]', $settings['index_intabulae1'], 'text');
- showsetting('settings_sub_fcount', 'settingsnew[sub_fcount]', $settings['sub_fcount'], 'text');
- showsetting('settings_sub_fwidth', 'settingsnew[sub_fwidth]', $settings['sub_fwidth'], 'text');
- showsetting('settings_sub_intabulae', 'settingsnew[sub_intabulae]', $settings['sub_intabulae'], 'text');
复制代码
再找到:
- 'jscachelife', 'waptpp', 'wapppp', 'wapmps'
复制代码
后面添加:
- ,'index_fcount','index_fwidth','index_fcount1','index_fwidth1','sub_fcount','sub_fwidth'
复制代码
4,修改 admincp.lang.php 语言包,请打开 templates/default/admincp.lang.php 文件,进行以下修改!
找到:
上面一行添加:
- 'settings_index_fcount' => '首页横板样式1显示数量:',
- 'settings_index_fcount_comment' => '需要横板显示多少个,如:2,4',
- 'settings_index_fwidth' => '首页横板样式1显示宽度:',
- 'settings_index_fwidth_comment' => '每个板块显示的宽度,如:2个就用50%,4个就用25%',
- 'settings_index_intabulae' => '使用横板样式1的分类ID:',
- 'settings_index_intabulae_comment' => '设置分类ID号码即可,多个用逗号隔开',
- 'settings_index_fcount1' => '首页横板样式2显示数量:',
- 'settings_index_fcount1_comment' => '需要横板显示多少个,如:2,4',
- 'settings_index_fwidth1' => '首页横板样式2显示宽度:',
- 'settings_index_fwidth1_comment' => '每个板块显示的宽度,如:2个就用50%,4个就用25%',
- 'settings_index_intabulae1' => '使用横板样式2的分类ID:',
- 'settings_index_intabulae1_comment' => '设置分类ID号码即可,多个用逗号隔开',
- 'settings_sub_fcount' => '子论坛横板显示数量:',
- 'settings_sub_fcount_comment' => '需要横板显示多少个,如:2,4',
- 'settings_sub_fwidth' => '子论坛横板显示宽度:',
- 'settings_sub_fwidth_comment' => '每个板块显示的宽度,如:2个就用50%,4个就用25%',
- 'settings_sub_intabulae' => '使用子论坛横板的主论坛ID:',
- 'settings_sub_intabulae_comment' => '设置论坛ID号码即可,多个用逗号隔开',
复制代码
5,修改 templates.lang.php 文件,请打开 templates/default/templates.lang.php 文件,进行以下修改!
找到:
上面一行添加:
- 'sub_forumname' => '$fourm[name] 子版列表',
复制代码
6,修改 css.htm 文件,如果您想在默认风格中使用,请修改 templates/default/css.htm 文件,否则请修改对应风格模板之 css.htm 文件。
找到:
- a { text-decoration: none; color: {LINK} }
复制代码
上面一行添加:
7,修改 index.htm文件,请打开 templates/default/index.htm 文件,进行以下修改!
找到
- <!--{loop $forumlist $key $forum}-->
- <!--{if $forum['type'] == 'group' && $forumlist[($key + 1)]['type'] == 'forum'}-->
- <!--{if $key}--></tbody></table><br></div><!--{/if}-->
- <div class="maintable">
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
- <tr><td colspan="7" class="header"><table cellspacing="0" cellpadding="0" width="100%">
- <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
- <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
- <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>
- <tr class="category" align="center">
- <td width="5%"> </td>
- <td width="51%">{lang forum_name}</td>
- <td width="5%">{lang forum_threads}</td>
- <td width="5%">{lang forum_posts}</td>
- <td width="5%">{lang forum_todayposts}</td>
- <td width="13%">{lang forum_lastpost}</td>
- <td width="16%">{lang forum_moderators}</td>
- </tr><tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
- <!--{elseif $forum['permission']}-->
- <tr>
- <td class="altbg1" align="center">$forum[folder]</td>
- <td class="altbg2" align="left" onMouseOver="this.className='altbg1'" onMouseOut="this.className='altbg2'">
- $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
- <br><span class="smalltxt">$forum[description]<!--{if isset($forum['subforums'])}--><br><span class="bold">{lang forum_subforums}:</span> $forum[subforums]<!--{/if}--></span></td>
- <td class="altbg1" align="center">$forum[threads]</td>
- <td class="altbg2" align="center">$forum[posts]</td>
- <td class="altbg1" align="center">$forum[todayposts]</td>
- <!--{if $forum['permission'] == 1}-->
- <td class="altbg2" align="center"><span class="smalltxt"></span>{lang private_forum}</span></td>
- <!--{else}-->
- <!--{if is_array($forum['lastpost'])}-->
- <td class="altbg2"><table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $forum[lastpost][subject]" nowrap>
- $forum[lastpost][dateline]<br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--></td>
- <td nowrap> <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
- </tr></table></td>
- <!--{else}-->
- <td class="altbg2" align="center"><span class="smalltxt">{lang never}</span></td>
- <!--{/if}-->
- <!--{/if}-->
- <td class="altbg1" align="center" style="word-break: keep-all"><span class="smalltxt">$forum[moderators]</span></td></tr>
- <!--{/if}-->
- <!--{/loop}-->
- <!--{if empty($gid) && ($_DCACHE['forumlinks'] || $whosonlinestatus || $bdaystatus == 1 || $bdaystatus == 3)}-->
- <!--{if empty($forumlist)}--><br><br><!--{else}--></table><br></div><div class="maintable"><!--{/if}-->
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
- <!--{/if}-->
复制代码
替换为:
- {eval $incompact = explode(',', $index_intabulae);}
- {eval $incompact1= explode(',', $index_intabulae1);}
- <!--{loop $forumlist $key $forum}-->
- <!--{if $forum['type'] == 'group' && $forumlist[($key + 1)]['type'] == 'forum'}-->
- <!--{if $key}-->
- <!--{if $fcount}-->
- <td colspan="$fcount"> </td></tr></tbody></table><br></div>
- <!--{else}-->
- <!--{if in_array($forum[fid], array_merge($incompact,$incompact1))}-->
- </tbody></table><br></div>
- <!--{else}-->
- </tr></tbody></table><br></div>
- <!--{/if}-->
- <!--{/if}-->
- <!--{else}-->
- <!--{/if}-->
- <!--{if in_array($forum[fid], $incompact)}-->
- <div class="maintable">
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
- <tr><td colspan="$index_fcount" class="header"><table cellspacing="0" cellpadding="0" width="100%">
- <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
- <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
- <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>
- <tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
- <tr class="altbg2">
- {eval $fcount = $index_fcount;}
- <!--{elseif in_array($forum[fid], $incompact1)}--><div class="maintable">
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
- <tr><td colspan="$index_fcount1" class="header"><table cellspacing="0" cellpadding="0" width="100%">
- <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
- <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
- <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>
- <tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
- <tr class="altbg2">
- {eval $fcount = $index_fcount1;}
- <!--{else}--><div class="maintable">
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
- <tr><td colspan="7" class="header"><table cellspacing="0" cellpadding="0" width="100%">
- <tr class="smalltxt"><td class="bold"><a href="index.php?gid=$forum[fid]">$forum[name]</a></td><td align="right">
- <!--{if $forum['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $forum[moderators]</font> <!--{/if}-->
- <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>
- <tr class="category" align="center">
- <td width="5%"> </td>
- <td width="51%">{lang forum_name}</td>
- <td width="5%">{lang forum_threads}</td>
- <td width="5%">{lang forum_posts}</td>
- <td width="5%">{lang forum_todayposts}</td>
- <td width="13%">{lang forum_lastpost}</td>
- <td width="16%">{lang forum_moderators}</td>
- </tr><tbody id="category_$forum[fid]" style="$collapse['category_'.$forum[fid]]">
- {eval $fcount = 0;}
- <!--{/if}-->
- <!--{elseif $forum['permission']}-->
- <!--{if in_array($forum[fup],$incompact)}-->
- {eval $fcount--;}
- <!--{if $fcount == -1}--></tr><tr class="altbg2">{eval $fcount = $index_fcount-1;}<!--{/if}-->
- <td width="$index_fwidth%" class="altbg2">
- <table cellpadding="0" cellspacing="3" border="0" width="100%">
- <tr>
- <td colspan="2">
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tr>
- <td width="80%" valign="top"> $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
- <br><span class="smalltxt">$forum[description]</span></td>
- </tr></table>
- </td></tr>
- <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EFEFEF">
- <tr>
- <td width="33%">{lang forum_threads}:$forum[threads]</td>
- <td width="33%">{lang forum_posts}:$forum[posts]</td>
- <td width="33%">{lang forum_todayposts}:<b><font color=red>$forum[todayposts]</font></b></td>
- </table></td>
- </tr>
- </table>
- <!--{elseif in_array($forum[fup],$incompact1)}-->
- {eval $fcount--;}
- <!--{if $fcount == -1}--></tr><tr class="altbg2">{eval $fcount = $index_fcount1-1;}<!--{/if}-->
- <td width="$index_fwidth1%" class="altbg2" align="left" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
- <table cellpadding="3" cellspacing="0" border="0" width="100%">
- <tr>
- <td colspan="1" valign="top">
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tr>
- <td> $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
- </td>
- </tr></table>
- </td></tr>
- <tr>
- <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]
- {lang forum_posts}: $forum[posts]
- {lang forum_todayposts}:$forum[todayposts]
- </td></tr>
- </table>
- </td>
- <!--{else}-->
- <tr>
- <td class="altbg1" align="center">$forum[folder]</td>
- <td class="altbg2" align="left" onMouseOver="this.className='altbg1'" onMouseOut="this.className='altbg2'">
- $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
- <br><span class="smalltxt">$forum[description]<!--{if isset($forum['subforums'])}--><br><span class="bold">{lang forum_subforums}:</span> $forum[subforums]<!--{/if}--></span></td>
- <td class="altbg1" align="center">$forum[threads]</td>
- <td class="altbg2" align="center">$forum[posts]</td>
- <td class="altbg1" align="center">$forum[todayposts]</td>
- <!--{if $forum['permission'] == 1}-->
- <td class="altbg2" align="center"><span class="smalltxt"></span>{lang private_forum}</span></td>
- <!--{else}-->
- <!--{if is_array($forum['lastpost'])}-->
- <td class="altbg2"><table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $forum[lastpost][subject]" nowrap>
- $forum[lastpost][dateline]<br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--></td>
- <td nowrap> <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
- </tr></table></td>
- <!--{else}-->
- <td class="altbg2" align="center"><span class="smalltxt">{lang never}</span></td>
- <!--{/if}-->
- <!--{/if}-->
- <td class="altbg1" align="center" style="word-break: keep-all"><span class="smalltxt">$forum[moderators]</span></td></tr>
- <!--{/if}-->
- <!--{/if}-->
- <!--{/loop}-->
- <!--{if empty($gid) && ($_DCACHE['forumlinks'] || $whosonlinestatus || $bdaystatus == 1 || $bdaystatus == 3)}-->
- <!--{if empty($forumlist)}--><br><br><!--{else}--><!--{if $fcount}--><td colspan="$fcount"> </td><!--{/if}--></tr></tbody></table></div><div class="maintable"><!--{/if}--><br>
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
- <!--{/if}-->
复制代码
8,上传 upload 目录中文件!
注意:如果你没有改动默认模板可以直接替换mythupload目录内文件即可如果您不想覆盖,可参照修改。
[ 本帖最后由 神 于 2006-3-31 00:17 编辑 ] |