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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 10-25-2006, 08:05 PM
error_22 error_22 is offline
 
Join Date: Nov 2004
Location: Stockholm, Sweden
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

take a look at this thread:

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

Hope that helps

Niklas
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 08:52 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.03121 seconds
  • Memory Usage 2,197KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)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