各位大佬能不能帮忙研究一下,tt积分插件判断当前帖子已付费未付费要怎么写呢?@管理
7232708273 2022-7-20

 

 //原判断是用 strpos ’匹配 ‘如果没有这个字符就输出内容,但是已购买帖子的人前端还是显示要付费,所以看能不能改成 判断当前用户有没有付费,不知道这么写能不能帮忙研究一下

//原判断是用 strpos ’匹配 ‘如果没有这个字符就输出内容,但是已购买帖子的人前端还是显示要付费,所以看能不能改成 判断当前用户有没有付费,不知道这么写能不能帮忙研究一下
<?php if(strpos($post['message'],'')==false) { ?> 

<?php }else{echo '<div class="alert alert-warning"style="color: #ff6f06;background-color: rgba(255, 111, 6, 0.1);" role="alert"><i class="fa fa-coins" aria-hidden="true"></i> 该帖含付费内容,请进入详情查看!</div>';} ?>

最新回复 (3)
全部楼主
  • Tillreetree 版主
    2022-7-21 2
    1
    参考插件里的“付费内容显示”块的判定条件
  • 430135421
    2022-9-13 3
    0
    哈哈,不错哦!
  • weige
    22天前 4
    0
    顶顶顶顶顶顶顶!!!
返回