vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   ?Why in template postbit I can't call a Custom Template? (https://vborg.vbsupport.ru/showthread.php?t=182390)

Jhonnyf 06-13-2008 03:11 PM

?Why in template postbit I can't call a Custom Template?
 
¿Why in template postbit I can't call a Custom Template?

I try in Navbar, SHOWTHREAD, etc and work fine, but in Postbit not work

It normal that the Custom template can't call in POSTBIT or it's a problem with my forum?

Thank You

Lynne 06-13-2008 03:34 PM

I have called custom templates from my postbit templates, but I have had to write a plugin to include the template first.

Jhonnyf 06-13-2008 03:51 PM

I do that, my Template work in another template, but not in postbit

I use this manual

How To Include A Custom Template Via Plugins

I repeat, Work fine in another template, but no in Postbit

thank you

Opserty 06-13-2008 04:02 PM

Make sure you are editing appropriate postbit or postbit_legacy template depending on which you are using.

Jhonnyf 06-13-2008 10:41 PM

Yes I only use postbit template, I try write (and Work):

<h1>Hello</h2>

I try with (In the same position and not work):
$Mytemplate


And the template have the same code, I use in another Template and work, only in postbit don't work

--------------- Added [DATE]1213406136[/DATE] at [TIME]1213406136[/TIME] ---------------

I try use Autotemplate and not work
Code:

$vbulletin->templatecache['postbit'] = str_replace('<div id="post_message_$post[postid]">', '<div id="post_message_$post[postid]">'.$vbulletin->templatecache['DioAdsensePrimeroUltimoPost'],$vbulletin->templatecache['postbit']);
$vbulletin->templatecache['navbar'] = str_replace('<!-- / nav buttons bar -->', '<!-- / nav buttons bar -->'.$vbulletin->templatecache['DioAdsenseNavbar'],$vbulletin->templatecache['navbar']);

The navbar code work, but the posbit code not work.......:erm:

I Try this in 3 diferents Forums and always the same, not work in Posbit

Dismounted 06-14-2008 06:45 AM

Have a look at the template hooks inside the templates. Most likely, you will find a location you can use.

Opserty 06-14-2008 08:17 AM

What are the hook locations and plugin code you are using?

You may need to use [minicode]$GLOBALS[Mytemplate][/minicode]

Jhonnyf 06-14-2008 01:04 PM

Quote:

Originally Posted by Dismounted (Post 1548971)
Have a look at the template hooks inside the templates. Most likely, you will find a location you can use.

The Idea is use my template or autohook, not touch (move) the hook inside the template. I see a error using templates in postbit because I use try this in 3 diferent Forums (or maybe I don't use some option)

Quote:

Originally Posted by Opserty (Post 1549004)
What are the hook locations and plugin code you are using?

You may need to use [minicode]$GLOBALS[Mytemplate][/minicode]

I use this:
on GLOBAL_START
PHP Code:

eval('$DioNavbar= "' fetch_template('DioNavbar') . '";');
eval(
'$DioPrimeroUltimoPost= "' fetch_template('DioPrimeroUltimoPost') . '";');
eval(
'$DioSearch_results= "' fetch_template('DioSearch_results') . '";');
eval(
'$DioSHOWTHREAD= "' fetch_template('DioSHOWTHREAD') . '";'); 

on cache_templates
PHP Code:

$globaltemplates array_merge($globaltemplates, array('DioNavbar','DioSearch_results','DioSHOWTHREAD','DioPrimeroUltimoPost')); 

All Custom Template work fine in another Templares, but in postbit not :mad:

Opserty 06-14-2008 03:46 PM

So did you try $GLOBALS as I suggested?

Jhonnyf 06-14-2008 09:09 PM

Quote:

Originally Posted by Opserty (Post 1549267)
So did you try $GLOBALS as I suggested?

Fine!!! that was a solution.... Thank You!


All times are GMT. The time now is 10:26 PM.

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.01043 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete