top-image

OLDER ARTICLES

原因:外部调用拼音函数时,转换表目录不能正确识别。

解决方法

  1. 修改文件:/e/class/doiconv.php
    • 找到以下代码:
       
       
      $this->config['codetable_dir'] = $dir . "../data/codetable/";
    • 替换为:
       
       
      $this->config['codetable_dir'] = ECMS_PATH . 'e/data/codetable/';

 

  1. 在内容页修改 {dede:field.body}

    {dede:field.body runphp=yes}
    global $cfg_basehost;
    $str = @me;
    $search = '/(]+>)/is';
    $search1 = '/(]+>)/is';
    $search2 = '#()#i';
    $search3 = '#()#i';
    $content = preg_replace($search, '$1$3', $str);
    $content = preg_replace($search1, '$1$3', $content);
    $content = preg_replace($search2, '$1$2', $content);
    $content = preg_replace($search3, '$1$2', $content);
    @me = $content;
    //@me = str_replace('/uploads/allimg/', $cfg_basehost . '/uploads/allimg/', $content); // 手机版图片使用绝对路径
    {/dede:field.body}
  2. 在保存时进行处理

    • 修改 /dede/article_add.php 和 /dede/article_edit.php 文件:
      $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext');
      // 去除img中的style属性
      $body = preg_replace("/style=\.[^'\"<>]*['\"]/i", "", $body);
      // 去除img中的width,height属性
      $exp = array("/height=.{0,5}\s/i", "/width=.{0,5}\s/i");
      $exp_o = array("", "");
      $body = preg_replace($exp, $exp_o, $body);

       

  • HTML代码
<div class="gotop">
    <ul>
        <li><a id="goTopBtn" href="#"><i class="icon iconfont">&#xe60b;</i><em>返回顶部</em></a></li>
        <li><a href="#"><i class="icon iconfont">&#xe605;</i><em>上一文章</em></a></li>
        <li><a href="#"><i class="icon iconfont">&#xe622;</i><em>下一文章</em></a></li>
        <li><a target="_blank" href="#"><i class="icon iconfont">&#xe600;</i><em>官方客服</em></a></li>
        <li><a href="#" class="user" target="_blank"><i class="icon iconfont">&#xe60e;</i><em>个人中心</em></a></li>
    </ul>
</div>
  • CSS代码
.gotop {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: 600px;
    margin-top: -125px;
}
.gotop li a {
    display: block;
    width: 30px;
    height: 30px;
    border-bottom: 1px solid #000;
    background-color: #333;
    color: #fff;
    line-height: 15px;
    padding: 10px;
    text-align: center;
}
.gotop li a.user {
    border: 0;
}
.gotop li a i {
    line-height: 30px;
    font-size: 20px;
}
.gotop li a em {
    display: none;
}
.gotop li a:hover {
    background-color: #3398cc;
    color: #fff;
}
.gotop li a:hover i {
    display: none;
}
.gotop li a:hover em {
    display: block;
    font-style: normal;
}

 

  1. 设置随机点击数
    • 进入后台:系统 – 系统设置 – 系统参数设置 – 信息设置。
    • 设置“增加信息随机点击数范围”,格式为“最小数,最大数”,例如“20,100”。
  1. 过滤图片样式代码
    • 使用以下代码:
      <?php
      $newstext = DoWapRepNewstext($r[newstext]);
      $newstext = preg_replace('/style=.+?[\\'|\\"]/', '', $newstext);
      echo $newstext;
      ?>

       

  1. 全站tag调用

    {pboot:tags}
    <a href="[tags:link]">[tags:text]</a>
    {/pboot:tags}
  2. 内容页

    {pboot:tags id={content:id}}
    <a href="[tags:link]">[tags:text]</a>
    {/pboot:tags}
  3. tags.html调用列表

    {pboot:list num=10 scode=* page=1}
  4. 当前tag名称

    {$get.tag}
  1. 操作步骤:
    • 依次打开根目录/core/template/error.html
    • 修改error.html文件,例如,一秒后跳转百度。
    • 示例代码:
      <!doctype html>
      <html>
      <head>
          <meta charset="utf-8">
          <title>错误信息</title>
          <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
          <meta name="Apple-mobile-web-app-capable" content="yes"/>
      </head>
      <body>
          <div style="margin-left:10%;margin-top:5%;">
              <div style="margin-bottom:20px;">
                  <img src="{coredir}/template/face02.png" height="120">
              </div>
              <div style="font-size:20px;margin-bottom:20px;">{info}<span id="time" style="font-size:18px;"></span></div>
              <div style="margin-bottom:1rem;">
                  <p>页面将在1秒后自动跳转到另一个页面...</p>
                  <script>
                      setTimeout(function(){
                          window.location.href='http://www.baidu.com/'; // 替换为你想要跳转的URL
                      }, 1000); // 1000毫秒后执行
                  </script>
              </div>
              <div>
                  <span style="font-size:12px;border-top:1px solid #ccc;color:#ccc;padding-top:2px;">程序版本:{appversion}</span>
              </div>
          </div>
          {js}
      </body>
      </html>

       

PbootCMS 修改邮件提醒标题

  • 文件修改
    • 文件1apps/admin/controller/system/ConfigController.php,大约在31行。
    • 文件2apps/api/controller/CmsController.php,两处。
    • 文件3apps/home/controller/CommentController.php,大约在94行。
    • 文件4apps/home/controller/FormController.php,大约在92行。
    • 文件5apps/home/controller/MemberController.php,大约在439行。
    • 文件6apps/home/controller/MessageController.php,大约在99行。
    • 修改内容:删除 【PbootCMS】 或按需优化标题文字。

PbootCMS后台出现“登录失败:登录失败次数太多已被锁定,请600s重试!”情况,怎么办?
解决方法:
删除网站根目录的 runtime 文件夹,然后刷新页面重试。

  1. 常用标签
    • {content:id}:文章编号
    • {content:scode}:栏目编码
    • {content:subscode}:副栏目编码
    • {content:sortname}:栏目名称
    • {content:subsortname}:副栏目名称
    • {content:sortlink}:栏目链接
    • {content:subsortlink}:副栏目链接
    • {content:title}:文章标题
    • {content:titlecolor}:文章标题颜色
    • {content:subtitle}:文章副标题
    • {content:author}:文章作者
    • {content:source}:文章来源
    • {content:link}:文章链接
    • {content:outlink}:外部链接
    • {content:date}:文章发布日期
    • {content:ico}:缩略图
    • {content:pics}:多图
    • {content:content}:文章内容
    • {content:tags}:标签
    • {content:enclosure}:附件
    • {content:enclosuresize}:附件大小
    • {content:keywords}:关键词
    • {content:description}:描述
    • {content:istop}:是否置顶
    • {content:isrecommend}:是否推荐
    • {content:isheadline}:是否头条
    • {content:visits}:访问数量
    • {content:likes}:点赞数量
    • {content:oppose}:反对数量
    • {content:likeslink}:点赞链接
    • {content:opposelink}:反对链接
    • {content:ext_***}:扩展字段内容
    • {content:precontent}:上一篇内容
    • {content:nextcontent}:下一篇内容
    • {content:prelink}:上一篇内容链接
    • {content:nextlink}:下一篇内容链接
    • {content:pretitle}:上一篇内容标题
    • {content:nexttitle}:下一篇内容标题
    • {content:nexttitle notext='no more'}:设置“没有了”文本
    • {content:preico}:上一篇内容缩略图
    • {content:nextico}:下一篇内容缩略图
Page 476 of 1049:« First« 473 474 475 476 477 478 479 »Last »
bottom-img