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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[发布] 防19楼【去其它城市】功能,绿色版本 FOR discuz7.2/x2.0/2.5

  [复制链接]
popuppp 发表于 2011-6-28 08:16:33 | 显示全部楼层 |阅读模式
本帖最后由 popuppp 于 2012-8-21 03:18 编辑

效果如图演示:

查看网址演示:驻马店论坛 http://bbs.zmd5.com/

修改方法如下:

7.2版本的,打开:/templates/default/header.htm (非默认风格,则修改风格中的header.htm)

搜索从下代码:

<h2><a href="$indexname" title="$bbname">{BOARDLOGO}</a></h2>

在这个代码下面添加以下代码(代码回复可见,与X2.0代码一样)



X2.0/2.5版本的,打开:/template/default/common/header.htm (非默认风格,则修改风格中的header.htm)
搜索从下代码:

<h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="./" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>

在其下面添加以下代码(代码回复可见)   
游客,如果您要查看本帖隐藏内容请回复




备注:如果您的县市名称不是两个字,且排列不是 5个一行,出现错位的话

请修改代码中的:width:160px;中的160大小
既调整一下宽度,总共两处要同时修改即可


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

评分

5

查看全部评分

 楼主| popuppp 发表于 2011-6-28 08:20:03 | 显示全部楼层

如图,分为多个地区的添加以下代码

本帖最后由 popuppp 于 2011-8-28 14:14 编辑

如图,分为多个地区的添加以下代码,添加方法与一楼一样。只是添加的代码不同。

  1. <!--公务员导航切换开始-->
  2. <style type="text/css">
  3. #city *{ margin:0;padding:0; z-index:1000000; top:0;left:0px; float:left;}
  4. #warpper{ position: relative; z-index:1000000; margin-top:5px;}
  5. #city { font:normal 12px Verdana, Arial, Helvetica, sans-serif; text-align:center; z-index:1000000;}
  6. #city a{ cursor:pointer; color:#666}
  7. #city dl{ height:18px; line-height:18px; padding:0 10px;}
  8. #city dt,.normal{ float:left; padding:0 10px 0 0 ; border-right:0px solid #ccc; text-decoration:none; width:auto; cursor:pointer; color:#FF3300; font-weight:bold;}
  9. #city dt.over{ position:relative;padding:0 10px 0px 0px; z-index:1000001;color:#FF3300; font-weight:bold; height:20px; }
  10. #city li{ float:left; list-style-type:none; margin:0px 5px; width:270px;}
  11. #city #c1 li a{ float:left; list-style-type:none; margin:0px 3px; 0 0 }
  12. #city dl dd{ position:absolute; width:270px; left:0;top:20px!important; border:1px solid #bbb; background:#fff; filter:progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=120, color=#cccccc); padding:3px 0;}
  13. .block{ display:block;}
  14. .none{ display:none;}
  15. </style>
  16. <script language="javascript">
  17. function $(str){ return document.getElementById(str);}
  18. function $$(str){ return document.getElementsByTagName(str);}
  19. var timer;
  20. function changeMenu(thisObj,num){
  21. if(thisObj.className=="over") return false;
  22. hids(thisObj);
  23. thisObj.className="over";
  24. $("c"+(num+1)).className="block";

  25. $("c"+(num+1)).onmouseover=function(){clearTimeout(timer);}
  26. $("c"+(num+1)).onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},500)}
  27. thisObj.onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},3000)}

  28. }
  29. function hids(thisObj){
  30. clearTimeout(timer);
  31. var tabObj=thisObj.parentNode.getAttribute("id");
  32. var obj_dt=$(tabObj).getElementsByTagName("dt");
  33. for(var i=0;i<obj_dt.length;i++){
  34. obj_dt[i].className="normal";
  35. $("c"+(i+1)).className="none";
  36. }
  37. }
  38. </script>
  39. <div id="city">
  40. <dl id="warpper">
  41. <dt onMouseOver="changeMenu(this,0);">[全国其他省市公考论坛]</dt>
  42. <dd id="c1" class="none">
  43. <ul>
  44. <li>
  45. <STRONG>华东地区</STRONG> <A href="forum-20-1.html">上海</A> <A href="forum-21-1.html">江苏</A> <A href="forum-23-1.html">浙江</A> <A href="forum-41-1.html">安徽</A> <A href="forum-24-1.html">福建</A> <A href="forum-25-1.html"> 江西</A> <A href="forum-19-1.html">山东</A>  

  46. <STRONG>华东地区</STRONG> <A href="forum-20-1.html">上海</A> <A href="forum-21-1.html">江苏</A> <A href="forum-23-1.html">浙江</A> <A href="forum-41-1.html">安徽</A> <A href="forum-24-1.html">福建</A> <A href="forum-25-1.html"> 江西</A> <A href="forum-19-1.html">山东</A>  

  47. <STRONG>华东地区</STRONG> <A href="forum-20-1.html">上海</A> <A href="forum-21-1.html">江苏</A> <A href="forum-23-1.html">浙江</A> <A href="forum-41-1.html">安徽</A> <A href="forum-24-1.html">福建</A> <A href="forum-25-1.html"> 江西</A> <A href="forum-19-1.html">山东</A>  

  48. <STRONG>华东地区</STRONG> <A href="forum-20-1.html">上海</A> <A href="forum-21-1.html">江苏</A> <A href="forum-23-1.html">浙江</A> <A href="forum-41-1.html">安徽</A> <A href="forum-24-1.html">福建</A> <A href="forum-25-1.html"> 江西</A> <A href="javascript:void(null)"><font color="#FFFFFF">待定</font></A>  

  49. <STRONG>华东地区</STRONG> <A href="forum-20-1.html">上海</A> <A href="forum-21-1.html">江苏</A> <A href="forum-23-1.html">浙江</A> <A href="forum-41-1.html">安徽</A> <A href="forum-24-1.html">福建</A> <A href="forum-25-1.html"> 江西</A> <A href="forum-19-1.html">山东</A>  
  50. </li>
  51. </ul>
  52. </dd>
  53. </dl>

  54. </div>
  55. <!--公务员导航切换_结束-->
复制代码
注1:width:270px  中的270是整体的宽度,总共两处,内容多的话,修改这里,增加数字或减少数字。

注2:每个分类中的链接及文字要一样多,否则可能出现错位,如果某类别中没有那么多分类,可以添加下面的代码占位,演示中已经添加了,倒数第二行。

<A href="javascript:void(null)"><font color="#FFFFFF">待定</font></A>

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

一切都是天意 发表于 2011-6-28 08:21:42 | 显示全部楼层
离老乡这个么近
回复

使用道具 举报

meng123qq 发表于 2011-6-28 08:25:50 | 显示全部楼层
代码回复可见
回复

使用道具 举报

imgen 发表于 2011-6-28 08:32:44 | 显示全部楼层
支持楼主 牛逼啊!~
回复

使用道具 举报

zcsln 发表于 2011-6-28 08:35:22 | 显示全部楼层
{:soso_e121:}看看
回复

使用道具 举报

wangkun300mm 发表于 2011-6-28 08:37:01 | 显示全部楼层
回复

使用道具 举报

clc7286 发表于 2011-6-28 08:43:52 | 显示全部楼层
在其下面添加以下代码(代码回复可见)
回复

使用道具 举报

mwtee 发表于 2011-6-28 08:45:54 | 显示全部楼层
卡能看坎坎坷
回复

使用道具 举报

石头岛 发表于 2011-6-28 08:49:05 | 显示全部楼层
{:soso__11843406933343461858_2:}
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-28 05:26 , Processed in 0.203595 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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