当文档设置为跳转并添加跳转网址后如何不经过中转页而直接显示arcurl底层模板中!
打开include/channelunit.func.php文件,找到下代码:
- if($rank!=0 || $ismake==-1 || $typeid==0 || $money>0)
- {
- //动态文章
- if($cfg_rewrite == 'Y')
- {
- return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';
- }
- else
- {
- return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";
- }
- }
修改为:
- if($rank!=0 || $ismake==-1 || $typeid==0 || $money>0)
- {
- $flag = $dsql->GetOne("select * from dede_archives where id = $aid;");
- $flag = $flag['flag'];
- if(preg_match("/j/",$flag)){
- $addontable = $dsql->GetOne("select art.id,cht.addtable from dede_arctype art left join dede_channeltype cht on art.channeltype = cht.id where art.id = $typeid");
- $addtable = $addontable['addtable'];
- $GoUrl = $dsql->GetOne("select redirecturl from $addtable where aid = $aid");
- $redirecturl = $GoUrl['redirecturl'];
- if($redirecturl != ''){
- return $redirecturl;
- }
- else{
- //动态文章
- if($cfg_rewrite == 'Y'){
- return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';
- }
- else{
- return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";
- }
- }
- }
- //动态文章
- if($cfg_rewrite == 'Y')
- {
- return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';
- }
- else
- {
- return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";
- }
- }
保存即可,看看效果图片:
原文出处:http://jingyan.baidu.com/article/e75057f28ea5a2ebc91a893a.html
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!