vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Where should I store these variables? (https://vborg.vbsupport.ru/showthread.php?t=196911)

JamesAB 11-22-2008 01:07 AM

Where should I store these variables?
 
I am planning on creating some custom stats once per day and storing the results in a mySQL table.

I'd like to display the stats on FORUMHOME and a few other places.

I'm thinking that adding another query to each of these pages for information that is only updated every 24 hours may be a waste of resources.
  1. Should I try to figure out a way to store each of the stats as a vBulletin phrase?
  2. Should I store them in a flat file elsewhere?
  3. Should I just get them from a mySQL query every time?
  4. Or is there a better way to look at this?
I'm looking for the most efficient way to handle this on a busy forum.

Thanks,

James

Dismounted 11-22-2008 08:00 AM

You can use the vBulletin datastore to store such data. I believe there is an article about this - look for it.

Antivirus 11-22-2008 01:51 PM

Datastore is definitely the way to go. Have yur script run as a scheduled task once per day, storing the info in the datastore, then using a plugin in forumhome you can simply acces the data using $vbulletin->mydatastorefield. The article Dismounted mentions above is excellent. I think you can find it by searching the articles forum for the term cache or serialize

JamesAB 11-23-2008 06:11 PM

Thanks for the replies Dismounted & Antivirus.

I didn't realize (until now) that the vBulletin datastore could be extended this way. It sounds like just the solution I need.

Thanks again,
James


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.00967 seconds
  • Memory Usage 1,711KB
  • 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
  • (4)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