![]() |
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 :D. |
require the forum/global.php that's enough to use those global vars :)
|
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? |
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 :) |
<?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? |
remove the () around the string, echo don't needs em
|
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? |
yes, it looks right, and the html below should show up....
|
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... |
This should work:
PHP Code:
|
All times are GMT. The time now is 05:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|