当文档设置为跳转并添加跳转网址后如何不经过中转页而直接显示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";
- }
- }
保存即可,看看效果图片:
原文出处: