海洋CMS后台自定义采集增加别名采集

编辑 /include/collection.class.php 文件,找到:

$v_data['v_name']=getAreaValue($loopstr,"name",$html,$listconf["removecode"]);
$v_data['v_name']=$this->filterWord($v_data['v_name'],0);
$v_data['v_enname']=Pinyin($v_data['v_name']);
$v_data['v_name'] =  htmlspecialchars($v_data['v_name']);
$v_data['v_name'] = str_replace(array('\\','()','\''),'/',$v_data['v_name']);

在下方插入:

$v_data['v_nickname']=getAreaValue($loopstr,"nickname",$html,$listconf["removecode"]);
$v_data['v_nickname'] =  htmlspecialchars($v_data['v_nickname']);

编辑 /include/collection.func.php 文件,找到:

getTestAreaValue($loopstr,"name","影片名称",$html,$removecode);

在下方插入:

getTestAreaValue($loopstr,"nickname","影片别名",$html,$removecode);

编辑 /admin/templets/admin_collect_ruleadd3.htm 文件,找到:

<tbody id="namebody">
          <input type='checkbox' name='item[]' checked='1'  value='name' style='display:none' />
          <tr>
            <td class="label">影片名称开始代码:</td>
            <td><textarea name="namea" rows="4" cols="80" wrap="off"></textarea></td>
          </tr>
          <tr>
            <td class="label">影片名称结束代码:</td>
            <td><textarea name="nameb" rows="4" cols="80" wrap="off"></textarea></td>
          </tr>
          <tr>
            <td class="label">影片名称替换规则:</td>
            <td><textarea name="name_trim" id="name_trim" rows="3" cols="50" wrap="off"></textarea>
              <input type="button" class="rb1" name="button" id="button" value="常用规则" onclick="SelTrim('name_trim')" /></td>
          </tr>
      </tbody>

在下方插入:

<tbody id="nicknamebody">
          <input type='hidden' name='item[]' checked  value='nickname'/>
          <tr>
            <td class="label">别名开始代码:</td>
            <td><textarea name="nicknamea" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($itemloopstr,"nicknamea");?></textarea></td>
          </tr>
          <tr>
            <td class="label">别名结束代码:</td>
            <td><textarea name="nicknameb" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($itemloopstr,"nicknameb");?></textarea></td>
          </tr>
          <tr>
            <td class="label">别名替换规则:</td>
            <td><textarea name="nickname_trim" id="name_trim" rows="3" cols="50" wrap="off"><?php echo getrulevalueh($itemloopstr,"nickname_trim");?></textarea>
              <input type="button" class="rb1" name="button" id="button" value="常用规则" onclick="SelTrim('nickname_trim')" /></td>
          </tr>
      </tbody>

编辑 /admin/templets/admin_collect_ruleedit3.htm 文件,找到:

<tbody id="namebody">
          <input type='hidden' name='item[]' checked  value='name'/>
          <tr>
            <td class="label">名称开始代码:</td>
            <td><textarea name="namea" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($itemloopstr,"namea");?></textarea></td>
          </tr>
          <tr>
            <td class="label">名称结束代码:</td>
            <td><textarea name="nameb" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($itemloopstr,"nameb");?></textarea></td>
          </tr>
          <tr>
            <td class="label">名称替换规则:</td>
            <td><textarea name="name_trim" id="name_trim" rows="3" cols="50" wrap="off"><?php echo getrulevalueh($itemloopstr,"name_trim");?></textarea>
              <input type="button" class="rb1" name="button" id="button" value="常用规则" onclick="SelTrim('name_trim')" /></td>
          </tr>
      </tbody>

在下方插入:

<tbody id="nicknamebody">
          <input type='hidden' name='item[]' checked  value='nickname'/>
          <tr>
            <td class="label">别名开始代码:</td>
            <td><textarea name="nicknamea" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($itemloopstr,"nicknamea");?></textarea></td>
          </tr>
          <tr>
            <td class="label">别名结束代码:</td>
            <td><textarea name="nicknameb" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($itemloopstr,"nicknameb");?></textarea></td>
          </tr>
          <tr>
            <td class="label">别名替换规则:</td>
            <td><textarea name="nickname_trim" id="name_trim" rows="3" cols="50" wrap="off"><?php echo getrulevalueh($itemloopstr,"nickname_trim");?></textarea>
              <input type="button" class="rb1" name="button" id="button" value="常用规则" onclick="SelTrim('nickname_trim')" /></td>
          </tr>
      </tbody>

给TA买糖
共{{data.count}}人
人已赞赏
教程

海洋cms自定义采集增加图片判断以决定新增或更新原数据

2021-9-9 13:08:36

教程

海洋cms后台自定义采集增加豆瓣评分采集教程

2021-9-9 13:10:27

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索