最土团购网修改导航当前页样式判定

1.修改/include/function/current.php
第19行左右
修改return current_link(null, $a);
为return current_link($l, $a);

2.修改current_frontend 根据当前地址,判断是否是当前页面,所以要修改如下代码。把导航上有的链接都替换成对应链接。

$r = $_SERVER['REQUEST_URI'];//定义路径变量

if (preg_match('#/team/index.php#',$r)) $l = '/team/index.php';
elseif (preg_match('#/team/seconds.php#',$r)) $l = '/team/seconds.php';
elseif (preg_match('#/team#',$r)) $l = '/team/index.php';
elseif (preg_match('#/help/tour.php#',$r)) $l = '/help/tour.php';
elseif (preg_match('#/help/jifen.php#',$r)) $l = '/help/jifen.php';
elseif (preg_match('#/help#',$r)) $l = '/help/tour.php';
elseif (preg_match('#/forum#',$r)) $l = '/forum/index.php';
elseif (preg_match('#/subscribe#',$r)) $l = '/subscribe.php';
else $l = '/index.php';

3.修改样式#hd .nav li.current a为当前页样式

4.修改header.html

第30行左右

<ul class="nav cf">${current_frontend()}</ul>

posted @ 2012-08-07 14:17  lonelystarxing  阅读(438)  评论(0编辑  收藏  举报