View Full Version : Where is the file that inserts new posts into the database?
jbird310
03-17-2011, 02:25 AM
I want to do something every time a new post is added, but I can't find the file that inserts new posts into the database. It's driving me crazy, and I know it's probably right under my nose. :o Does anyone know?
Lynne
03-17-2011, 04:10 AM
class_dm_threadpost.php
jbird310
03-19-2011, 07:19 PM
Thanks Lynne! Any idea where I would insert some custom code after a new post is inserted into the database? Is it within this function?
function post_save_each_post($doquery = true)
BirdOPrey5
03-19-2011, 07:27 PM
Usually you would use a plugin hook and not edit the files directly... will make upgrading and maintaining much easier in the long run...
In plugin manager look at the hooks newreply_post_complete and newthread_post_comoplete... find those hooks in the php files and any code you add to those plugins will be like they were added to the php files at those hooks.
jbird310
03-19-2011, 07:29 PM
Thanks BirdOPrey, good to know!
jbird310
03-24-2011, 11:31 PM
Still can't figure out how to do what I want. :(
Basically, I just want the user to get a notification (NOT by email) every time someone replies to a thread they've created or posted in. I'm sure many people have requested this, but I haven't seen a solution for it anywhere so I'm trying to take a stab at it...
Any suggestions?
BirdOPrey5
03-24-2011, 11:42 PM
Still can't figure out how to do what I want. :(
Basically, I just want the user to get a notification (NOT by email) every time someone replies to a thread they've created or posted in. I'm sure many people have requested this, but I haven't seen a solution for it anywhere so I'm trying to take a stab at it...
Any suggestions?
That is what thread subscriptions are for. Users can auto subscribe to every thread they post in.
jbird310
03-25-2011, 01:17 AM
I know, but I want something more than just thread subscriptions. I want instant on-site notifications for multiple actions (the first one being a new post), like Facebook has.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.