vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Anyway to get the poster's username in the threadbit_display hook? (https://vborg.vbsupport.ru/showthread.php?t=245957)

BirdOPrey5 07-06-2010 01:15 AM

Anyway to get the poster's username in the threadbit_display hook?
 
$post[username] doesn't work. :confused:

mahz 07-08-2010 04:18 AM

try $this->registry->post[username]

BirdOPrey5 07-08-2010 03:24 PM

Quote:

Originally Posted by mahz (Post 2066230)
try $this->registry->post[username]

That actually caused a fatal error when trying to view the forum. :(

Also I wasn't using $post[username] but $vbulletin->post[username] that wasn't working.

Boofo 07-08-2010 03:27 PM

Have you tried $threadinfo[username]?

BirdOPrey5 07-08-2010 03:30 PM

Just did, it also comes up blank/isn't available.

Boofo 07-08-2010 03:53 PM

$vbulletin->userinfo[username]

BirdOPrey5 07-08-2010 06:05 PM

Quote:

Originally Posted by Boofo (Post 2066410)
$vbulletin->userinfo[username]

The problem with that is it shows the username of the user logged in, I'm looking for the username of the thread/post creator.

Boofo 07-08-2010 06:36 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2066475)
The problem with that is it shows the username of the user logged in, I'm looking for the username of the thread/post creator.

Try:

$thread['postusername']

BirdOPrey5 07-08-2010 08:51 PM

Quote:

Originally Posted by Boofo (Post 2066488)
Try:

$thread['postusername']

Perfect, Thanks!

Boofo 07-08-2010 09:23 PM

The easiest way to find out things like this is to do a text search in the files for things like "threadbit_display". Once you find what files the hook is in, it is fairly easy to see how they are calling variables.


All times are GMT. The time now is 11:56 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.01719 seconds
  • Memory Usage 1,724KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete