SeaCMS后台自定义采集增加别名采集
编辑 /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>
你好,seacms如何增加豆瓣评分采集?
参考文章内容,将 nickname 替换为 douban 即可