vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Template Help! (https://vborg.vbsupport.ru/showthread.php?t=35953)

Neo 03-10-2002 04:24 PM

Template Help!
 
Ok, I have a template I am using as my base template, then I have sub templates.. there are put into the base template with variables like $tplink.. but when I put them in it shows under the $footer... how would I get it to show correctly?

the link I use is something like this

$tplink = eval("dooutput(\"".gettemplate("temp_under_2")."\" );");

I am lost and need help :smoke:

Lesane 03-10-2002 04:34 PM

Did u tried this?

eval("\$tplink .= \"".gettemplate("temp_under_2")."\";");

Neo 03-10-2002 04:59 PM

Yes, and nothing showed up at all.

Neo 03-10-2002 09:40 PM

COme on FireFly.. you do pro, can ya give me a hand ;)

TECK 03-10-2002 11:35 PM

give me more details neo. i should be able to give you a straight answer. ;)
what exacly you try to do?

btw, you cannot use the function dooutput(), because it calls the headers twice on the same page. that's a no no.. :)

Neo 03-10-2002 11:40 PM

well in a template I have...

example:
<html>
$headrer
$tplink
$footer
</html>

I want the $tplink to be another template.. but when I try and make it a variable.. it only puts it at the bottom and the coe that Lesane posted doesnt show anything at all... how can I get it to work G funk

TECK 03-11-2002 12:08 AM

forum/global.php
1. find this code:
PHP Code:

$templatesused.=',pagenav,pagenav_curpage,pagenav_firstlink,pagenav_lastlink,pagenav_nextlink,pagenav_pagelink,pagenav_prevlink'

replace it with:
PHP Code:

$templatesused.=',pagenav,pagenav_curpage,pagenav_firstlink,pagenav_lastlink,pagenav_nextlink,pagenav_pagelink,pagenav_prevlink,$tplink'

2. find this code:
PHP Code:

$header='';
$footer=''

replace it with:
PHP Code:

$header='';
$tplink='';
$footer=''

3. find this code:
PHP Code:

eval("\$header .= \"".gettemplate('header')."\";");
eval(
"\$footer .= \"".gettemplate('footer')."\";"); 

replace it with:
PHP Code:

eval("\$header .= \"".gettemplate('header')."\";");
eval(
"\$tplink .= \"".gettemplate('neo_got_insane')."\";");
eval(
"\$footer .= \"".gettemplate('footer')."\";"); 

now create a custom template called neo_got_insane and place your html code in there.
all you have to do now is place your $tplink variable, wherever you want (except header and footer). bam.. you are done.. (did you liked that bam thing?) ;)

Neo 03-11-2002 01:27 AM

YOU THE MAN!!!! :D Thanks

TECK 03-11-2002 01:44 AM

ur more then welcome neo.. :)

Neo 03-11-2002 04:55 PM

OK I am having the same problem.. here is the code I am using...

So where is my question and what I am trying to do in short

This is in members.php
---
if ($action=="custom") {
$templatesused = "customize_1,customize_2,customize_3";
include("./global.php");

eval("dooutput(\"".gettemplate("customize_1")."\") ;");

if ($bbuserinfo[cpbenabled]!=0) {
eval("\$cpjoin .= \"".gettemplate("customize_2")."\";");
} else {
eval("\$cpjoin .= \"".gettemplate("customize_3")."\";");
}

}
---
Now I want to put $cpjoin in customize_1 template, so the if cpbenabled statment will have two different out comes and show two different things. But when I use this code it shows nothing either way.. do you know where my problem is?

Thanks for your time
- Neo


All times are GMT. The time now is 09:10 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.01114 seconds
  • Memory Usage 1,743KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete