PDA

View Full Version : Recalling Templetes? please help


TalkGaming
07-31-2003, 08:28 PM
I'm pretty sure there is a way to do this but I cant remember it.

I want to call up a templete while in another templete, for example.. I want to call up another templete in the postbit templete. This is so its easier for me to manage different hacks of the postbit templete and just makes it look more organized for me.

Would I simply use php include? Or does Vb3 have another way of doing this?

Thanks!

Zachery
07-31-2003, 08:45 PM
if your talking about adding a new template and calling it, it make it $example you would have to do sumthing to make it eval. if you wanted to call a template outside the postbit, you might need to make sure its called for that specific page... sorry im not more help :\

TalkGaming
08-01-2003, 12:18 AM
I could place the new templete in the postbit templetes section.. how would I use the eval function to call it?

Thanks for your help!

Zachery
08-01-2003, 12:19 AM
no friggin clue

TalkGaming
08-01-2003, 02:50 AM
no friggin clue
Hah, thanks for the point in the right direction anyhow... hopefully one of the vets here will help me out as well, but thanks again!

Brad
08-01-2003, 03:56 AM
In vB 3 you can use the <if> <else /> tags inside the postbit template. That avoids having to hack the files, witch you are going to have to do if you want the custom template added correctly.

TalkGaming
08-01-2003, 12:38 PM
Ok, so I use the If condition to call the templete? I dont understand how that works.

Brad
08-01-2003, 04:40 PM
no, embed the html into postbit within the <if> tags. for example:

<if conditinal="$bbuserinfo[userid] != 0">
// some html here
<else />
// shows to un-regged users in all posts
// some more html
</if>

TalkGaming
08-01-2003, 10:15 PM
Ok, thats good to know and I can definately use that. I guess what I was asking for isnt possible. I cant use like a variable $templetename and have that code parsed there huh?

SmartGnome
08-02-2003, 04:55 PM
Ok, thats good to know and I can definately use that. I guess what I was asking for isnt possible. I cant use like a variable $templetename and have that code parsed there huh?

Not by a simple template mod..... to call a home made template you need to hack the index.php and assign you template to the array and eval that one before you can use it.

I have tried to do it in the phpinclude_start template but this is not working for 100%.

For some of my home-made templates I have hacked my index.php

Brad
08-03-2003, 02:05 AM
Ok, thats good to know and I can definately use that. I guess what I was asking for isnt possible. I cant use like a variable $templetename and have that code parsed there huh?
I know what your talking about, and it is possible to do it via the phpinclude_start for some templates. I belive postbit (or any 'bit) template is not supported in vB 3, unless something has changed in the way templates are handled scence the vB 2 series.

Before you look into calling templates via the phpinclude template's you should read this thread:

http://www.vbulletintemplates.com/mods/showthread.php?t=4216

SmartGnome
08-03-2003, 08:50 AM
I know what your talking about, and it is possible to do it via the phpinclude_start for some templates. I belive postbit (or any 'bit) template is not supported in vB 3, unless something has changed in the way templates are handled scence the vB 2 series.

Before you look into calling templates via the phpinclude template's you should read this thread:

http://www.vbulletintemplates.com/mods/showthread.php?t=4216

Totaly agree with that Brad... The best to do is putting your custom templates on a place where vb does the caching.

Suggestion:
As you can see all custom templates are grouped at top of the list. Perhaps the dev team will make it so that all custom templates will be cached automagicly. This is a good thing to add and will make life as easy as with conditionals.

In my board is just one hack (to cache two templates) the rest is done by conditionals and only template mods. I like it that way.

Ad

TalkGaming
08-03-2003, 02:27 PM
Thanks so much for you help guys! I think I have a place to start now :)