教程演示
教程简介
Emlog非装置插件来完成隐蔽内容登录检察 此次教程 加代码 加代码 加代码 什么是登录检察隐蔽内容?必需你在本站注册并登录上 才可检察文章隐蔽内容 没登录 代表的就是旅客 没法检察隐蔽内容的 带有约请码的注册 可以用这个来赚点红牛钱啥的 不空话了
第一步
module.php中心文件增加以下代码//登录检察隐蔽内容 function slyc($content){ if(preg_match_all('/<yc\>([\s\S]*?)<\/yc\>/i', $content, $hide_words)){ if(ISLOGIN ){ $content = str_replace($hide_words[0], $hide_words[1], $content); }else{ $hide_notice = '<div style="text-align:center;border:1px dashed #19b5fe;padding:8px;margin:10px auto;color:#2196f3;">您必需先<a href="'.BLOG_URL.'admin">登录</a>才检察隐蔽内容</div>'; $content = str_replace($hide_words[0], $hide_notice, $content); } } return $content; }
第二步
echo_log.php文件中找到代码:
<?php echo $log_content; ?>
替换为
<?php echo slyc($log_content); ?>
怎样隐蔽
编辑文章的时刻 切换到HTML形式 在要隐蔽的处所放上隐蔽代码
<yc> 此处是要隐蔽的内容 </yc>

评论列表