vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Recalling Templetes? please help (https://vborg.vbsupport.ru/showthread.php?t=87281)

TalkGaming 07-31-2003 08:28 PM

Recalling Templetes? please help
 
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

Quote:

Originally Posted by Faranth
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:

Code:

<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

Quote:

Originally Posted by TalkGaming
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

Quote:

Originally Posted by TalkGaming
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/mo...ead.php?t=4216

SmartGnome 08-03-2003 08:50 AM

Quote:

Originally Posted by Brad.loo
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/mo...ead.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 :)


All times are GMT. The time now is 04:24 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01076 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete