Support jOOmla! Autoit!
 
针对浏览器的标题进行 SEO 的友好hack 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2006-08-05 | View Count View: 17753 | Digg Count Digg: 64

hack文件: includes/joomla.php

503行段:

 function setPageTitle( $title=null ) {
  if (@$GLOBALS['mosConfig_pagetitles']) {
   $title = trim( htmlspecialchars( $title ) );
   $title = stripslashes($title);
   $this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : 
$GLOBALS['mosConfig_sitename'];
  }
 }

里面的

$this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title :

替换为:

$this->_head['title'] = $title ? $title . " - ". $GLOBALS['mosConfig_sitename'] :

当然上面的 $this一整行也可以直接写为:

$this->_head['title'] = $title . " - ". $GLOBALS['mosConfig_sitename'];

我的joomla.php里改的:

   if ($title == '首页')  {
   $this->_head['title'] =  $GLOBALS['mosConfig_sitename'];
   }else {
   $this->_head['title'] = $title . " - ". $GLOBALS['mosConfig_sitename'];
   }           
  }
 }

其实是一样,只是在首页的时候,首页不显示而已.

 

针对 meta 里的  name="description" 做一下改动!

默认是 "你站点的描述+本页文章的标题" 如果你的描述多的话,这样有点不利!

方法 function appendMetaTag 段里:

 $this->_head['meta'][$i][1] = $content .', '. $this->_head['meta'][$i][1];

改为:

$this->_head['meta'][$i][1] = $this->_head['meta'][$i][1] .', '.$content ;

end by Autoit.


Permanent URL: http://www.autoit.cn/index.php/content/view/68/25.html

Shares: Google书签 Yahoo书签 雅虎收藏夹 365Key网摘 新浪ViVi 百度收藏 天极网摘 diglog 和讯网摘 POCO网摘 YouNote网摘 博拉网 天下图摘 spurl blogmarks BlinkList reddit digg Del.icio.us   |  Tags: SEO  

« First « 1 2 » Last »
 
简单的 "改变" joomla 后台administrator目录   vm模块中显示产品图片的名称放在图下方