Log in

View Full Version : Help adding variables to header


pgowder
01-31-2007, 02:42 PM
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:
$fileusername = "$userinfo['username']";
$fileemail = "$userinfo['email']";
$fileuserid = "$userinfo['userid']";

And this:ob_start();
require("skyad.inc");
$skyad= ob_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:


$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: ?


ob_start();
require("skyad.inc");
$skyad= ob_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
First of all, its kinda hard to help when we don't know what your trying to accomplish.

Whats the purpose in this code: ?


ob_start();
require("skyad.inc");
$skyad= ob_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!