![]() |
getting VB vars to work in a misc php file in the forum directory?
How would I do this? It's a php news file ( http://www.theforumz.com/forumz/frontpage.php ), but I want to use some fo the variables in VB to call numbers and features, like getting the number of people that are online. (I have FireFly's lil' hack) or getting a PM box on the page, etc. I try it and instead of grabbing the variable, it just shows the variable text instead of getting it. Do I need to require certain VB files inorder to get this to work?
If somebody can help me, I would greatly appreciate it. Thanks! |
PHP Code:
|
What's the error reporting part suppose to be? It looks like it made it a link? :confused:
EDIT: I just checked my file and I am requiring the global.php file. :confused: |
The link is just part of a hack, and error_reporting is a function to set the error reporting level. vBulletin uses 7 (E_ERROR | E_WARNING | E_PARSE) in all its scripts. You don't have to use it but you should.
|
Firefly I have included the global.php file in the frontpage.php file and it just shows the var instead of executing it and getting the "code" that is attached to the variable. Anything else?
About the "error_reporting(7);" So I just actually write out "error_reporting(7);" It just seemed a little weird since it was so plain. (I thought the php code tag might of changed it.) :confused: What other files can I include to get this to work? |
How are you using these variables?
|
<a href="http://www.theforumz.com/forumz/test.php" target="_blank">http://www.theforumz.com/forumz/test.php</a>
Upper left. Do I need to add more... stuff? |
How? :) i.e what code...
|
View source... duh. :)
Code:
|
What PHP code?
|
Maybe I don't understand the quesiton?
If you want to know what code the $headeronline var calls here are the instructions written by you. :) Code:
|
*bangs head against nearest wall*
HOW are you using $headeronline?! In a template, file, echoing it, what? |
Duh.... me likes VB.. :?:
:D OK, well since I am still a complete noob and I have no idea what "echoing" even means, it's hard to answer your questions. If you want to know how I am using it in my forum in my forumdisplay_threadslist file I added this line: <a href="http://www.theforumz.com/forumz/online.php"><b> $headeronline </b></a> Currently Online Users Other than that I have given you everything I have done. The way I put it in the misc. php file that's in my forum directory, the instructions on how I got the users to be in a var from your instructions, the pages themselves, how I put it into forum pages. If you want more you will have to convert your speaking to newbie terms, because I still don't understand. Is all I want it to do is make is to that my misc php file that I have in my forum directory to act like my forum templates and when I type $headeronline in my misc php file I don't want it to show "$headeronline", I want it to actually go get the number of people that were online. Can you please help me to understand what you are saying and what I need to do? (Sorry for being such a noob) :( Thanks. |
err.... FireFly, how would i be able to call in templates like headinclude, header and footer?
|
Quote:
|
no, i mean actually call a template into a misc php file that has global.php included.
|
All times are GMT. The time now is 05:02 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|