微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

DISCUZ X1.5主题分类和分类信息写进TITLE

<span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium 'Times New Roman'; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="line-height: 16px; font-family: 'Trebuchet MS',Arial,sans-serif; color: rgb(64,64,64); font-size: 13px" class="Apple-style-span">
<p style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">假如disCUZ X1.5开启了主题分类分类信息,你会发现主题分类分类信息列表页的TITLE标题依然统一为“版块名称 – 论坛名称”,假如我要这样“主题分类分类信息 – 版块名称 – 论坛名称”这样是不是会更利于SEO优化呢,答案当然是肯定的。


<p style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">根据我自己的disCUZ X1.5论坛的特征(因为我就用一个分类信息,所以在DZ X1.5后台开启了分类信息的“显示分类”),我需要主题分类分类信息列表页的TITLE标题如下的SEO优化效果1、如果点开的页面主题分类也有分类信息,TITLE标题显示为“主题分类分类信息 – 论坛名称”2、如果点开的页面主题分类也无分类信息,TITLE标题显示为“版块名称 – 论坛名称”3、如果点开的页面主题分类分类信息,TITLE标题显示为“主题分类 – 版块名称 – 论坛名称”4、如果点开的页面主题分类分类信息,TITLE标题显示为“分类信息 – 论坛名称


<p style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">修改方法如下source\module\forum\forum_forumdisplay.PHP修改


<div style="overflow-x: auto; overflow-y: auto; background-color: rgb(231,229,220); margin: 18px 0px; width: 594px; font-family: Consolas,'Courier New',Courier,mono; font-size: 12px; padding-top: 1px" class="dp-Highlighter">
<div style="padding-left: 45px" class="bar">
<div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; background-color: rgb(248,248,248); padding-left: 10px; padding-right: 8px; font: 9px Verdana,Geneva,Helvetica,sans-serif; color: silver; padding-top: 3px" class="tools">
<a style="outline-style: none; color: rgb(160,160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;" href="#">view plain<a style="outline-style: none; color: rgb(160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;" href="#">copy to clipboard<a style="outline-style: none; color: rgb(160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;" href="#">print<a style="outline-style: none; color: rgb(160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('About',this);return false;" href="#">?

    ottom: 0px; background-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c">
  1. ottom: 0px !important; line-height: 14px; overflow-x: hidden; overflow-y: hidden; background-color: rgb(255,255); padding-left: 0px !important; width: 543px; padding-right: 0px !important; word-break: break-all; padding-top: 10px !important" class="alt">

ottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">为

分类信息是否存在开始
  • ottom: 0px !important; line-height: 14px; overflow-x: hidden; overflow-y: hidden; background-color: rgb(248,248); padding-left: 0px !important; width: 543px; padding-right: 0px !important; word-break: break-all; padding-top: 10px !important">
  • 分类信息是否存在结束
  • ottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">修改

  • ottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">为

  • 分类信息是否存在结束
  • 修改开始
  • 修改结束
  • ottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">代码的关键在于主题分类:$_G['forum']['threadtypes']['types'][$_G['gp_typeid']]分类信息:$_G['forum']['threadsorts']['types'][$_G['gp_sortid']]

    ottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">在DZ7等以前版本中好像是主题分类:$forum['threadtypes']['types'][$thread['typeid']]分类信息:$forum['threadsorts']['types'][$thread['sortid']]

    版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

    相关推荐