怎样设置织梦DedeCMS跳转网址不显示中转页
当文档设置为跳转并添加跳转网址后如何不经过中转页而直接显示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";
}
}
本文地址:https://www.17mb.com/study/dedecms/109.html
附件下载
猜你喜欢
文章评论