13
Quote:
#2: "valid SMF session" - when we are in another module, how do we ensure that the SMF session exists?
Just including SMF's SSI.php will do that just fine. It should return a valid session ID into $context['sess_id'].
Quote:
#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.
Yeah, that form would take them to the SMF topic after posting (or to the topic index, depending on the setting the admin has chosen).
There are two ways around this:
1) You could set up a form that would submit to a piece of code that would add the post and then return to the article instead. This would not be advised unless you really want to write all the security checks to go with it.
2) You could write a SMF modification package to go with the XOOPS module to check the referring submission and return to the XOOPS article. See here for more info on writing SMF mods:
http://docs.simplemachines.org/index.php?topic=506
The files you would want to look at are Post.php and Subs-Post.php.
Quote:
#4: Something like that, yes. Is there a hierarchy of categories and subforums or will a simple board table query do?
The heirarchy is user-definable, so yes, querying the smf_boards table will be the best route.