News:

Wondering if this will always be free?  See why free is better.

Main Menu

Set topic id on createpost()

Started by tdguchi, September 19, 2014, 02:47:34 PM

Previous topic - Next topic

tdguchi

Hi, in tryin to post directly on smf from a php script, using createpost()

On topic options, there is a place to set the topic id, (1, 123, 356 etc) but, what I want is to set that getting the last id on the forum, and add 1 (I need to know the topic id of the new post created to make somethings with it)

Im creating another mysql db, and i need to add a column with topic id to build the post url later

how can i do it?

thanks

Arantor

When you create $topicOptions to pass into createPost, set an id in $topicOptions['id'].

This will only work if you already *have* a topic. If not, the process will *create* the topic, and return the topic id in $topicOptions['id'].

Advertisement: