vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   query photopost db and output $ in vb template? (https://vborg.vbsupport.ru/showthread.php?t=92402)

b6gm6n 07-17-2005 08:40 PM

query photopost db and output $ in vb template?
 
Hi, i wonder if you can help me...

I had a few lines of code which simply counted the amount of photos in my photopost database which i could then output via a string thus : echo $totals;

this worked well, it showed in my header when i was using IPB, now whatever i try, i.e placing that simple echo statement in my vb header it outputs nothing...

so is there an easier way or something i'm missing to achieve this correctly? - thankyou, it's something i'd like to solve and understand, cheers

(note both my vb and photopost reside in the same database)

-b6

Link14716 07-17-2005 08:42 PM

Put $totals in your header template (and the rest of the code in phpinclude_start).

b6gm6n 07-17-2005 08:43 PM

ok, i'll give that a try now...cheers

i'm at a loss as to where 'phpinclude_start' is... a template? or a place within the common templates i have to place my code?

-b6

i cannot find that template, i'm using 3.5b4... did they remove it i wonder...

-b6

hooks, plugins, global start?...am i on the right track... i'll see what i can do...

sussed it...

created a new plugin, added my code, chose a hook location (i chose : global_start) then simply added "serving $totalusers members with $totalphotos pictures" to my header template...

easy really once you know how :)

-b6


All times are GMT. The time now is 02:40 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.01100 seconds
  • Memory Usage 1,706KB
  • 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
  • (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