vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [release] hack pt 2 for global.php - makes the smilie look up (https://vborg.vbsupport.ru/showthread.php?t=2987)

09-06-2000 04:07 PM

This hack really reduces the load on your database server.

Each time you view a thread the php does

SELECT allowbbcode,allowhtml,allowimages,allowsmilies FROM forum WHERE forumid=$forumid

SELECT smilietext,smiliepath FROM smilie


SELECT findcode,replacecode FROM bbcode

_Per_ message.

This hack makes it happen once per thread. Basically it
caches the lookups in a local lookup table and hey presto
cuts down the hits on the database ...

To see what a difference this makes turn logging on in mysql and watch the before and after..

This is a replacement for bbcodeparse2

Go to http://forums.gameplay.com/global_hack_pt2.html
to download as it's rather large ;-)

Fodder

09-06-2000 09:20 PM

What if the first user to post chooses to parse smilies in their post but the second user doesnt? Then what happens?

~Chris

09-07-2000 07:04 AM

Exactly what was wanted (AFAIK)

All i've changed was the lookup bit. The only
problem is if someone adds a new smilie and
someone uses it in their post if they manage
to post the smilie and the message in
the time that the page takes to load.
But taken as though that page wouldn't
pick up their post i don't see it as much of a
problem :-)

Fodder


All times are GMT. The time now is 08:22 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.01021 seconds
  • Memory Usage 1,710KB
  • 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