vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   query mania postings? (https://vborg.vbsupport.ru/showthread.php?t=43982)

g-force2k2 09-27-2002 01:48 AM

query mania postings?
 
well i won't confirm anything so far... but i was working on a hack earlier to day and was trying to balance the query effect by using the $templatesused variable :p only thing was one doesn't exist in the postings.php

now i don't know if this is some mistake or if it was just not done for a reason (could be no?) but anyways take what you want from it... reduces queries on all admin option tasks (moving, deleting, editing, merging, splitting) from 1 - 2 per each action and not to mention all of the errors & redirects... again no confirmation of any sort... im just helping fellow vbhackers :p

If anyone wants to head it over to vb.com be my guest ;) i don't visit there but maybe one of the staffers here could suggest something...

anyways for the fix open postings.php

find:

PHP Code:

require('./global.php'); 

and above it add:

PHP Code:

$templatesused 'threads_editthread,threads_deletepostsbit,threads_deleteposts,forumjumpbit,threads_move,threads_merge,threads_splitthreadbit,threads_splitthread';
$templatesused.= ',error_invalidid,threads_displayip,error_moveillegalforum,error_movesameforum,error_mergebadurl,error_mergewithself,error_cantsplitone,error_nosplitposts,error_cantsplitall';
$templatesused.= ',redirect_openclose,redirect_threadclosed,redirect_deletethread,redirect_deleteposts,redirect_movethread,redirect_editthread,redirect_mergethread,redirect_splitthread,redirect_sticky'

regards... hope someone finds some use for this :p

g-force2k2

Scott MacVicar 09-27-2002 10:06 AM

Thats because there is barely any templates used in postings.php and its hardly ever called, there will be a bigger overhead with that large query than just loading the two or three templates seperately.

TECK 09-29-2002 01:28 AM

g-forece, if you do this, you load the cache with unneeded templates (extra server memory used). PPN's explanation is very true.


All times are GMT. The time now is 11:37 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.00905 seconds
  • Memory Usage 1,716KB
  • 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
  • (2)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