PDA

View Full Version : Help with newpostcomplete hook request.


RagingPenguin
05-08-2008, 03:00 PM
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, 08: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, 11: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