存档

2009年11月 的存档

Supesite7.5资讯中Tag变为内链接的修改方法

2009年11月28日

http://www.discuz.net/thread-1495634-1-1.html

打开:function目录下的common.func.php文件:查找:

  1. return ‘<a href=”javascript:;” onClick=”javascript:tagshow(event, \”.$name.’\');” target=”_self”><u><strong>’.$thename.’</strong></u></a>’.$thetext;

复制代码

改成:

  1. return ‘<a href=”/?action-tag-tagname-’.$name.’”>’.$thename.’</a>’.$thetext;

复制代码

注意开启TAG SHOW才能看到效果哦. 

修改方法很简单也很实用,据说对搜索引擎也更友好了

cjk3d 网站程序

Supesite7.5伪静态下首页修改为index.html

2009年11月17日

默认的supesite7.5伪静态后首页链接仍然为index.php

不利于搜索引擎

修改原文地址参见:http://www.discuz.net/viewthread.php?tid=1445808

打开common.func.php文件,找到函数 ob_out ,在函数中找到下面一段代码(272行):

  1. if($_SCONFIG['urltype'] != 4 && $_SCONFIG['urltype'] != 5) {
  2.         $preg_searchs[] = “/href\=\”(\S*?)\/(index\.php)?\?uid\-([0-9]+)\-?(\S*?)\”/i”;
  3.         $preg_replaces[] = ‘href=”\\1/?\\3/\\4″‘;
  4.         $preg_searchs[] = “/href\=\”\S*?\/(index\.php)?\?(\S+?)\”/ie”;
  5.         $preg_replaces[] = “url_replace(’\\2′)”;
  6. }

替换如下代码:

  • if($_SCONFIG['urltype'] != 4 && $_SCONFIG['urltype'] != 5) {
  •         $preg_searchs[] = “/href\=\”(\S*?)\/(index\.php)?\?uid\-([0-9]+)\-?(\S*?)\”/i”;
  •         $preg_replaces[] = ‘href=”\\1/?\\3/\\4″‘;
  •         $preg_searchs[] = “/href\=\”\S*?\/(index\.php)?\?(\S+?)\”/ie”;
  •         $preg_replaces[] = “url_replace(’\\2′)”;
  •         $preg_searchs[] = “/href\=\”(\S*?)\/index\.php\”/i”;
  •         $preg_replaces[] = ‘href=”\\1/index.html”‘;
  • }
  • 修改伪静态规则,在原来的伪静态规则中加一条:

     RewriteRule ^/index.html$ /index.php [L]

    到此大功告成

    参见http://www.cjk3d.net/index.html

    cjk3d 网站程序