vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help with newpostcomplete hook request. (https://vborg.vbsupport.ru/showthread.php?t=178547)

RagingPenguin 05-08-2008 02:00 PM

Help with newpostcomplete hook request.
 
In the code for this hook, what variables do I use to get the following information about the post? I know that most are in the post table but I want to avoid a query. I think the post and thread information should be in scope though since we just completed adding a new post, right? I just don't know what there variables are.

postid,
threadid,
username,
userid,
dateline,
pagetext,
title,
forumid

Thanks in advance!

Kirk Y 05-08-2008 07:48 PM

You should get a text searching utility that can go through the vB release and search for instances of 'newpost_complete' -- that way you can see what variables, functions, etc. are available. ;)

Off hand though, I believe you should be able to use $post for most (if not all) of that; you might need $threadinfo for threadid. You can always var_dump if you need to see what all is available.

RagingPenguin 05-08-2008 10:59 PM

Thanks. I got that and what I need for editpost_update_complete hook worked out, but nothing seems to work in editpost_delete_complete. Can you look at my other recently posted thread regarding that? I've looked through the vb code, even put die()'s before each hook eval for it. I can't seem to find a constant.


see: https://vborg.vbsupport.ru/showthread.php?t=178588


All times are GMT. The time now is 10:17 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.01362 seconds
  • Memory Usage 1,709KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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