vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Where is the file that inserts new posts into the database? (https://vborg.vbsupport.ru/showthread.php?t=260510)

jbird310 03-17-2011 02:25 AM

Where is the file that inserts new posts into the database?
 
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

Quote:

Originally Posted by jbird310 (Post 2177156)
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.


All times are GMT. The time now is 12:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00971 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete