工程技术 | 酒店管理 | 酒店筹建 | 酒店开业 | 案例分析 | 酒店贴图 | 学习园地 | 有问必答 | 酒店人才 |
发新话题
打印

[转]PW4.01风格升级为4.32风格的简易方法

[转]PW4.01风格升级为4.32风格的简易方法

  升级风格,涉及的文件是template/你的风格/目录下的文件

下面偶说了很多,但是你也许可以做的很简单
不同风格,结构不一样,出了问题不要K我哦,反正我是这样升了我的6个风格

补充了,如何在插件中心中添加连接,在二楼

补充了,如何修正风格引起的前台非法操作的问题,在四楼,和五楼


template/你的风格/这个目录下一般只有header.htm,footer.htm,和index.htm
header.htm和footer.htm 是一定要改的
index.htm 不改也许对你影响也不大
read.htm和thread.htm 也许你的风格不会涉及,也许会涉及,不过你完全可以直接干脆的把它删掉(只是稍微影响原风格罢了)

TOP

1.header.htm

a.charset 由定量换为变量(这一步可有可无)

找到:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="$db_metakeyword" />
<meta name="description" content="$db_metadescrip" />

将 gb2312 替换为 $db_charset

b.增加插件中心的功能

找到
</style><!--css-->
在上面插入

.menu{position:absolute;}


找到
CODE:

| <a href=&#39;show.php&#39;>展区</a>
<!--
EOT;
}foreach($db_hackdb as $key=>$hack){
if($hack[4] && $hack[2]){print <<<EOT
-->
| <a href=&#39;hack.php?H_name=$hack[1]&#39;>$hack[0]</a>
<!--
EOT;
}}}print <<<EOT
-->

[Copy to clipboard]


替换为
CODE:

