7月 8

删除织梦CMS中跳转页面的过渡页 多云

yaiba , 17:31 , 技术运用 , 评论(0) , 引用(0) , 阅读(247) , Via 本站原创
点击在新窗口中浏览此图片

今天上头和我说,首页友情链接的跳转页面能不能去掉,不然太不雅观了,
要能直接跳转过去的那种效果,不要中间出现过渡页面,,

想想就很费劲,织梦DedeCMS这东西把大部分功能都封装到函数内部,修改起来会很繁琐,
还是去网上找找,应该会有很多人想去掉这个讨厌的过渡页。。

Google+思考=得出结论:
这东西可以跳过生成跳转页面而在生成友情链接的时候直接将URL写在页面中,
通俗点说,原始的效果是,当你点击类似“中国中央电视台”的时候,
系统会打开诸如http://www.yaiba.net/html/links/20080708125.html的页面,
然后由这个页面跳转到http://www.cctv.com,,
而我们想达到的效果是当点击“中国中央电视台”的时候,直接打开http://www.cctv.com页面,,

所以,我们只要在友情链接页面生成名称的时候不要生成新闻地址,而是直接写入跳转地址,
所以,我们可以判断一条新闻是否有“跳转URL”,当其存在的时候直接将“跳转URL”的地址作为其新闻地址。

那现在我们来实际操作。
我们需要修改的文件是
include/inc_arclist_view.php将
$row['arcurl'] = $this->GetArcUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money']);

替换为
if($row['redirecturl'] != ""){$row['arcurl'] = $row['redirecturl'];}else{
            $row['arcurl'] = $this->GetArcUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money']);}

include/inc_separate_functions.php将
$row['arcurl'] = GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],true,$row['siteurl'])

替换为
if($row['redirecturl'] !=""){$row['arcurl'] = $row['redirecturl'];}else{
          $row['arcurl'] = GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],true,$row['siteurl'])};

并在这句前面的query select 中添加
arc.redirecturl,


include/inc/inc_fun_SpGetArcList.php将
$row['arcurl'] = GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],true,$row['siteurl']);

替换为
if($row['redirecturl'] != ""){$row['arcurl'] = $row['redirecturl'];}else
        {$row['arcurl'] = GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],true,$row['siteurl']);}

并在这句前面的query select 中添加
arc.redirecturl,


都改好了之后,上传到服务器,然后重新生成一下就可以了!
Tags: ,
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]