View Full Version : Calling a template up in the frontpage
attroll
06-22-2004, 01:45 AM
I am trying to call up a template that I have working in my forum navbar. It works from within my forums without a problem. What I did was put the value in my navbar called $navbar2 and I put the following statement in the phpinclude_start template:
eval('$navbar2 = "' . fetch_template('navbar2') . '";');
For some reason it does not work in the homepage. I think that is it because when it loads the cmps_index it does not call read the phpinclude_start first. I may be wrong.
If you would like to see my test site and you can see what I am talking about you can look here:
http://www.whiteblaze.net/geomaine. You will have to switch between the Frontpage and the forums to see what I mean about the navbar.
Can someone help me with this?
Chuckie
06-22-2004, 09:46 AM
You might try putting it in the includes/vba_cmps_include_bottom.php
look for:
eval('$navbar = "' . fetch_template('navbar') . '";');
and add above that:
eval('$navbar2 = "' . fetch_template('navbar2') . '";');
What I did was add code for my 2nd navbar strait to my navbar template. So that it wraps the top and bottom of the welcome box. It makes for a longer template code but cuts out a lookup for a second template.
Brian
06-22-2004, 10:54 AM
In your includes/vba_cmps_include_bottom.php file try looking for:
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox;
Replace that with:
[php] global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $navbar2;
And that should allow it to be displayed. :)
Chuckie
06-22-2004, 11:10 AM
Brain has the best solution for you.
Brian
06-22-2004, 11:46 AM
Just out of curiosity, why did you make that a seperate template rather than just adding that code into your navbar template anyways?
attroll
06-22-2004, 01:10 PM
Just out of curiosity, why did you make that a seperate template rather than just adding that code into your navbar template anyways?
Originally when I wrote the mode I did put it in the navbar template and it word fine for me and I posted it that way on vbulletin.org as it still is there. But a lot of users liked it but wanted it in different variations. Some wanted it on top some on the bottom and some separate. So I have come up with a different way to have users install it buy just putting the $navbar2 in the line where they want it. It is less confusing for users that do not know coding that well and easier to edit when it is in its own template. I have included three different screen shots of the way users have wanted to use this hack. As of right now I have the hack on vbulletin.org so they install it in their navbar as you think it should be. But I was going to update the hack or add this new way of doing it. But have been holding off on doing it.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.