| <a href=&#39;show.php&#39;>展区</a>
<!--
EOT;
}print <<<EOT
-->
| <a href="#" id="td_hack"
onclick="click_open
(&#39;menu_hack&#39;,&#39;td_hack&#39;);"
onMouseOver="mouseover_open
(&#39;menu_hack&#39;,&#39;td_hack&#39;);">插件中心</a>
<!--
EOT;
}print <<<EOT
-->

[Copy to clipboard]



在header.htm代码的最后找到,
<br><br>
<!--
EOT;
?>-->
在它的上面插入
CODE:

<div id="showmenu" style="z-index:100;display:none;"></div>
<div id="menu_hack" class="menu" style="display:none;">
  <table width="120" cellspacing=1 cellpadding=5 $i_table>
   <tr>
      <td class="head">插件中心</td>
   </tr>
<!--
EOT;
foreach($db_hackdb as $key=>$hack){
if($hack[4] && $hack[2]){print <<<EOT
-->
   <tr>
      <td class="f_one"><a href=&#39;hack.php?H_name=$hack[1]&#39;>$hack[0]</a></td>
   </tr>
<!--
EOT;
}}print <<<EOT
-->
  </table>
</div>

[Copy to clipboard]



补充,如何在插件中心添加连接

在header.htm中添加的最后一段代码中,找到
   <tr>
      <td class="head">插件中心</td>
   </tr>

在下面添加连接,

如添加在线电视的连接(假设电视是tv.php),
就在
   <tr>
      <td class="head">插件中心</td>
   </tr>
后面添加
   <tr>
      <td class="f_one"><a href="tv.php">在线电视</a></td>
   </tr>

又如添加音乐开关的连接(假设音乐版是music.htm,普通版当然是index.php)
就在
   <tr>
      <td class="head">插件中心</td>
   </tr>
后面添加
   <tr>
      <td class="f_one">音乐 <a href="music.htm" target=_parent>
开</a>/<a href="index.php" target=_parent>关</a></td>
   </tr>

TOP

2.index.htm

加入广告代码(如果你不做广告的话,index.htm不用修改)

插入的广告代码是:

CODE:

<!--ads begin-->
<!--
EOT;
if($advertdb[text]){
print <<<EOT
-->
<br>
<table width=&#39;$tablewidth&#39; cellspacing=1 cellpadding=6 align=center $i_table>
<!--
EOT;
$id=0;
foreach($advertdb[text] as $key => $value){
$value = strtotime($value[endtime]) > $timestamp ? $value[code] : &#39;&#39;;
if($id==0){
print <<<EOT
-->
<tr align=center>
<!--
EOT;
}$id++;print <<<EOT
-->
<td class="f_one" width=&#39;25%&#39;>$value</td>
<!--
EOT;
if($id==4){
$id=0;
print <<<EOT
-->
</tr>
<!--
EOT;
}}
if($advertdb[text] && $id && $id<4){
for($i=$id;$i<4;$i++){print <<<EOT
-->
<td class="f_one" width=&#39;25%&#39;></td>
<!--
EOT;
}print <<<EOT
-->
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
}print <<<EOT
-->
<!--ads end-->

TOP

3.footer.htm(这个不改插件中心会失效的)


</html>
<!--
EOT;
?>-->

上面插入
<script language="JavaScript" src="$imgpath/global.js"></scri

TOP

4.thread.htm

有的风格不涉及这个文件,有的会涉及到的,

如果涉及到的话,需要升级一下

方法一:删除风格目录下 thread.htm ,最简单了(但这样就会改变原风格的一些细节)

方法二:

a.更新广告代码

找到
<!--ads begin-->




<!--ads end-->

替换为

CODE:

<!--ads begin-->
<!--
EOT;
if($advertdb[text]){
print <<<EOT
-->
<table width=&#39;$tablewidth&#39; cellspacing=1 cellpadding=6 align=center $i_table>
<!--
EOT;
$id=0;
foreach($advertdb[text] as $key => $value){
$value = strtotime($value[endtime]) > $timestamp ? $value[code] : &#39;&#39;;
if($id==0){
print <<<EOT
-->
<tr align=center>
<!--
EOT;
}$id++;print <<<EOT
-->
<td class="f_one" width=&#39;25%&#39;>$value</td>
<!--
EOT;
if($id==4){
$id=0;
print <<<EOT
-->
</tr>
<!--
EOT;
}}
if($advertdb[text] && $id && $id<4){
for($i=$id;$i<4;$i++){print <<<EOT
-->
<td class="f_one" width=&#39;25%&#39;></td>
<!--
EOT;
}print <<<EOT
-->
</tr>
<!--
EOT;
}print <<<EOT
-->
</table><br>
<!--
EOT;
}print <<<EOT
-->
<!--ads end-->

[Copy to clipboard]


b.修改帖子管理[精锁顶提亮] 这个东西否则会非法操作的

找到
CODE:

<div style="float:right"><font color=#ff8ba2>
[<a href=&#39;masingle.php?action=digest&fid=$thread[fid]&tid=$thread[tid]&#39; title=&#39;加入精华帖&#39;>精</a><a href=&#39;masingle.php?action=lock&fid=$thread[fid]&tid=$thread[tid]&#39; title=&#39;锁定帖子不让会员再回复帖子&#39;>锁</a><a href=&#39;masingle.php?action=headtopic&fid=$thread[fid]&tid=$thread[tid]&#39; title=&#39;置顶主题:将主题置顶,以便会员查看&#39;>顶</a><a href=&#39;masingle.php?action=pushtopic&fid=$thread[fid]&tid=$thread[tid]&#39; title=&#39;提前帖子&#39;>提</a><a href=&#39;masingle.php?action=edit&fid=$thread[fid]&tid=$thread[tid]&#39; title=&#39;编辑标题&#39;>亮</a>]
</font></div>

[Copy to clipboard]


替换为
CODE:

<div style="float:right"><font color=#ff8ba2>
[<a href=&#39;mawhole.php?action=digest&fid=$thread[fid]&seltid=$thread[tid]&#39; title=&#39;加入精华帖&#39;>精</a><a href=&#39;mawhole.php?action=lock&fid=$thread[fid]&seltid=$thread[tid]&#39; title=&#39;锁定帖子不让会员再回复帖子&#39;>锁</a><a href=&#39;mawhole.php?action=headtopic&fid=$thread[fid]&seltid=$thread[tid]&#39; title=&#39;置顶主题:将主题置顶,以便会员查看&#39;>顶</a><a href=&#39;mawhole.php?action=pushtopic&fid=$thread[fid]&seltid=$thread[tid]&#39; title=&#39;提前帖子&#39;>提</a><a href=&#39;mawhole.php?action=edit&fid=$thread[fid]&seltid=$thread[tid]&#39; title=&#39;编辑标题&#39;>亮</a>]
</font></div>

[Copy to clipboard]


c.增加批量置顶,加亮等功能否则会非法操作的

找到
CODE:

<input name=action type=radio value=&#39;type&#39;>主题分类
<input name=action type=radio value=&#39;move&#39;>移动
<input name=action type=radio value=&#39;copy&#39;>复制
<input name=action type=radio value=&#39;del&#39; checked>删除<br><br>
<input type=button value=&#39;帖子管理&#39; onclick="location.href=&#39;thread.php?fid=$fid&search=$search&page=$page&concle=$concle&#39;">
<input type=&#39;button&#39; name=&#39;chkall&#39; value=&#39;全 选&#39; onclick=&#39;CheckAll(this.form)&#39;>
<input type=&#39;reset&#39; name=&#39;Reset&#39; value=&#39;重 置&#39;>
<input type=&#39;submit&#39; name=&#39;hello&#39; value=&#39;提 交&#39;>

[Copy to clipboard]


替换为
CODE:

<input name=action type=radio value=&#39;headtopic&#39;>置顶
<input name=action type=radio value=&#39;digest&#39;>精华
<input name=action type=radio value=&#39;lock&#39;>锁定
<input name=action type=radio value=&#39;edit&#39;>加亮
<input name=action type=radio value=&#39;pushtopic&#39;>提前
<input name=action type=radio value=&#39;type&#39;>主题分类
<input name=action type=radio value=&#39;move&#39;>移动
<input name=action type=radio value=&#39;copy&#39;>复制
<input name=action type=radio value=&#39;del&#39; checked>删除
<br><br>
<input type=button value=&#39;帖子管理&#39; onclick="location.href=&#39;thread.php?fid=$fid&search=$search&page=$page&concle=$concle&#39;">
<input type=&#39;button&#39; name=&#39;chkall&#39; value=&#39;全 选&#39; onclick=&#39;CheckAll(this.form)&#39;>
<input type=&#39;reset&#39; name=&#39;Reset&#39; value=&#39;重 置&#39;>
<input type=&#39;submit&#39; name=&#39;hello&#39; value=&#39;提 交&#39;>

[Copy to clipboard]


d.增加版块权限查看

找到
<select onchange=Fjump(this.options[this.selectedIndex].value)>
<option value=&#39;&#39; selected>快速跳至</option>
$forumcache
</select>

在上面插入
<a href="profile.php?action=forumright&fid=$fid" title="查看您在本版块的权限">版块权限查看</a>

TOP

5.read.htm

有的风格不涉及这个文件,有的会涉及到的, 如果涉及到的话,需要升级一下

方法一:删除格目录下 read.htm ,最简单了(但这样就会改变原风格的一些细节)

方法二:

a.更新广告代码

找到
<!--ads begin-->




<!--ads end-->

替换为
CODE:

<!--ads begin-->
<!--
EOT;
if($advertdb[text]){
print <<<EOT
-->
<table width=&#39;$tablewidth&#39; cellspacing=1 cellpadding=6 align=center $i_table>
<!--
EOT;
$id=0;
foreach($advertdb[text] as $key => $value){
$value = strtotime($value[endtime]) > $timestamp ? $value[code] : &#39;&#39;;
if($id==0){
print <<<EOT
-->
<tr align=center>
<!--
EOT;
}$id++;print <<<EOT
-->
<td class="f_one" width=&#39;25%&#39;>$value</td>
<!--
EOT;
if($id==4){
$id=0;
print <<<EOT
-->
</tr>
<!--
EOT;
}}
if($advertdb[text] && $id && $id<4){
for($i=$id;$i<4;$i++){print <<<EOT
-->
<td class="f_one" width=&#39;25%&#39;></td>
<!--
EOT;
}print <<<EOT
-->
</tr>
<!--
EOT;
}print <<<EOT
-->
</table><br>
<!--
EOT;
}print <<<EOT
-->
<!--ads end-->

[Copy to clipboard]


2.更改[置顶] [精华] [锁定] [提前] [加亮] [删除] [移动] [复制] [使用道具]这些东西否则会非法操作的
找到
CODE:

[<a href=&#39;masingle.php?action=headtopic&fid=$fid&tid=$tid&#39; title=&#39;置顶帖子&#39;>置顶</a>]
[<a href=&#39;masingle.php?action=digest&fid=$fid&tid=$tid&#39; title=&#39;精华帖子&#39;>精华</a>]
[<a href=&#39;masingle.php?action=lock&fid=$fid&tid=$tid&#39; title=&#39;锁定帖子&#39;>锁定</a>]
[<a href=&#39;masingle.php?action=pushtopic&fid=$fid&tid=$tid&#39; title=&#39;提前帖子&#39;>提前</a>]
[<a href=&#39;masingle.php?action=edit&fid=$fid&tid=$tid&#39; title=&#39;编辑标题颜色&#39;>标题</a>]
[<a href=&#39;mawhole.php?action=del&fid=$fid&deltid=$tid&#39; title=&#39;删除帖子&#39;>删除</a>]
[<a href=&#39;mawhole.php?action=move&fid=$fid&deltid=$tid&#39; title=&#39;移动帖子&#39;>移动</a>]
[<a href=&#39;mawhole.php?action=copy&fid=$fid&deltid=$tid&#39; title=&#39;复制帖子&#39;>复制</a>]

[Copy to clipboard]


替换为
CODE:

[<a href=&#39;mawhole.php?action=headtopic&fid=$fid&seltid=$tid&#39; title=&#39;置顶帖子&#39;>置顶</a>]
[<a href=&#39;mawhole.php?action=digest&fid=$fid&seltid=$tid&#39; title=&#39;精华帖子&#39;>精华</a>]
[<a href=&#39;mawhole.php?action=lock&fid=$fid&seltid=$tid&#39; title=&#39;锁定帖子&#39;>锁定</a>]
[<a href=&#39;mawhole.php?action=pushtopic&fid=$fid&seltid=$tid&#39; title=&#39;提前帖子&#39;>提前</a>]
[<a href=&#39;mawhole.php?action=edit&fid=$fid&seltid=$tid&#39; title=&#39;编辑标题颜色&#39;>加亮</a>]
[<a href=&#39;mawhole.php?action=del&fid=$fid&seltid=$tid&#39; title=&#39;删除帖子&#39;>删除</a>]
[<a href=&#39;mawhole.php?action=move&fid=$fid&seltid=$tid&#39; title=&#39;移动帖子&#39;>移动</a>]
[<a href=&#39;mawhole.php?action=copy&fid=$fid&seltid=$tid&#39; title=&#39;复制帖子&#39;>复制</a>]

TOP

发新话题