Well, as Garvin tell me (thanks!!) to resolve this, I need to connect the post id from SMF to s9y... and that's a little... difficult...
In SMF the posts Id and its content are stored in a table as well as the comments, in
smf_messages:
Code: Select all
Field Type
ID_MSG int(10)
ID_TOPIC mediumint(8)
ID_BOARD smallint(5)
posterTime int(10)
ID_MEMBER mediumint(8)
So, we have different post 'Ids' in SMF and s9y, but in the importer from SMF to s9y we got (/include/admin/importers/smf.inc.php):
Code: Select all
/* Entries */
$res = @$this->nativeQuery("SELECT
tm.subject AS post_subject,
t.ID_MEMBER_STARTED AS topic_poster,
t.ID_BOARD AS forum_id,
tm.posterTime AS post_time,
tm.body AS post_text,
t.ID_TOPIC AS topic_id,
t.ID_FIRST_MSG AS post_id,
t.numReplies AS ccount
FROM {$this->data['prefix']}topics AS t
JOIN {$this->data['prefix']}messages AS tm
ON tm.ID_MSG = t.ID_FIRST_MSG
GROUP BY t.ID_TOPIC", $gdb);
if (!$res) {
return sprintf(COULDNT_SELECT_ENTRY_INFO, mysql_error($gdb));
}
for ($x=0, $max_x = mysql_num_rows($res) ; $x < $max_x ; $x++ ) {
$entries[$x] = mysql_fetch_assoc($res);
$entry = array('title' => $this->decode($entries[$x]['post_subject']),
'isdraft' => 'false',
'allow_comments' => 'true',
'timestamp' => $entries[$x]['post_time'],
'body' => $this->strtr($entries[$x]['post_text']),
'extended' => ''
);
$entry['authorid'] = '';
$entry['author'] = '';
foreach ($users as $user) {
if ($user['ID'] == $entries[$x]['topic_poster']) {
$entry['authorid'] = $user['authorid'];
$entry['author'] = $user['user_login'];
break;
}
}
if (!is_int($entries[$x]['entryid'] = serendipity_updertEntry($entry))) {
return $entries[$x]['entryid'];
}
And that could point the smf tags to the right post in s9y... I guess... I'm not a SQL nor PHP expert...
Try not. Do, or do not. There is no try.