最近研究destoon内核开发,发现destoon6.0的搜索页面模块的标题太长,是搜索标题+模块+首页标题,这样导致标题过长,百度不喜欢,所以我经过修改成百度所喜欢的。

修改前截图:

修改的文件:/include/seo.inc.php  文件

在第90行左右,把$seo_title  修改为:$seo_sitename  这样就精简了

完整代码:

<?php

defined('IN_DESTOON') or exit('Access Denied');
$seo_modulename = $MOD['name'];
$seo_sitename = $city_sitename ? $city_sitename : $DT['sitename'];
$seo_sitetitle = $DT['seo_title'];
$seo_sitekeywords = $DT['seo_keywords'];
$seo_sitedescription = $DT['seo_description'];
$seo_delimiter = $DT['seo_delimiter'];
$seo_page = $page > 1 ? lang($L['seo_page'], array($page)).$seo_delimiter : '';
$seo_catname = $seo_cattitle = $seo_parentname = $seo_catkeywords = $seo_catdescription = '';
if($catid) {
if($CAT['parentid']) {
$seo_catname = '';
$tmp = strip_tags(cat_pos($CAT, 'DESTOON'));
$tmp = explode('DESTOON', $tmp);
$tmp = array_reverse($tmp);
foreach($tmp as $k=>$v) {
$seo_catname .= $v.$seo_delimiter;
}
} else {
$seo_catname = $CAT['catname'].$seo_delimiter;
}
$seo_cattitle = $CAT['seo_title'] ? $CAT['seo_title'].$seo_delimiter : $seo_catname;
$seo_catkeywords = $CAT['seo_keywords'] ? $CAT['seo_keywords'] : '';
$seo_catdescription = $CAT['seo_description'] ? $CAT['seo_description'] : '';
}
$seo_areaname = (isset($areaid) && $areaid) ? area_pos($areaid, $seo_delimiter).$seo_delimiter : '';
$seo_showtitle = isset($title) ? $title : '';
$seo_showintroduce = isset($introduce) ? $introduce : '';
switch($seo_file) {
case 'index':
if($MOD['title_index']) {
eval("\$seo_title = \"$MOD[title_index]\";");
} else {
$seo_title = $seo_modulename.$seo_delimiter.$seo_sitename;
}
if($MOD['keywords_index']) eval("\$head_keywords = \"$MOD[keywords_index]\";");
if($MOD['description_index']) eval("\$head_description = \"$MOD[description_index]\";");
break;
case 'list':
if($CAT['seo_title']) {
$seo_title = $CAT['seo_title'];
} else if($MOD['title_list']) {
eval("\$seo_title = \"$MOD[title_list]\";");
} else {
$seo_title = $seo_cattitle.$seo_page.$seo_modulename.$seo_delimiter.$seo_sitename;
}
$_seo_catname = $seo_catname;
$_seo_areaname = $seo_areaname;
if($CAT['seo_keywords']) {
$head_keywords = $CAT['seo_keywords'];
} else if($MOD['keywords_list']) {
if($_seo_catname) $seo_catname = str_replace($seo_delimiter, ',', $_seo_catname);
if($_seo_areaname) $seo_areaname = str_replace($seo_delimiter, ',', $_seo_areaname);
eval("\$head_keywords = \"$MOD[keywords_list]\";");
}
if($CAT['seo_description']) {
$head_description = $CAT['seo_description'];
} else if($MOD['description_list']) {
if($_seo_catname) $seo_catname = str_replace($seo_delimiter, ' ', $_seo_catname);
if($_seo_areaname) $seo_areaname = str_replace($seo_delimiter, ' ', $_seo_areaname);
eval("\$head_description = \"$MOD[description_list]\";");
}
break;
case 'show':
if($MOD['title_show']) {
eval("\$seo_title = \"$MOD[title_show]\";");
} else {
$seo_title = $seo_showtitle.$seo_delimiter.$seo_catname.$seo_modulename.$seo_delimiter.$seo_sitename;
}
$_seo_catname = $seo_catname;
$_seo_areaname = $seo_areaname;
if($MOD['keywords_show']) {
if($_seo_catname) $seo_catname = str_replace($seo_delimiter, ',', $_seo_catname);
if($_seo_areaname) $seo_areaname = str_replace($seo_delimiter, ',', $_seo_areaname);
eval("\$head_keywords = \"$MOD[keywords_show]\";");
} else {
$head_keywords = $keyword;
}
if($MOD['description_show']) {
if($_seo_catname) $seo_catname = str_replace($seo_delimiter, ' ', $_seo_catname);
if($_seo_areaname) $seo_areaname = str_replace($seo_delimiter, ' ', $_seo_areaname);
eval("\$head_description = \"$MOD[description_show]\";");
} else {
$head_description = $introduce ? $introduce : $title;
}
break;
case 'search':
$seo_title = $seo_modulename.$L['search'].$seo_delimiter.$seo_page.$seo_sitename ;
if($catid) $seo_title = $seo_catname.$seo_title;
if($areaid) $seo_title = $seo_areaname.$seo_title;
if($kw) $seo_title = $kw.$seo_delimiter.$seo_title;
break;
default:
break;
}
?>

  这样就是我修改好的:http://zhimo.yuanzhumuban.cc/sell/search-htm-kw-黑龙江圆柱模板.html

destoon修改搜索页面标题方法的更多相关文章

  1. HTML-获取/修改html页面标题

    作为一个标准的HTML文档,网页标题(title)是必不可少的属性.随着浏览器的发展,我们又多了一种访问和修改文档的方式:DOM.所以我们获取网页标题的方式大致可分为以下两种: 通过document对 ...

  2. django学习-26.admin管理后台里:修改登录页面标题,修改登录框标题,修改首页标题

    目录结构 1.前言 2.完整的操作步骤 2.1.第一步:查看[site.py]的源码 2.2.第二步:在应用[hello]所在目录里的[admin.py]里重写三个属性的属性值 2.3.第三步:重启服 ...

  3. destoon公司搜索页面显示公司类型

    首先找到前台模板文件:/template/default/company/search.htm 看到51行 {template 'list-company', 'tag'} 打开 /template/ ...

  4. 修改jQuery.validate验证方法和提示信息

    1.添加验证方法 在jquery.validate.js文件中直接添加验证方法,例如: jQuery.validator.addMethod("Specialstring", fu ...

  5. 一个简单的修改 iis默认页面的方法..

    1. IIS 默认打开的是欢迎页面 2. 然后找到了一个比较简单的修改默认界面的方法: 找到这个文件的默认路径 C:\inetpub\wwwroot 然后修改 iisstart.htm 文件 在hea ...

  6. 微信小程序动态修改页面标题setNavigationBarTitle

    微信小程序是可以动态修改页面标题的. 首先我们来看看静态是怎么实现的 在对应页面的json文件里面加入下面代码就可以实现了 { "navigationBarTitleText": ...

  7. 小程序动态修改页面标题setNavigationBarTitle

    可以使用setNavigationBarTitle方法动态设置页面标题 wx.setNavigationBarTitle({ title: options.name, })

  8. vue.js 使用 vue-router 修改页面标题

    module.exports = { name: 'myComponent', data: {} route{ data: function(){ document.title = "页面标 ...

  9. SEO页面标题Title的优化

    我在一个月前改过页面标题(Title),随后表现是:百度网页快照4天不更新,Google正常.而我仅仅是改了两个词组而已.在建博初期,修改Title的最频繁的时期,下面卢松松就我经历的修改Title过 ...

随机推荐

  1. Influx Sql系列教程二:retention policy 保存策略

    retention policy这个东西相比较于传统的关系型数据库(比如mysql)而言,是一个比较新的东西,在将表之前,有必要来看一下保存策略有什么用,以及可以怎么用 I. 基本操作 1. 创建re ...

  2. spring中最重要的一些Aware接口

    附上关于这节的spring官方文档: ApplicationContextAware and BeanNameAware aware接口在spring中无处不在,它是用来感知spring的ioc co ...

  3. A+B for Polynomials

    This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each ...

  4. [C语言] 关于计算多边形面积的一点问题

    [一道练习题] 面基 时间限制:1000ms   内存限制:65536kb 通过率:107/134 (79.85%)    正确率:107/319 (33.54%) 题目描述 按顺时针或逆时针顺序输入 ...

  5. QT QML与C++混搭

    "那些杀不死我的必使我更加强大"----尼采 QML与C++混合编程就是使用QML高效便捷地构建UI,而C++则用来实现业务逻辑和复杂算法. ML访问C++Qt集成了QML引擎和Q ...

  6. MinGW ,GNU 是什么

    MinGW : Minimalist GNU for Windows MinGW(Minimalist GNU For Windows)是个精简的Windows平台下的 C/C++.ADA及Fortr ...

  7. redis示例

    1. 引入redis相关包 <!-- redis 相关包--> <dependency> <groupId>org.springframework.data< ...

  8. jQuery实现简单导航栏的样式切换

    style css样式部分: ul{ margin: 0 auto; height: 50px; background-color: #369;} ul>li{ text-decoration: ...

  9. pandas中的axis参数(看其他人的博客中产生的疑问点,用自己的话解析出来)

    axis有两个值:axis=0或者axis=1 看到很多资料都不太理解,把我个人理解说一下: 下面这张图,在很多资料中都看到了,我只能说先死记住 axis=0,代表跨行(注意看这张图的axis=0的箭 ...

  10. Springboot token令牌验证解决方案 在SpringBoot实现基于Token的用户身份验证

    1.首先了解一下Token 1.token也称作令牌,由uid+time+sign[+固定参数]组成: uid: 用户唯一身份标识 time: 当前时间的时间戳 sign: 签名, 使用 hash/e ...