@ Orstio: Read permissions set so that the webserver can read the files?
I read on the smf thread that the bridge is not supposed to work on separate DBs, mine seems too when tested, will test some more though.
#2: "valid SMF session" - when we are in another module, how do we ensure that the SMF session exists?
#3: Where will the user be sent afterwards? My intention is to go back to the article/download/etc. but if it goes to the thread, I guess people will live with it.
#4: Something like that, yes. Is there a hierarchy of categories and subforums or will a simple board table query do?
Great news.
#1: This assumes the variable $resultid contains the given topic ID. It will return the array of posts into $posts.$post_query=mysql_query("SELECT ID_MEMBER, posterName, subject, body, FROM_UNIXTIME(posterTime, '".$discuss_date_format."') AS msgTime FROM {$db_prefix}messages WHERE ID_TOPIC = '$resultid';");
$posts = mysql_fetch_assoc($post_query);
#2: This assumes we've queried to get the board ID ($board_id), the topic ID ($resultid, same as in #1), the number of replies to the topic ($replies), and that a valid SMF session exists (will populate $GLOBALS['sc']). $title and $article_id should be taken from the XOOPS article.<table><tr><td valign="top">
<form id='.$article_id.' action="'. XOOPS_URL . '/modules/smf/index.php?action=post2"').' method="post" name="postmodify" onsubmit="submitonce(this);">
<input type="hidden" name="topic" value="' . $resultid . '" />
<input type="hidden" name="board" value="'.$boardid.'" />
<input type="hidden" name="subject" value="' . $title . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="goback" value="true" />
<input type="hidden" name="num_replies" value="'. $replies. '" />
<textarea cols="75" rows="8" class="inputbox" wrap="VIRTUAL" style="width: 75%" name="message" tabindex="1"></textarea><br />
<input type="submit" name="post" value="Reply" class="button" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="hidden" name="sc" value="' . $GLOBALS['sc'] . '" /></form></td></tr></table>
#3: The form above will take care of it all automatically if done right.
#4: I'm not sure what exactly is required here. Perhaps just query the smf_boards table?
This is exactly the same thing that is done with the discussbot in Mambo and Joomla:
http://www.simplemachines.org/community/index.php?topic=118310.0
The invention of the discussbot, and its subsequent upgrades and forks were a big part of the popularity of the Mambo/Joomla bridge. This is very good to see for Xoops. 8)
Warning [PHP]: xoops_load_lang_file(/home/tgotch/public_html/modules/shop/language/english/modinfo.php): failed to open stream: No such file or directory in file include/functions.php line 152
Warning [PHP]: xoops_load_lang_file(): Failed opening '/home/tgotch/public_html/modules/shop/language/english/modinfo.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in file include/functions.php line 152
Warning [PHP]: xoops_load_lang_file(/home/tgotch/public_html/modules/shop/language/english/modinfo.php): failed to open stream: No such file or directory in file include/functions.php line 153
Warning [PHP]: xoops_load_lang_file(): Failed opening '/home/tgotch/public_html/modules/shop/language/english/modinfo.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in file include/functions.php line 153