vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Getting userid in postbit_display_start (https://vborg.vbsupport.ru/showthread.php?t=151832)

JamesHarrison 07-09-2007 11:59 PM

Getting userid in postbit_display_start
 
Hi,

I'm trying to run this:
PHP Code:

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

PHP Code:

$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

PHP Code:

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.

SDB 07-26-2007 02:38 PM

Hi

I'm having the same problem here. What did you do to solve it please?

Correction!

It was me being thick!


All times are GMT. The time now is 01:15 AM.

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.01006 seconds
  • Memory Usage 1,721KB
  • 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
  • (3)bbcode_php_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