• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    Discuz论坛标题和底部去掉版权信息实例讲解

    需求:

    一、标题:打开template/default/common/header_common.htm文件,里面的代码如下

    !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    html xmlns="http://www.w3.org/1999/xhtml">
    	head>
    	meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
    	!--{if $_G['config']['output']['iecompatible']}-->meta http-equiv="X-UA-Compatible" content="IE=EmulateIE{$_G['config']['output']['iecompatible']}" />!--{/if}-->
    	title>!--{if !empty($navtitle)}-->$navtitle - !--{/if}-->!--{if empty($nobbname)}--> $_G['setting']['bbname']!--{/if}-->Powered by Discuz!/title>
    	$_G['setting']['seohead']
     
    	meta name="keywords" content="{if !empty($metakeywords)}{echo dhtmlspecialchars($metakeywords)}{/if}" />
    	meta name="description" content="{if !empty($metadescription)}{echo dhtmlspecialchars($metadescription)} {/if}{if empty($nobbname)},$_G['setting']['bbname']{/if}" />
    	meta name="generator" content="Discuz! $_G['setting']['version']" />
    	meta name="author" content="Discuz! Team and Comsenz UI Team" />
    	meta name="copyright" content="2001-2017 Comsenz Inc." />
    	meta name="MSSmartTagsPreventParsing" content="True" />
    	meta http-equiv="MSThemeCompatible" content="Yes" />
    	base href="{$_G['siteurl']}" rel="external nofollow" />
    	!--{csstemplate}-->
    	script type="text/javascript">var STYLEID = '{STYLEID}', STATICURL = '{STATICURL}', IMGDIR = '{IMGDIR}', VERHASH = '{VERHASH}', charset = '{CHARSET}', discuz_uid = '$_G[uid]', cookiepre = '{$_G[config][cookie][cookiepre]}', cookiedomain = '{$_G[config][cookie][cookiedomain]}', cookiepath = '{$_G[config][cookie][cookiepath]}', showusercard = '{$_G[setting][showusercard]}', attackevasive = '{$_G[config][security][attackevasive]}', disallowfloat = '{$_G[setting][disallowfloat]}', creditnotice = '!--{if $_G['setting']['creditnotice']}-->$_G['setting']['creditnames']!--{/if}-->', defaultstyle = '$_G[style][defaultextstyle]', REPORTURL = '$_G[currenturl_encode]', SITEURL = '$_G[siteurl]', JSPATH = '$_G[setting][jspath]', CSSPATH = '$_G[setting][csspath]', DYNAMICURL = '$_G[dynamicurl]';/script>
    	script type="text/javascript" src="{$_G[setting][jspath]}common.js?{VERHASH}">/script>
    	!--{if empty($_GET['diy'])}-->!--{eval $_GET['diy'] = '';}-->!--{/if}-->
    	!--{if !isset($topic)}-->!--{eval $topic = array();}-->!--{/if}-->

    1、原来的标题代码为:

    title>!--{if !empty($navtitle)}-->$navtitle - !--{/if}-->!--{if empty($nobbname)}--> $_G['setting']['bbname']!--{/if}-->Powered by Discuz!/title>

    修改为:

    title>!--{if !empty($navtitle)}-->$navtitle!--{/if}-->!--{if empty($nobbname)}--> $_G['setting']['bbname'] !--{/if}-->/title>

    注意:一定记着把$navtitle后面的“ - ”去掉,要不然标题处还是会出现 - ,例如下图:

    2、原来的描述代码为:

    meta name="description" content="{if !empty($metadescription)}{echo dhtmlspecialchars($metadescription)} {/if}{if empty($nobbname)},$_G['setting']['bbname']{/if}" />

     修改为:

    meta name="description" content="{if !empty($metadescription)}{echo dhtmlspecialchars($metadescription)} {/if}" />

    二、底部:找到底部的模板文件template/default/common/footer.htm或者你模板文件对应的common/footer.htm,搜索“Powered by”,找到相关代码行删掉即可

    div id="frt">
    			p>Powered by strong>a href="http://www.discuz.net" rel="external nofollow" target="_blank">Discuz!/a>/strong> em>$_G['setting']['version']/em>!--{if !empty($_G['setting']['boardlicensed'])}--> a href="http://license.comsenz.com/?pid=1host=$_SERVER[HTTP_HOST]" rel="external nofollow" target="_blank">Licensed/a>!--{/if}-->/p>
    			p class="xs0">copy; 2001-2017 a href="http://www.comsenz.com" rel="external nofollow" target="_blank">Comsenz Inc./a>/p>
    		/div>

    三、修改完成后,登录后台更新一下缓存即可,最终效果如下图,是不是非常完美。

    到此这篇关于Discuz论坛标题和底部去掉版权信息实例讲解的文章就介绍到这了,更多相关Discuz论坛标题和底部去掉版权信息内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

    您可能感兴趣的文章:
    • discuz论坛更换域名,详细文件修改步骤
    • Discuz不使用插件实现简单的打赏功能
    • Discuz论坛密码与密保加密规则
    • discuz图片顺序混乱解决方案
    • discuz目录文件资料汇总
    上一篇:Thinkphp自定义美化success和error提示跳转页面代码实例
    下一篇:PHP生成缩略图实例讲解
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯

    时间:9:00-21:00 (节假日不休)

    地址:江苏信息产业基地11号楼四层

    《增值电信业务经营许可证》 苏B2-20120278

    Discuz论坛标题和底部去掉版权信息实例讲解 Discuz,论坛,标题,和,底部,