此插件需要改动核心文件include/controller/log_controller.php
在大概第86行的位置//comments的上面一层添加以下代码
//处理meta关键字过滤
if (strpos($log_content,'#zeyu#')!==false)
{
$desc_log_content=strip_tags($desc_log_content);
$desc_log_content=preg_replace('/\[\#zeyu\#\](.*?)\[\/\#zeyu\#\]/uis',',以下文章内容被作者标识为需要付费后才能浏览',$log_content);
$site_description = extractHtmlData($desc_log_content, 90);
}
else
{
$site_description = extractHtmlData($log_content, 90);
}
$log_cache_tags = $CACHE->readCache('logtags');
if (!empty($log_cache_tags[$logid])) {
foreach ($log_cache_tags[$logid] as $value) {
$site_key .= ','.$value['tagname'];
}
}
然后把插件上传到插件目录启用,设置好商户那里申请到的信息,在写文章界面即可插入
[#zeyu#]这里替换成需要付费可见的内容[/#zeyu#]
啥也没有,啊哈…
评论(17)