vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Creating a new vb template... (https://vborg.vbsupport.ru/showthread.php?t=64275)

b6gm6n 04-23-2004 07:57 AM

Creating a new vb template...
 
I'm trying to make a template for vb named 'gallery_stats'

Its basically the stats of my photopost gallery, i want this to be shown at the bottom of the 'whats going on' box

My vb & pp databases are combined btw...

I created a new template named 'gallery_stats'
would i be right to call it up in my forumhome template with the line : $gallery_stats ?

I tried just altering the forumhome template to show the PP strings like this :
$totalphotos - but nothing showed up, must i somehow call upon or identify these PP strings first?

below it my gallery_stats template

Please advise
cheers
-b6

<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">Gallery
Statistics" border="0" /></td>
<td class="alt1">
<div class="smallfont">
<div>Photos- $totalphotos, comments: $posttotal, views:
$totalviews</div>
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">diskspace
: $diskspace, Views : $totalviews</phrase>
</div>
</div>
</td>
</tr></tbody>

Scrub 04-23-2004 08:06 AM

Add this:

PHP Code:

eval('$totalphotos = "' fetch_template('gallery_stats') . '";'); 

Or this:

PHP Code:

eval('$gallery_stats = "' fetch_template('gallery_stats') . '";'); 

Above

PHP Code:

eval('print_output("' fetch_template('FORUMHOME') . '");'); 

in index.php. Then you can put $totalphotos or $gallery_stats (Depending on which one you used in the eval) anywere in forumhome template. :)

b6gm6n 04-23-2004 08:23 PM

thankyou, i'll try it later, cheers

-b6


All times are GMT. The time now is 06:11 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.01789 seconds
  • Memory Usage 1,713KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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