The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
navbar on none vb page
Im not sure how hard this is to do, but the vb3 index.php doesnt seem to like me trying to hack it out. I have seen it included in vBindex so its do-able.
Im trying to create my own start page for a custom project, so this really would help me a lot! thanks |
#2
|
||||
|
||||
Are you going to be using the vB template system or no?
|
#3
|
|||
|
|||
Well I was hoping I could just pull that one template from the database. It is a PHP page im working on. Basically its an amalgamation of the last10threads script that was released for vB2 with hopefully the navbar on to make the entire thing consistant.
|
#4
|
|||
|
|||
I followed a link on your signature and managed to write a little script that pulls out the navbar. However, it is missing all its colour (presuming thats to do with a style sheet problem?) and the options are a bit wonky too - ie/ the drop down quick links menu doesnt work and the links all point to the wrong places. hmmmmmmmmmm!
|
#5
|
||||
|
||||
Quote:
|
#6
|
|||
|
|||
I'm still having fun with this. If I do the following:
$globaltemplates = array( 'navbar,headinclude' ); // ## Grabs global.php this grabs vbulletins global.php so we can use the most basic of vBulletins functions ## require_once("./global.php"); // ## this calls to print out one main template ## eval('print_output("' . fetch_template('navbar') . '");'); eval('print_output("' . fetch_template('headinclude') . '");'); I get a grey screen outputted. If I do: $globaltemplates = array( 'headinclude,navbar' ); // ## Grabs global.php this grabs vbulletins global.php so we can use the most basic of vBulletins functions ## require_once("./global.php"); // ## this calls to print out one main template ## eval('print_output("' . fetch_template('navbar') . '");'); eval('print_output("' . fetch_template('headinclude') . '");'); I get my nav bar outputted but without the formatting. Im very confused. I have looked in the vb3 index.php and cant find the section where it might call the navbar. Arghhhhhhhhhhh!!! |
#7
|
||||
|
||||
eval('print_output("' . fetch_template('navbar') . '");');
will just print out the whole template and we dont want that now do we? you want to eval them eval('$navbar = "' . fetch_template('navbar') . '";'); eval('$h_include = "' . fetch_template('headinclude') . '";'); |
#8
|
|||
|
|||
what exactly is the 'eval' doing though? I have never worked that one out. Forgive my ignorance, I'm a n00b with PHP really - as though you couldnt have guessed.
This is what I have so far: $globaltemplates = array( 'navbar,headinclude' ); require_once("./global.php"); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('$h_include = "' . fetch_template('headinclude') . '";'); That returns a grey screen - so although something is working, that something is not the something I want! Thanks for your quick reply. |
#9
|
||||
|
||||
Quote:
that makes vB print out the whole template, making them varibles will allow you to use them in your code wherever HTML Code:
<html> <head> <title>test</title> $h_include </head> <body> This is a test $navbar end of the test </body> </html> |
#10
|
|||
|
|||
cheers, this is my code for any one else who wants it:
PHP Code:
Now to figure out why Im getting JScript errors! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|