Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2008, 03:11 PM
Jhonnyf's Avatar
Jhonnyf Jhonnyf is offline
 
Join Date: Nov 2007
Location: In my mind
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default ?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
Reply With Quote
  #2  
Old 06-13-2008, 03:34 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have called custom templates from my postbit templates, but I have had to write a plugin to include the template first.
Reply With Quote
  #3  
Old 06-13-2008, 03:51 PM
Jhonnyf's Avatar
Jhonnyf Jhonnyf is offline
 
Join Date: Nov 2007
Location: In my mind
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 06-13-2008, 04:02 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure you are editing appropriate postbit or postbit_legacy template depending on which you are using.
Reply With Quote
  #5  
Old 06-13-2008, 10:41 PM
Jhonnyf's Avatar
Jhonnyf Jhonnyf is offline
 
Join Date: Nov 2007
Location: In my mind
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 06-14-2008, 06:45 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have a look at the template hooks inside the templates. Most likely, you will find a location you can use.
Reply With Quote
  #7  
Old 06-14-2008, 08:17 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

You may need to use [minicode]$GLOBALS[Mytemplate][/minicode]
Reply With Quote
  #8  
Old 06-14-2008, 01:04 PM
Jhonnyf's Avatar
Jhonnyf Jhonnyf is offline
 
Join Date: Nov 2007
Location: In my mind
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
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 View Post
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
Reply With Quote
  #9  
Old 06-14-2008, 03:46 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So did you try $GLOBALS as I suggested?
Reply With Quote
  #10  
Old 06-14-2008, 09:09 PM
Jhonnyf's Avatar
Jhonnyf Jhonnyf is offline
 
Join Date: Nov 2007
Location: In my mind
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
So did you try $GLOBALS as I suggested?
Fine!!! that was a solution.... Thank You!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:16 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.04594 seconds
  • Memory Usage 2,255KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete