Log in

View Full Version : query mania postings?


g-force2k2
09-27-2002, 01:48 AM
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:

require('./global.php');

and above it add:

$templatesused = 'threads_editthread,threads_deletepostsbit,threads _deleteposts,forumjumpbit,threads_move,threads_mer ge,threads_splitthreadbit,threads_splitthread';
$templatesused.= ',error_invalidid,threads_displayip,error_moveille galforum,error_movesameforum,error_mergebadurl,err or_mergewithself,error_cantsplitone,error_nosplitp osts,error_cantsplitall';
$templatesused.= ',redirect_openclose,redirect_threadclosed,redirec t_deletethread,redirect_deleteposts,redirect_movet hread,redirect_editthread,redirect_mergethread,red irect_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.