首先找到头部文件header.htm或者.php,找到导航部分!
<!--{loop $_G['setting']['navs'] $nav}-->
<!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}--><li {if $mnid == $nav}class="a" {/if}$nav></li><!--{/if}-->
<!--{/loop}-->
在<!--{/loop}-->后面加一个钩子
<!--{hook/global_nav_extra_link}-->添加以后!
<!--{loop $_G['setting']['navs'] $nav}-->
<!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}--><li {if $mnid == $nav}class="a" {/if}$nav></li><!--{/if}-->
<!--{/loop}-->
<!--{hook/global_nav_extra_link}-->
然后打开我刚刚给你说的文件,保持文件不删除任何内容!
<?php
/**
* (C)2001-2099 Liangjian Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: apply.class.php liangjian $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class plugin_applylink{
function global_footerlink(){
return '<a style="cursor:pointer" onclick=\'showWindow("apply","plugin.php?id=applylink:apply&action=showwindow")\' href="#"><font color="red">'.lang('plugin/applylink','apply1').'</font></a>';
}
}
?>
然后找到
function global_footerlink(){
return '<a style="cursor:pointer" onclick=\'showWindow("apply","plugin.php?id=applylink:apply&action=showwindow")\' href="#"><font color="red">'.lang('plugin/applylink','apply1').'</font></a>';替换为刚刚我们所定义的钩子,以及导航代码!function global_nav_extra_link(){
return '<li><a style="cursor:pointer" onclick=\'showWindow("apply","plugin.php?id=applylink:apply&action=showwindow")\' href="#"><font color="red">'.lang('plugin/applylink','apply1').'</font></a></li>';修改后如下:
<?php
/**
* (C)2001-2099 Liangjian Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: apply.class.php liangjian $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class plugin_applylink{
function global_nav_extra_link(){
return '<li><a style="cursor:pointer" onclick=\'showWindow("apply","plugin.php?id=applylink:apply&action=showwindow")\' href="#"><font color="red">'.lang('plugin/applylink','apply1').'</font></a></li>';
}
}
?>上面代码中,导航的颜色默认是红色,如要修改可以修改上面代码中的
<font color="red"> <span style="line-height: 1.5;">red就是颜色值红色,可以用十六进制去替换也可以使用rgb、rgba等等颜色值!</span>
这样就自动添加到导航上面去了!
如图:
页:
1
[2]