PHPCMS问题几记

phpcms采集时提示”没有找到网址列表,请先进行网址采集“的解决方法

修改

phpcms\modules\collection\node.php

第291行

if (empty($v['url']) || empty($v['title'])) continue;

为:

if (empty($v['url'])) continue;

网上看到有人说改了后仍不成功。实际是你提取了网址,在数据库中,它不再重复提取网址,从而造成“这次没有网址提取”。解决的办法是

清除  v9_collection_history 表里的内容。就能重新提取到网址了。


————————————————————————————————————

phpcms采集地址中为相对路径解决方法

1.修改数据库v9_collection_node,增加两个字段replace_from,replace_to(varchar(200))

2./phpcms/modules/collection/templates/node_form.tpl.php第99行后增加

<tr>
<td width="120">网址替换:</td>
<td>
  <input type="text" name="data[replace_from]" style="width:250px" value="<?php if(isset($data['replace_from'])) echo $data['replace_from']?>"/>替换为
  <input type="text" name="data[replace_to]" style="width:250px" value="<?php if(isset($data['replace_to'])) echo $data['replace_to']?>"/>
</td>
</tr>

3./phpcms/modules/collection/classes/collection.class.php第177行后增加

(位置在:$html = str_replace(array("</a>", "</A>"), "</a> ", $html);之后)

if(!empty($config['replace_from'])) $html = str_replace($config['replace_from'], $config['replace_to'], $html);


Αυτό το άρθρο προέρχεται από http://www.chieng.cn, αναπαράγεται διευκρινίστε!
打赏 支付宝打赏 微信打赏

评论

Top