Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Don Jajo - maaliskuu 01, 2014, 01:40:39 IP

Otsikko: How can I use SSI.php to create topics?
Kirjoitti: Don Jajo - maaliskuu 01, 2014, 01:40:39 IP
Hi,

I wanna create a page outside SMF directory where a user can post a topic and it goes into db. Which function in SSI.php handles that?

Thanks
Otsikko: Re: How can I use SSI.php to create topics?
Kirjoitti: Sorck - maaliskuu 01, 2014, 05:44:49 IP
You'll want to look at createPost() (http://support.simplemachines.org/function_db/index.php?action=view_function;id=323) in Subs-Post.php. You may need to include that file as well as SSI.php as I don't think it'll be included by default (but I could be wrong).

The function will create a new topic if you don't supply a topic ID.
Otsikko: Re: How can I use SSI.php to create topics?
Kirjoitti: Don Jajo - maaliskuu 02, 2014, 01:40:04 AP
Great! Thanks friend, i'll give it a try :)