Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑问] ss7的模型没有采集功能,如何实现?

[复制链接]
guokeivy 发表于 2009-9-16 00:11:56 | 显示全部楼层 |阅读模式
那位有研究过没有,能不能详细地诉说一下
包括可能新增加的字段,采集规则里面可能也需要增加很多新的识别字段的办法,然后如何写入数据库!
回复

使用道具 举报

lidq.jingwu 发表于 2009-9-16 09:08:13 | 显示全部楼层
目前没有这个功能。
回复

使用道具 举报

 楼主| guokeivy 发表于 2009-9-16 09:35:45 | 显示全部楼层
目前没有这个功能。
lidq.jingwu 发表于 2009-9-16 09:08

你原来说的在入库的地方去修改,但是我找了半天也没发现在那里入的库

在admin_robotmessages.php里面好象有入库的地方,但修改了一下好象不对,请指教

                        $query = $_SGLOBAL['db']->query('SELECT i.* FROM '.tname('robotitems').' i WHERE i.robotid=\''.$_POST['robotid'].'\' AND i.isimport=0 ORDER BY i.robottime');

                }

                $itemarr = $theitemidarr = array();

                while ($item = $_SGLOBAL['db']->fetch_array($query)) {

                        $robotitemid = $theitemidarr[] = $item['itemid'];

                        $item = saddslashes($item);

                        $hashstr = smd5($_SGLOBAL['supe_uid'].'/'.rand(1000, 9999).$_SGLOBAL['timestamp'].$item['itemid']);

                        $setsqlarr = array(

                                'catid' => $_POST['catid'],

                                'uid' => $item['uid'],

                                'username' => $item['username'],

                                'type' => 'news',

                                'subject' => $item['subject'],

                                'dateline' => $item['dateline'],

                                'lastpost' => $item['dateline'],

                                'hash' => $hashstr,

                                'haveattach' => ($item['haveattach']==1?1:0)

                        );

                        $itemid = inserttable('spaceitems', $setsqlarr, 1);

                        $robotid = $item['robotid'];

                       

                        $itemidarr[$item['itemid']] = $itemid;

                        $itemarr[$item['itemid']] = $item;

                        if($item['haveattach']) {

                                $_SGLOBAL['db']->query("UPDATE ".tname('attachments')." SET itemid='$itemid', catid='$_POST[catid]', uid='$item[uid]', hash='$hashstr' WHERE hash='R{$robotid}I{$robotitemid}'");

                                //更新图文资讯

                                $attvalue = $_SGLOBAL['db']->fetch_array($_SGLOBAL['db']->query("SELECT aid FROM ".tname('attachments')." WHERE itemid='$itemid' AND isimage='1' LIMIT 0 ,1"));

                                $_SGLOBAL['db']->query("UPDATE ".tname('spaceitems')." SET picid='$attvalue[aid]' WHERE itemid='$itemid'");

                        }

                       

                }

               

                //内容

                if(empty($theitemidarr)) showmessage('robotmessage_op_success', $theurl);

       

                $itemids = implode('\',\'', $theitemidarr);

                $query = $_SGLOBAL['db']->query('SELECT ii.* FROM '.tname('robotmessages').' ii WHERE ii.itemid IN (\''.$itemids.'\') ORDER BY ii.msgid');

                while ($msg = $_SGLOBAL['db']->fetch_array($query)) {

                        $msg = saddslashes($msg);

                        if(empty($itemidarr[$msg['itemid']])) continue;

                        $setsqlarr = array(

                                'itemid' => $itemidarr[$msg['itemid']],

                                'message' => $msg['message'],

                                'newsauthor' => $itemarr[$msg['itemid']]['author'],

                                'newsfrom' => $itemarr[$msg['itemid']]['itemfrom']

                        );

                        inserttable('spacenews', $setsqlarr);

                }


inserttable()函数好象就是,但我把inserttable('spacenews', $setsqlarr);
修改成inserttable('modelmessage', $setsqlarr);
好象无用

咨讯的帖子主要保存在supe_spacenews和supe_spaceitems2个表里面
那模型的帖子就应该在supe_modelmessage和supe_modelitems里面了吧?
望详解
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-13 15:23 , Processed in 0.084552 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表