加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

帝国ecms文章图片自动添加下一页链接

发布时间:2021-01-27 16:01:40 所属栏目:教程 来源:网络整理
导读:在e/class/function.php相应位置添加ClickPicNext函数 //替换禁用字符 function ReplaceWord($newstext){ global $empire,$dbtbpre; if(empty($newstext)) {return $newstext;} $sql=$empire-query("select newword,oldword from {$dbtbpre}enewswords"); wh

在e/class/function.php相应位置添加ClickPicNext函数//替换禁用字符
function ReplaceWord($newstext){
global $empire,$dbtbpre;
if(empty($newstext))
{return $newstext;}
$sql=$empire->query("select newword,oldword from {$dbtbpre}enewswords");
while($r=$empire->fetch($sql))
{
$newstext=str_replace($r[oldword],$r[newword],$newstext);
}
return $newstext;
}

后边添加
//把图片替换成链接
//----------------------------
function ClickPicNext($newstext){
// global $empire,$dbtbpre;
if(empty($newstext))
{return $newstext;}
$newstext=preg_replace('//i',"
$0",$newstext);
return $newstext;
}

然后,在大约1962行,即在以下代码后:
if($public_r['opencopytext'])
{
$add[newstext]=AddNotCopyRndStr($add[newstext]);//随机复制字符
}

添加一行$add[newstext]=ClickPicNext($add[newstext]);
这样,点击文章中的图片,就可以链接至下一页了。

(编辑:核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读