Discuz死链优化,Discuz怎么优化

分类:建站教程 Discuz教程 时间:2025-10-23 09:57 浏览:0 评论:0
0

当前目录列表:

  • 1、求问Discuz如何去掉#lastpost动态链接,实现搜索引擎优化
  • 2、这个论坛怎么优化啊??高分!
  • 3、Discuz论坛的seo兼容模式有什么用
  • 4、网站被恶意篡改,挂马,暗链后怎么处理
  • 5、请教Discuz单帖优化技巧!
  • 6、Discuz3.2怎么修改/forum.php为/xx/
  • 求问Discuz如何去掉#lastpost动态链接,实现搜索引擎优化

    方法是到你正在使用的模板的目录小下找“Discuz.htm”如果没有到默认目录下找templates/default/Discuz.htm用编辑器打开,注意不要用windows自带的记事本搜索“lastpost ”来到此处,约第67行: p{echo cutstr,$forum[lastpost][subject], 30}/p将其中的 “”修改为 再向下搜索来到此处,约第97行:p{lang forum_lastpost}: a href=”redirect.php?tid=$forum[lastpost][tid]goto=lastpost#lastpost” title=”{echo cutstr,$forum[lastpost][subject], 30} {lang forum_lastpost_by} {if $forum['lastpost']['author']}$forum['lastpost']['authorusername']{else}{lang anonymous}{/if} “$forum[lastpost][dateline]同上,将其中的 ""修改为 修改完后,dz论坛首页的最好发表链接就变成类似“thread-***-1-1.html”这样的静态url形式了

    discuz死链优化,discuz怎么优化

    这个论坛怎么优化啊??高分!

    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版本

    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信息

    网站被恶意篡改,挂马,暗链后怎么处理

    “暗链”就是指看不见的网站链接。通常在网站中隐藏自己的链接从而提高网站的PR值,并且“暗链”在网站中的链接做的非常隐蔽,短时间内不易被搜索引擎察觉。而“挂马”是指黑客通过各种手段获得网站***账号,然后登陆网站后台,通过数据库备份/恢复或者上传漏洞获得一个webshell。利用获得的webshell修改网站页面的内容,向页面中加入恶意转向代码。也可以直接通过弱口令获得服务器或者网站FTP,然后直接对网站页面直接进行修改。云锁-网站防护的“暗链挂马防护”功能通过驱动级网页防篡改保护网站下的文件不被修改,即使被获取了管理权限上传了webshell也无法对网站的文件进行暗链、挂马操作。如该站点下需要修改的文件和网站用户使用的目录,则可以将这些文件添加为例外路径。以下为“暗链挂马防护”操作及教程文档:1、开启“暗链挂马防护”功能,添加受保护的路径,如图:将Discuz添加为要保护的站点图1 添加受保护站点 2、开启保护后,被保护的站点是无法上传文件的;为了验证保护效果,我们假设网站已被获取管理权限并被上传了webshell,通过webshell修改网站文件。图2 webshell修改test.php文件 图3 提示修改失败 图4 相应防护日志 3. 站点下需要修改的配置文件和网站用户使用的文件夹,可将其路径添加为例外路径,则不受规则保护,可随时进行修改。图5 添加的例外路径 至此,云锁-网站防护的“暗链挂马防护”功能操作及设置完毕。

    请教Discuz单帖优化技巧!

    单贴优化

    这个确实没太多注意。解决更新的问题,我想到一个办法是,回复里面可能设置,按时间排序,你可以把最新回复的放在第一楼,这样,这个帖子的更新解决了。

    Discuz3.2怎么修改/forum.php为/xx/

    不是高手,但是也知道一点点,这非常复杂但意义不大,且改的越多越容易出错造成死链,我改一部分就停了。

    1. 本站所有资源来源于用户上传或网络,仅作为参考研究使用,如有侵权请邮件联系站长!
    2. 本站积分货币获取途径以及用途的解读,想在本站混的好,请务必认真阅读!
    3. 本站强烈打击盗版/破解等有损他人权益和违法作为,请各位会员支持正版!
    4. 建站教程 > Discuz死链优化,Discuz怎么优化

    用户评论