vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   New Template (https://vborg.vbsupport.ru/showthread.php?t=129521)

Virtex-II 10-20-2006 07:43 AM

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

error_22 10-25-2006 08:05 PM

take a look at this thread:

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

Hope that helps

Niklas


All times are GMT. The time now is 08:50 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.01063 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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