vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Adding custom template to another template (https://vborg.vbsupport.ru/showthread.php?t=215977)

Raw Sugar 06-12-2009 04:39 AM

Adding custom template to another template
 
Okay, I'll be as descriptive as possible.

On my forum, I'd love to have an affiliates drop down box in the 'footer' in the middle of the style, links, copyright and all that. The only problem with having it hard-coded into the 'forumhome' template is that some styles have edited footer templates. Which means the drop down would have to be edited in each scheme.

I'm hoping there's a way to, either by php includes or some other way, I could have the drop down in its own template and call that over in the footer.

For the time being, I've settled with the affiliates having its own page, but it's very annoying and I'm sure no one goes to them.

So any and all help would be greatly appreciated! Thanks in advance...

Lynne 06-12-2009 04:08 PM

Are you using a plugin to create the content of the dropdown? You could spit the results of that plugin into a variable:
PHP Code:

eval('$myvariable = "' fetch_template('mytemplate') . '";'); 

And then enter $myvariable into your various footer templates.

ragtek 06-12-2009 04:10 PM

Also don't fortget to cache it!

https://vborg.vbsupport.ru/showthread.php?t=119933

Lynne 06-12-2009 04:24 PM

^^ Yep! I always forget that until I look down at those bold red letters at the bottom of my page. :D

Raw Sugar 06-12-2009 05:14 PM

Okay, thanks for responding guys! I can't try this out yet, but I will as soon as I get a chance (a couple days probably). I will let you know how it goes!

Raw Sugar 06-19-2009 03:50 AM

Yes, it works! Thanks so much for directing me to that thread! :-)


All times are GMT. The time now is 08:13 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.01136 seconds
  • Memory Usage 1,720KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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