vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Help adding variables to header (https://vborg.vbsupport.ru/showthread.php?t=138040)

pgowder 01-31-2007 02:42 PM

Help adding variables to header
 
I just upgraded to 3.6.4 from 3.0.

In the old version I could use the php include function to process some variables and then call them in the header.

For example I use this:
PHP Code:

$fileusername "$userinfo['username']";
$fileemail "$userinfo['email']";
$fileuserid "$userinfo['userid']"

And this:
PHP Code:

ob_start();
require(
"skyad.inc");
$skyadob_get_contents();
ob_end_clean(); 

So now I'm trying to do the same thing in 3.6. I created new plugins for each of these. And hooked them to global_start.

But on the forums, the variables don't work.

What am I doing wrong?

paul41598 01-31-2007 05:36 PM

Try this format instead:

PHP Code:

$vbulletin->userinfo['username']; 


pgowder 01-31-2007 06:07 PM

Closer?!? Maybe?

Using this:
$vbulletin->userinfo['username'];

It prints out Object now. That's better than being blank!

paul41598 01-31-2007 06:14 PM

First of all, its kinda hard to help when we don't know what your trying to accomplish.

Whats the purpose in this code: ?

PHP Code:

ob_start();
require(
"skyad.inc");
$skyadob_get_contents();
ob_end_clean(); 

Get rid of that for the time being and try...

and don't put double quotes around this $vbulletin->userinfo['username'];

pgowder 01-31-2007 06:18 PM

Quote:

Originally Posted by paul41598 (Post 1171443)
First of all, its kinda hard to help when we don't know what your trying to accomplish.

Whats the purpose in this code: ?

PHP Code:

ob_start();
require(
"skyad.inc");
$skyadob_get_contents();
ob_end_clean(); 

Get rid of that for the time being and try...

and don't put double quotes around this $vbulletin->userinfo['username'];

Actually that is working now! When I put in this new link for userinfo instead of bb it started working.

The include file is just to pull in a file I use in the design.

I need the user info to include in the javascript for the Hubz program. If you aren't familiar with it Hubz is an instant messaging program. My users love it!


All times are GMT. The time now is 05:13 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.01472 seconds
  • Memory Usage 1,729KB
  • 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
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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