dz论坛seo优化(seo专业优化平台)
- SEO
- 2022-12-19 04:12:19
- 12
本篇文章给大家谈谈dz论坛seo优化,以及seo专业优化平台对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
初次安装discuz论坛应该做好哪些优化细节
一、discuz论坛的全局SEO设置(论坛后台-全局设置):
首先设置站点信息-站点名称(站点名称,将显示在浏览器窗口标题等位置)、网站名称(网站名称,将显示在页面底部的联系方式处)、站点URL(网站 URL,将作为链接显示在页面底部,方便URL标准化)、关闭站点(一般选择否)、其它信息设置。
然后进行SEO设置-URL静态化(就是discuz论坛伪静态设置规则,进行全部勾选即可)、Rewrite 兼容性(一般选择否),论坛的三个标签(对于三个标签的写法规则请参考-网站编辑的意义里有详细讲解)等。
再次需要域名设置(对于应用域名的设置,如果论坛是二级域名设置比较简单,如果是二级目录需要稍微调整下程序,下面会详细讲解)。
还有进行其他的一些细节设置,如开启Archiver、SiteMap网站地图、Rss(并把RSS文件里的URL规则修改)等。
注:Rss文件修改-打开网站目录下的rss.php,查找:
" link{$boardurl}viewthread.php?tid=$thread[tid]/link\n".
替换为:
" link{$boardurl}thread-$thread[tid]-1-1.html/link\n".
二、导航和次导航的设置:
可以在顶部的DIY设置那里添加辅助导航(如SEM、SEO、SEO学习等),并在底部站点统计那里添加次导航(如SEM、Discuz等)。修改位置分别在:/bbs/templates/default/ 里的header.htm 文件和/bbs/templates/default/ 里的footer.htm 文件。
三、去掉discuz默认显示的forum.php尾巴:(详细内容请参看如何去掉discuz论坛后面的forum.php尾巴内容)。
四、进行robots.txt文件设置:
discuz论坛的seo兼容模式有什么用
能否给我个截图让我看看?discuz论坛 我很久都不用了 有点忘记了。给我个截图我可能会想起来。 其实这句话的意思是,这个seo模式对网站的收录有一定的帮助,就是设置网站seo优化的功能。下面是我引用的答案 仅供参考
Discuz 论坛SEO优化涉及到4处:
1、全局--站点信息--站点名称、网站名称和网站 URL;
2、全局--站点功能--管理相关--开启论坛 Archiver 功能和禁止用户访问 Archiver;
3、全局--SEO设置--门户、论坛、家园、群组和其他;
4、运营--关联链接--SEO兼容模式。
Discuz 门户SEO设置,
登录后台管理——全局——SEO设置——门户
门户首页设置,填写 title keyword discription栏
文章列表 点击展开详细设置 后填写title keyword discription信息,
文章内容 填写title keyword discription信息
dz论坛如何设置符合seo优化
1)设置伪静态,根据不同的服务器系统来设置不同的伪静态
2)帖子里可以设置相关帖子,促进推荐
3)帖子里设置keysword
4)原创和互动对seo有很大帮助
这个论坛怎么优化啊??高分!
DZ论坛优化方法
初级优化:
第一步,修改论坛风格的temlpates/风格/hearder.htm(这里是指你所用的风格的,如果你有20个风格,最好改20次)
找到:
title$navtitle $bbname $seotitle - Powered by Discuz!/title
替换成:
title$navtitle $bbname $seotitle/title
找到:
meta name="keywords" content="Discuz!,Board,Comsenz,forums,bulletin board,$seokeywords"
meta name="description" content="$bbname $seodescription - Discuz! Board"
修改为:
meta name="keywords" content="$navtitle,$seokeywords"
meta name="description" content=" $navtitle $bbname $seodescription"
第二步,修改完善 archiver
archiver在论坛中,就是像外交大臣一样的地位,可以使你的论坛更容易被搜索到。打开archiver/include/header.inc.php
查找:
title ?=$_DCACHE['settings']['seotitle']? ?=$navtitle? ?=$_DCACHE['settings']['bbname']? - powered by Discuz! Archiver/title
替换成:
title ?=$_DCACHE['settings']['seotitle']? ?=$navtitle? ?=$_DCACHE['settings']['bbname']? - Archiver/title
找到:
meta name="keywords" content="Discuz!,Board,Comsenz,forums,bulletin board,?=$_DCACHE['settings']['seokeywords']?"
meta name="description" content="?=$_DCACHE['settings']['bbname']? ?=$_DCACHE['settings']['seodescription']? - Discuz! Archiver"
修改为:
meta name="keywords" content="?=$navtitle?,?=$_DCACHE['settings']['seokeywords']?"
meta name="description" content="?=$_DCACHE['settings']['bbname']? ?=$_DCACHE['settings']['seodescription']?"
把关键字无限放大
修改 forum.inc.php,index.inc.php,thread.inc.php
在这些文件的最后加入
br
font color=?=MAINTABLECOLOR??=$_DCACHE['settings']['seokeywords']?/font
第三步,论坛信息分类优化
打开viewthread.php
查找:
$navigation = "» a href=\"forumdisplay.php?fid=$fid".($extra ? ''.preg_replace("/^()*/", '', $extra) : '')."\"$forum[name]/a » $thread[subject]";
$navtitle = $thread['subject'].' - '.strip_tags($forum['name']);
if($forum['type'] == 'sub') {
$query = $db-query("SELECT fid, name FROM {$tablepre}forums WHERE fid='$forum[fup]'");
$fup = $db-fetch_array($query);
$navigation = "» a href=\"forumdisplay.php?fid=$fup[fid]\"$fup[name]/a $navigation";
$navtitle = $navtitle.' - '.strip_tags($fup['name']);
}
$navtitle .= ' - ';
替换成:
if($lastvisit $thread['lastpost'] (!isset($_DCOOKIE['fid'.$fid]) || $thread['lastpost'] $_DCOOKIE['fid'.$fid])) {
dsetcookie('fid'.$fid, $thread['lastpost'], 3600);
}
$navigation = "» a href=\"forumdisplay.php?fid=$fid".($extra ? ''.preg_replace("/^()*/", '', $extra) : '')."\"$forum[name]/a » $thread[subject]";
if($thread['typeid'] isset($forum['threadtypes']['types'][$thread['typeid']])) {
$navtitle = '('.$forum['threadtypes']['types'][$thread['typeid']].')'.$thread['subject'].' - '.strip_tags($forum['name']);
}else{
$navtitle = $thread['subject'].' - '.strip_tags($forum['name']);
}
if($forum['type'] == 'sub') {
$query = $db-query("SELECT fid, name FROM {$tablepre}forums WHERE fid='$forum[fup]'");
$fup = $db-fetch_array($query);
$navigation = "» a href=\"forumdisplay.php?fid=$fup[fid]\"$fup[name]/a $navigation";
$navtitle = $navtitle.' - '.strip_tags($fup['name']);
}
$navtitle .= ' - ';
第四步,用googleSitemap 和 雅虎url工具优化论坛,完成!
在misc.php中找到
$threadurl = "{$boardurl}viewthread.php?tid=$tid";
改为
$threadurl = "{$boardurl}viewthread.php?tid=$tidfromuid=$discuz_uid";
在推荐朋友功能中增加推荐人的标记。这样的推荐能给推荐人带来金币收入。
高级优化。前提:1.discuz! 5.0/5.5 已启用伪静态功能,只启用普通页面静态化就可以了;2.不要启用 Archiver功能;3.后台的keywords和description设置只是针对首页的(如果您没做列表页和内容页的meta修改则也应用到它们);4.后台首页文件名为/(当然您也可以设置自己特定的),然后开始优化:
一、meta的优化
discuz的后台可以对meta信息进行设置,甚至可以添加自己的头部信息,但它的设置都是针对于所有页面的,全部页面都拥有相同的keywords和description是SEO所不赞成的。
方案一:删除meta
修改页头模板文件 templates/default/header.htm:将meta的keywords和description标签删除。
这两个标签作用很小了,而且还有discuz自带的一些无用信息,用得不好反而会有坏作用,因此宁缺勿滥。
方案二:定制meta
本部分实现了将内容页keywords设为帖子标题,description为内容前100字;也实现了主页与各版列表页meta的单独设置(不同版的不同,同一版各列表页相同)。
1.修改页头模板文件 templates\default\header.htm:将meta的keywords和description标签改为如下形式
meta name="keywords" content="{$metakeywords}$seokeywords" /
meta name="description" content="$seodescription" /
这里的$seokeywords、$seodescription就是后台设置的那个值,下面说怎么定制这个值;{$metakeywords}是奇虎的关键字,留下以后处理
2.内容页(viewthread)设置keywords为帖子标题,description为内容前100字
2.1修改 viewthread.php 文件:
在 include template('viewthread'); (更新:dz5.5为iinclude template($iscircle ? 'supesite_viewthread' : 'viewthread'); ) 语句的上面加入一行:
require_once DISCUZ_ROOT.'./include/bmt.thread.inc.php';
2.2创建 include/bmt.thread.inc.php 文件,内容为
?php
if(!defined('IN_DISCUZ')) { exit('Access Denied'); }
$seokeywords = strip_tags($thread['subject']); //关键字设为帖子的标题
//(已更新: nethome 提出问题,当启用主题分类并允许按类别浏览时,原来代码会有问题。所以加了标签过滤,本来在viewthread.php中改更好,为以后升级方便,还是放在这里吧,subject很短,不会影响效率)
$seodescription = current( $postlist );//description取文章内容的前100字
$seodescription = mb_substr( $seodescription['message'],0,100,"gb2312" );
$seodescription = htmlspecialchars( strip_tags($seodescription) );
?
*此处数字和个别函数适用于GBK版本
关于dz论坛seo优化和seo专业优化平台的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。
本文由admin于2022-12-19发表在靑年PHP官网,如有疑问,请联系我们。
本文链接:https://www.qnphp.com/post/34605.html