View Full Version : Getting userid in postbit_display_start
JamesHarrison
07-09-2007, 11:59 PM
Hi,
I'm trying to run this:
generate($this->post['userid'],$vbulletin->userinfo['userid'],$this->post['postid']);
The postid var is correctly output (I'm just echoing these in the generate function).
However, neither of the userid variables are correctly passed to the function- they are null.
Any idea on what's going wrong here?
Dismounted
07-10-2007, 04:55 AM
$post['userid']
JamesHarrison
07-10-2007, 10:14 PM
Tried, and failed. I've been digging through the actual PHP files, both should work- heck, I even did a print_r on the post table which shows the userid as set in $this->post and $post.
Basically, the function to render the postbit (In which the hook exists) gets passed $post, and it assigns it to $this->post too. So either should work; yet neither do.
Dismounted
07-11-2007, 05:39 AM
global $post;
$post['userid']
Possibly?
JamesHarrison
07-11-2007, 11:25 AM
Nope, that's not doing it either.
The really odd thing is that I've tried including this in the raw PHP file, where I can see that the thing is set. Might be a bug in my function- I'll start digging around in there.
Dismounted
07-11-2007, 11:33 AM
Could you post up your function?
JamesHarrison
07-11-2007, 12:15 PM
Never mind- I think I have it. Had some odd things happening with some validation stuff.
Hi
I'm having the same problem here. What did you do to solve it please?
Correction!
It was me being thick!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.