vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Global use of $post[usertitle] (https://vborg.vbsupport.ru/showthread.php?t=112213)

Chris Gwynne 04-05-2006 10:12 AM

Global use of $post[usertitle]
 
Hey

I need a hack that will allow the global use of $post[usertitle] which means it'll show up on any page where a username is shown, rather than just postbit and member info.

Any hack exist for this, or is it possible?

Anybody have any ideas?

Krofh 04-05-2006 03:38 PM

You want someone's user title on any page? Use $vbulletin->userinfo[usertitle], not $post[usertitle]. Or, I think $bbuserinfo[usertitle] works also for the same thing, but I'm not 100% sure on that.

ThePimp 04-05-2006 04:47 PM

Make a plugin for it:
*Hook Location: Global Complete*

$output = str_replace('[usertitle]', $vbulletin->userinfo['usertitle'], $output);

Then call it in your templates with [usertitle].

(I believe this is correct)

Krofh 04-05-2006 05:14 PM

ThePimp's method works, but you'll have to be careful because then it'll replace [usertitle] anywhere in the page, including if someone puts that in their post.

Deaths 04-05-2006 05:41 PM

If you wish to display the viewer's usertitle in templates you'll have to use the $bbuserinfo[usertitle] variable.

Chris Gwynne 04-05-2006 08:16 PM

Does that also work within phrases, as a lot of the usernames are within phrases as well. What'd be a way to integrate and bypass that?


All times are GMT. The time now is 10:27 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.01072 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
  • (6)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