The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I call this information on a non-vB page?
What do I need to do on a .php page that I have which is not in my forum dir, to get the following information...
I want to be able to use variables which will display certain things, like the minimum required post count to use a custom avatar... Can I just include forum/global.php and have it work? Or do I need forum/admin/global.php? I have no idea really, someone give me a clue . |
#2
|
||||
|
||||
require the forum/global.php that's enough to use those global vars
|
#3
|
|||
|
|||
Well, it's more complicated than that for me actually...
My pages are mostly HTML... I have a file, header.php, and a file, footer.php I create my pages like this: <?php include('header.php'); ?> loads of html stuff here sdfsdf sdfsdf sdfsdfsdf <?php include('footer.php'); ?> If I want to use these variables in the sdsdfsdflskjdflksjdf stuff in the middle, what can I do? Where do I require global.php? if I close a php tag, do I need to require global.php again when I reopen them? |
#4
|
||||
|
||||
require global.php in the first instance of <?php ?>
you don't have to rerequire it anywhere i think there was a shortcut: <?=$blabla?> to show the content of a var in the html code |
#5
|
|||
|
|||
<?php
require("/****/*****/forum/global.php"); echo("blah: " .$avatarcustomposts); ?> I just put this in its own .php file with nothing else, and it returns no results...what am I doing wrong? |
#6
|
||||
|
||||
remove the () around the string, echo don't needs em
|
#7
|
|||
|
|||
ok another problem:
require('.forum/global.php'); This line seems to cut off all code below it (html)... <?php require('.forum/global.php'); ?> Anything below those 3 lines in a php file, say html, will not be shown... Does that look right? |
#8
|
||||
|
||||
yes, it looks right, and the html below should show up....
|
#9
|
|||
|
|||
It's not working...I've been working on this for hours now, and i'm really really annoyed. Everything looks right, but it won't work.
Here's a sample page I have: <?php include("header.php"); ?> <table><tr><td> sdfsdfsdfsdfsdfsdf </td></tr></table> <?php require('/***/***/***/forum/global.php'); echo $avatarcustomposts; ?> <table><tr><td> sdfsdfsdfsdfsdfsdf </td></tr></table> <?php include("footer.php"); ?> I can't see *anything* wrong there. I've tried variations of everything, and still, no work... I'm completely baffled... |
#10
|
||||
|
||||
This should work:
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|