Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2003
Posts: 6
Lurker
Lurker
Offline
Joined: Mar 2003
Posts: 6
I have some external PHP code which implements a simple classified ads system.

What I'd like to be able to do is:

a) When a user creates a new ad, I'd like to automagically create a post in a forum where the ad can be discussed.

b) When a user viewing the ad wants to discuss the ad, they can press a button (or link) and be taken to the view of the appropriate thread.

So, what I'd like to know is how to create a new post from within an external app (assuming the user has been authenticated with Threads), which will return me enough information to be able to reference that post later (ie post #, board id, etc) ?

Thanks.

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
a)
Have a look at newpost.php, newpost.tpml and addpost.php. There you'll find all needed input params which are needed for a new posting/thread.
Make sure that your external php script generates that info and handles that over to the addpost.php or use the addpost.php script as a start to create your own script.

b)
All you need is the id of the post after it has been insterted into the database. You can modify addpost.php to grab that after the insert statement.
Then it's just putting together the url: http://www.yourboard.com/showflat.php?Number=XXXXX


Joined: Mar 2003
Posts: 6
Lurker
Lurker
Offline
Joined: Mar 2003
Posts: 6
Thanks for the pointers - I'll take a look!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)