vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Advanced Templates: Dynamic Templates Changing according to different conditions (https://vborg.vbsupport.ru/showthread.php?t=43325)

Logician 09-23-2002 08:27 AM

Quote:

Originally posted by trainer
what is this like on server load? it seems to be pretty hard on my site. any ideas?
IMO it's performance is quite good. For once there is no extra SQL connection this hacks creates on your site so it doesnt increase MySQL load. As for PHP performance, it's quite bearable and the increase is very trivial (at least in my site). Check my message a few lines above for its reason. But if you want to make sure, install Nakkid's (Teck) microstats hack and check the PHP running time before and after the hack. There is no significant load in my site..

But if you want to improve the performance better, here is a code I was already planning to add to the hack:

edit functions.php, find:
PHP Code:

return advanced_templates($template); 

Replace it AS:
PHP Code:

if (substr_count($template,'[[/(')>=1)
{
return 
advanced_templates($template);
}
else
{
return 
$template;


This will stop parsing for regular templates (=not having conditionals inside) thus will increase the performance..

BTW. Did my suggestion work for your problem?

trainer 09-23-2002 01:23 PM

once again thanks for the reply Logician. your sugestion worked for my first problem. didn't even know what that was until you pointed it out!

Marshalus 10-02-2002 04:19 PM

Does anyone know if this adds any additional DB queries?

Logician 10-02-2002 04:37 PM

Quote:

Originally posted by Marshalus
Does anyone know if this adds any additional DB queries?
No it does not..

Please check 2 posts above..

BlueVoltage 10-04-2002 04:42 PM

I tried installing this twice! I keep getting this error:

Quote:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/xelerix/public_html/x/admin/functions.php on line 823

Fatal error: Call to undefined function: vbdate() in /home/xelerix/public_html/x/admin/sessions.php on line 407

BlueVoltage 10-04-2002 04:42 PM

I tried installing this twice! I keep getting this error:

Quote:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/xelerix/public_html/x/admin/functions.php on line 823

Fatal error: Call to undefined function: vbdate() in /home/xelerix/public_html/x/admin/sessions.php on line 407

Logician 10-04-2002 05:36 PM

Quote:

Originally posted by BlueVoltage
I tried installing this twice! I keep getting this error:

If you are sure you applied step 2 correctly (it is REPLACE AS, not insert BEFORE or AFTER, and make sure you changed the file in Notepad), post here your functions.php just lines between 810 - 850, not the whole file) and let me see what you did wrong..

BlueVoltage 10-04-2002 10:17 PM

i got it now. sorry. GREAT HACK!!!

mikey8270 10-04-2002 11:07 PM

great hack :)

is there any way to make it show like 'You have relied to this thread' or You have not replied to this thread' somewhere on the showthread page to everybody except guests?

g-force2k2 10-05-2002 02:32 AM

meh... okay Logician buddy im looking to you for support now :p

anways i get the infamous 6==6 as stated in the past posts...

only problem is i don't use debug mode for the templates (i checked) and i even made the appropriate change just incase and it didn't seem to solve my problem ;P either way excellent hack...

its probably just something 'stupid' ;) anyways could it have anything to do with php version? thanks in advance man... superb work as always :)

g-force2k2


All times are GMT. The time now is 12:43 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.01351 seconds
  • Memory Usage 1,745KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete