Thread: New Template
View Single Post
  #1  
Old 10-20-2006, 07:43 AM
Virtex-II Virtex-II is offline
 
Join Date: Feb 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default New Template

How can I use a new template created for a specific function? I see, for example, that a pagenav template exits and it is called by:

PHP Code:
$pagenav 
How can I call my new template? If I try the same call it doesn't work.

I found this article and tried to do as it says but got a problem. What I am trying to realize is a lefted pagenav to use it only in some at the end of the showthread page. I created the template and called it pagenav_left. Then I followed the procedure described in that thread and created the two plugins (one in cache_templates and the second in global_start).

That's the pagenav_left template:

PHP Code:
<div class="pagenav" align="$stylevar[left]">
<
table class="tborder" cellpadding="3" cellspacing="$stylevar[cellspacing]border="0">
<
tr>
    <
td class="vbmenu_control" style="font-weight:normal"><phrase 1="$pagenumber2="$totalpages">$vbphrase[page_x_of_y]</phrase></td>
    <if 
condition="$show['first']"><td class="alt1"><class="smallfont" href="$address$address2title="$vbphrase[first_page] - <phrase 1="$firstnumbers[first]" 2="$firstnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>"><strong>&laquo;</strong$vbphrase[first]</a></td></if>
    <if 
condition="$show['prev']"><td class="alt1"><class="smallfont" href="$address<if condition="$prevpage != 1">&amp;page=$prevpage</if>$address2title="$vbphrase[prev_page] - <phrase 1="$prevnumbers[first]" 2="$prevnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">&lt;</a></td></if>
    
$pagenav
    
<if condition="$show['next']"><td class="alt1"><class="smallfont" href="$address&amp;page=$nextpage$address2title="$vbphrase[next_page] - <phrase 1="$nextnumbers[first]" 2="$nextnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">&gt;</a></td></if>
    <if 
condition="$show['last']"><td class="alt1"><class="smallfont" href="$address&amp;page=$totalpages$address2title="$vbphrase[last_page] - <phrase 1="$lastnumbers[first]" 2="$lastnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">$vbphrase[last] <strong>&raquo;</strong></a></td></if>
    <if 
condition="$show['popups']"><td class="vbmenu_control" title="$address$address2"><a name="PageNav"></a></td></if>
</
tr>
</
table>
</
div
and those are the two plugins:

PHP Code:
$globaltemplates[] = 'pagenav_left'
used in cache_templates


PHP Code:
eval('$pagenav_left = "' fetch_template('pagenav_left') . '";'); 
used in global_start


This doesn't work. Can someone help me please?


Best Regards
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01345 seconds
  • Memory Usage 1,818KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete