去除discuz x2底部版权和去掉头部“powered by discuz!
去除discuz x2底部版权和去掉头部“powered by discuz!
一、去除头部版权
在原来的discuz X2版本中,标题中去掉“Powered by Discuz!”版权标识很容易,只需要修改模板文件的头部公用文件,将“Powered by Discuz!”这一行字去掉即可。但是discuz X2 似乎对这点有所防备,把-Powered by Discuz!中的-放在了变量里,所以删除后,标题一句话结束后会有一个小-尾巴,对搜索引擎很不友好,所以也有一个好的办法完美解决,即:
打开\template\default\common\header_common.htm文件,找到<title><!–{if !empty($navtitle)}–>$navtitle – <!–{/if}–><!–{if empty($nobbname)}–> $_G['setting']['bbname']-<!–{/if}–>Powered by Discuz!</title>
将其中的“Powered By Discuz!”字串改为“{lang secondtitle}”。
再打开source/language/lang_template.php。 在变量的最后,也就是整个数组的目录后按以前的格式,加上“‘secondtitle’ => ‘你的论坛名称!”,” 。
更新缓存即可。
二、去除底部的版本
打开template\default\common,找到footer.htm文件,用deamweaver打开,点击编辑,再点击查找和替换powerd by,知道相应的位置把底部版权的相应内容改了就ok了,注意修改下面红色标记部分
</div>
<!--{if empty($topic) || ($topic[usefooter])}-->
<!--{eval $focusid = getfocus_rand($_G[basescript]);}-->
<!--{if $focusid !== null}-->
<!--{eval $focus = $_G['cache']['focus']['data'][$focusid];}-->
<div class="focus" id="sitefocus">
<div class="bm">
<div class="bm_h cl">
<a href="javascript:;" onclick="setcookie('nofocus_$focusid', 1, $_G['cache']['focus']['cookie']*3600);$('sitefocus').style.display='none'" class="y" title="{lang close}">{lang close}</a>
<h2><!--{if $_G['cache']['focus']['title']}-->{$_G['cache']['focus']['title']}<!--{else}-->{lang focus_hottopics}<!--{/if}--></h2>
</div>
<div class="bm_c">
<dl class="xld cl bbda">
<dt><a href="{$focus['url']}" class="xi2" target="_blank">$focus['subject']</a></dt>
<!--{if $focus[image]}-->
<dd class="m"><a href="{$focus['url']}" target="_blank"><img src="{$focus['image']}" alt="$focus['subject']" /></a></dd>
<!--{/if}-->
<dd>$focus['summary']</dd>
</dl>
<p class="ptn hm"><a href="{$focus['url']}" class="xi2" target="_blank">{lang focus_show} »</a></p>
</div>
</div>
</div>
<!--{/if}-->
<!--{ad/footerbanner/wp a_f/1}--><!--{ad/footerbanner/wp a_f/2}--><!--{ad/footerbanner/wp a_f/3}-->
<!--{ad/float/a_fl/1}--><!--{ad/float/a_fr/2}-->
<!--{ad/couplebanner/a_fl a_cb/1}--><!--{ad/couplebanner/a_fr a_cb/2}-->
<!--{ad/cornerbanner/a_cn}-->
<!--{hook/global_footer}-->
<div id="ft" class="wp cl">
<div id="flk" class="y">
<p>
<!--{loop $_G['setting']['footernavs'] $nav}--><!--{if $nav['available'] && ($nav['type'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1)) ||
!$nav['type'] && ($nav['id'] == 'stat' && $_G['group']['allowstatdata'] || $nav['id'] == 'report' && $_G['uid'] || $nav['id'] == 'archiver' || $nav['id'] == 'mobile'))}--><!--{if $nav['id'] == 'mobile' && $_G['setting']['mobile']['allowmobile'] != 1}--><!--{eval continue;}--><!--{/if}-->$nav[code]<span class="pipe">|</span><!--{/if}--><!--{/loop}-->
<strong><a href="$_G['setting']['siteurl']" target="_blank">$_G['setting']['sitename']</a></strong>
<!--{if $_G['setting']['icp']}-->( <a href="http://www.3s33.com/" target="_blank">$_G['setting']['icp']</a> )<!--{/if}-->
<!--{hook/global_footerlink}-->
<!--{if $_G['setting']['statcode']}-->$_G['setting']['statcode']<!--{/if}-->
</p>
<p class="xs0">
{lang time_now}
<span id="debuginfo">
<!--{if debuginfo()}-->, Processed in $_G[debuginfo][time] second(s), $_G[debuginfo][queries] queries
<!--{if $_G['gzipcompress']}-->, Gzip On<!--{/if}--><!--{if $_G['memory']}-->, <!--{echo ucwords($_G['memory'])}--> On<!--{/if}-->.
<!--{/if}-->
</span>
</p>
</div>
<div id="frt">
<p>Powered by <strong><a href="http://www.baidu.com/" target="_blank">百度</a></strong> <em>$_G['setting']['version']</em><!--{if !empty($_G['setting']['boardlicensed'])}--> <a href=http://www.baidu.com target="_blank">Licensed</a><!--{/if}--></p>
<p class="xs0">© 2001-2011 <a href="http://www.baidu.com" target="_blank">百度 Inc.</a></p>
</div>
<!--{eval updatesession();}-->
<!--{if $_G['uid'] && $_G['group']['allowinvisible']}-->
<script type="text/javascript">
var invisiblestatus = '<!--{if $_G['session']['invisible']}-->{lang login_invisible_mode}<!--{else}-->{lang login_normal_mode}<!--{/if}-->';
var loginstatusobj = $('loginstatusid');
if(loginstatusobj != undefined && loginstatusobj != null) loginstatusobj.innerHTML = invisiblestatus;
<!--{/if}-->
</script>
</div>
<!--{if $upgradecredit !== false}-->
<div id="g_upmine_menu" class="tip tip_3" style="display:none;">
<div class="tip_c">
{lang credits} $_G[member][credits], {lang thread_groupupgrade} $upgradecredit {lang credits}
</div>
<div class="tip_horn"></div>
</div>
<!--{/if}-->
<!--{/if}-->
<!--{if !$_G['setting']['bbclosed']}-->
<!--{if $_G[uid] && !isset($_G['cookie']['checkpm'])}-->
<script type="text/javascript" src="home.php?mod=spacecp&ac=pm&op=checknewpm&rand=$_G[timestamp]"></script>
<!--{/if}-->
<!--{if !isset($_G['cookie']['sendmail'])}-->
<script type="text/javascript" src="home.php?mod=misc&ac=sendmail&rand=$_G[timestamp]"></script>
<!--{/if}-->
<!--{/if}-->
<!--{if $_GET['diy'] == 'yes'}-->
<!--{if (CURMODULE == 'topic' || $_G['group']['allowdiy']) && (empty($do) || $do != 'index') && !empty($_G['style']['tplfile'])}-->
<script type="text/javascript" src="{$_G[setting][jspath]}common_diy.js?{VERHASH}"></script>
<script type="text/javascript" src="{$_G[setting][jspath]}portal_diy.js?{VERHASH}"></script>
<!--{/if}-->
<!--{if $space['self'] && CURMODULE == 'space' && $do == 'index'}-->
<script type="text/javascript" src="{$_G[setting][jspath]}common_diy.js?{VERHASH}"></script>
<script type="text/javascript" src="{$_G[setting][jspath]}space_diy.js?{VERHASH}"></script>
<!--{/if}-->
<!--{/if}-->
<!--{if $_G['member']['newprompt'] && (empty($_G['cookie']['promptstate_'.$_G[uid]]) || $_G['cookie']['promptstate_'.$_G[uid]] != $_G['member']['newprompt']) && $_G['gp_do'] != 'notice'}-->
<script type="text/javascript">noticeTitle();</script>
<!--{/if}-->
<!--{eval userappprompt();}-->
<span id="scrolltop" onclick="window.scrollTo('0','0')">{lang scrolltop}</span>
<script type="text/javascript">_attachEvent(window, 'scroll', function(){showTopLink();});</script>
<!--{eval output();}-->
</body>
</html>
目录 返回
首页