Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: Rick33 on May 31, 2020, 12:03:16 PM

Title: From script: post text+image in a new thread?
Post by: Rick33 on May 31, 2020, 12:03:16 PM
From a php script, how-to:
- start a new thread...
- ...post some text...
- ...and attach 1-3 jpg images?
- And, if it's possible, set the post date to an older date.

The user is admin.

SMF 2.0.17

(If the answer is right under my nose somewhere in this forum then you can call me ugly names :)
Title: Re: From script: post text+image in a new thread?
Post by: Rick33 on May 31, 2020, 02:08:08 PM
update:

found a very old file (on my old hard drive),
that had been used to post text (not attachments).
It's using functions (like createPost()) in
SSI.php and Subs-Post.php

Maybe this is fixable without too much hassle, we'll see.
Title: Re: From script: post text+image in a new thread?
Post by: vbgamer45 on May 31, 2020, 02:16:58 PM
Yes you can do with the createPost function. Attachments are possible as well.
I have some examples of that function my RSS Feed Poster mod.