vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Including vB templates internal and external (https://vborg.vbsupport.ru/showthread.php?t=92902)

Otikeu 07-26-2005 04:00 AM

Including vB templates internal and external
 
Well, I need some help, to save space on this thread, you can find my issue at the official site. Though I would ask here also to see if anyone here knows.

http://www.vbulletin.com/forum/showthread.php?t=148173

Thank you in advance for your help, as it is very much appreciated.

Adrian Schneider 07-26-2005 04:06 AM

Read this tutorial:
https://vborg.vbsupport.ru/showthread.php?t=62164

Also, to have one template include another:
PHP Code:

eval('$variable= "' fetch_template('template_name') . '";'); 


Otikeu 07-26-2005 04:25 AM

well, actually I was tring that fetch code, and it does fetch the template, but the stuff under that php code doesn't show. I use that php command between <td>'s in my index.php. Variables and templates show, just not the code contents after the php code of index.php. I used this to get it:

PHP Code:

<?php
     
eval('print_output("' fetch_template('usernav') . '");');
?>

Also, how do I include vB template coding within a vB template?

Adrian Schneider 07-26-2005 05:21 AM

Instead of echo or whatever you use customly, use variables, then stick them in the template where you want them.

... assuming I understand your problem correctly.

Otikeu 07-26-2005 05:47 PM

aye, I'll try that

omg, it works using variables! Basically, I put this code:

PHP Code:

eval('$usernav= "' fetch_template('usernav') . '";'); 

in my data.php which defines my other variables and used <?=$usernav?> where I wanted the template to be in the coding of my website and success!

I would personally like to thank you for your help. I think this will work in the php_include template of vB so I can use it within vB templates as well. But, seriously, if I had money, I would pay you I'm so happy! :)

Adrian Schneider 07-27-2005 01:23 AM

lol

Glad to be of assistance. :)


All times are GMT. The time now is 03:08 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.01560 seconds
  • Memory Usage 1,722KB
  • 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
  • (3)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