Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Realtime Template Compressor: Reduces page sizes, loads pages faster, saves bandwidth Details »»
Realtime Template Compressor: Reduces page sizes, loads pages faster, saves bandwidth
Version: 1.1.0, by ShiningArcanine ShiningArcanine is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.0 Beta 1 Rating:
Released: 06-16-2005 Last Update: 06-16-2005 Installs: 274
Uses Plugins
 
No support by the author.

This is a port of Logican's Realtime Template Compressor hack from vBulletin 2.2.x to vBulletin 3.5.0 Beta 1. I wrote this by rewriting a version of the original hack, that I wrote for my forums when they ran 3.0.x, so that it would function as a plugin for 3.5.0.

I had originally sent this to Logican for him to release it but he replied granting me permission to release it; hence why I'm releasing this.

Installation is very simple. Just import the plugin via vBulletin's "Download / Upload Plugins" page in the Plugin System in the Admin Control Panel and you're done.

I'll try to correct any bugs that you might find. Let me know if you like this plugin and don't forget to click the install link if you install this.

Update History


Version 1.1.0: The expression was replaced with a more efficient one that increases the compression level from approximately 1-2% to approximately 4-8%.
Version 1.0.0: Initial Release

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #192  
Old 01-11-2006, 04:19 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Two screen shots to confirm no issue with advanced editor or spacing issues with post titles.
Reply With Quote
  #193  
Old 01-11-2006, 04:26 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Julie
I'd like to re-install this as well... It's just the space-bug that's killing it for me. Many of my users like to add extra spacing in titles, etc, and this kills them :S

I have tested this on 3.5.3, before the plugin, in titles adding 10 extra spaces in between two words on a new post title, the extra spacing was stripped away by default.

This addon is not the cause as far as i can tell.

Added Note:
Want to thank ShiningArcanine & Logican for their work, great mod and good savings for the site.
Reply With Quote
  #194  
Old 01-11-2006, 09:17 PM
ryuji ryuji is offline
 
Join Date: Jan 2006
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

these are the results of my experiments with the code... this one doesnt break anything and ill see if i can figure out a way to make it not bust javascript

PHP Code:
//Logician Hack:
//$page_byte=strlen($output);

//this broke scripts on my setup, if you want to test, click on 'more' smileys in advanced editor or try to bring up the user popup when you click on there name on a thread
                //$output=preg_replace ('/(\s*)\r\n(\s*)/', "", $output);
//this broke scripts on my setup, if you want to test, click on 'more' smileys in advanced editor or try to bring up the user popup when you click on there name on a thread


$output=preg_replace ('/\r\n(\s*)/'"\r\n"$output);
$output=preg_replace ('/<!-- .*? -->/',"",$output);


//$pagenew_byte=strlen($output);
//$page_kilobyte=number_format(($page_byte/1024),2);
//$pagenew_kilobyte=number_format(($pagenew_byte/1024),2);
//$pagesaved_byte=$page_byte-$pagenew_byte;
//$pagesaved_kilobyte=number_format((($pagesaved_byte)/1024),2);
//$pagesaved_perc=number_format(((100*$pagesaved_byte)/$page_byte),2);

//$output = str_replace('</body>', '<center><span class="smallfont">[Output: ' . $page_kilobyte . ' Kb. compressed to <b>' . $pagenew_kilobyte . '</b> Kb. by saving <b>' . $pagesaved_kilobyte . '</b> Kb. (' . $pagesaved_perc . '%)]</span></center></body>', $output);
//Logician Hack: 
remove the comments to re-enable the compression efficiency dialog
Reply With Quote
  #195  
Old 01-12-2006, 06:05 PM
rootnik rootnik is offline
 
Join Date: Jun 2002
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works good, but kills javascript roll overs in my headers. :disappointed:
Reply With Quote
  #196  
Old 01-13-2006, 06:58 AM
exegete exegete is offline
 
Join Date: Feb 2003
Location: Sydney, Australia
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The solution to the paragraph bug is to alter the regular expression in such a way that newline characters appearing between textarea tags are left untouched.

I leave this as an exercise for the reader.
Reply With Quote
  #197  
Old 01-14-2006, 08:34 PM
tantawi tantawi is offline
 
Join Date: Sep 2002
Location: Egypt
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by exegete
The solution to the paragraph bug is to alter the regular expression in such a way that newline characters appearing between textarea tags are left untouched.

I leave this as an exercise for the reader.
Any reader in there?
Reply With Quote
  #198  
Old 01-15-2006, 06:44 AM
interceptor's Avatar
interceptor interceptor is offline
 
Join Date: Sep 2004
Location: Slovenia
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great on 3.5.3 Install
Reply With Quote
  #199  
Old 01-15-2006, 09:56 AM
Ramsesx's Avatar
Ramsesx Ramsesx is offline
 
Join Date: Aug 2005
Location: Southern Germany
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rootnik
Works good, but kills javascript roll overs in my headers. :disappointed:
Installed with 3.5.0 and my button rollovers are working fine.
[Output: 177.75 Kb. compressed to 148.49 Kb. by saving 29.27 Kb. (16.46%)] Forumhome
[Output: 121.07 Kb. compressed to 115.58 Kb. by saving 5.49 Kb. (4.53%)] CMPS
[Output: 260.35 Kb. compressed to 244.70 Kb. by saving 15.64 Kb. (6.01%)] Forum Thread
[Output: 139.21 Kb. compressed to 134.20 Kb. by saving 5.01 Kb. (3.60%)] VB Gallery Home
[Output: 205.49 Kb. compressed to 203.91 Kb. by saving 1.59 Kb. (0.77%)] Links Directory
Reply With Quote
  #200  
Old 01-15-2006, 03:00 PM
Club3G Club3G is offline
 
Join Date: Aug 2004
Location: Orlando, Fl
Posts: 300
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As in the original XML: CMPS: [Output: 67.37 Kb. compressed to 66.30 Kb. by saving 1.07 Kb. (1.59%)]
Index: [Output: 81.60 Kb. compressed to 79.29 Kb. by saving 2.31 Kb. (2.83%)]
Forumdisplay: [Output: 104.74 Kb. compressed to 98.30 Kb. by saving 6.44 Kb. (6.15%)]

And now with this added:
Code:
$output=preg_replace ('/<!-- .*? -->/',"",$output);
CMPS: [Output: 67.15 Kb. CMP 64.81 Kb. Net 2.35 Kb. (3.50%)]
Index: [Output: 81.83 Kb. CMP 76.14 Kb. Net 5.69 Kb. (6.95%)]
Forumdisplay: [Output: 99.72 Kb. CMP 90.69 Kb. Net 9.03 Kb. (9.05%)]

Stripping the comments works really, really well. No bugs at all in 3.5.3 with plenty of mods. One thing I wouldn't mind seeing added is something that keeps a running tally of the total compressed kB savings. It'd be great to know at the end of the month just how much this is saving me. Also being able to only display this to admins would be ultimate. I'd strip the output code altogther, but I'm way too much of a dork to go without it.

Quick math for http://www.sevenstring.org

Average hits per day over the last week: 220880
Avg hits * 9.05k savings: 1998964
Average bandwith savings over 30 days: 1.90636 GB

Solid mod. Thanks much.

[high]* Club3G clicks install[/high]
Reply With Quote
  #201  
Old 01-15-2006, 10:54 PM
Club3G Club3G is offline
 
Join Date: Aug 2004
Location: Orlando, Fl
Posts: 300
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bah, spoke too soon. Also have the paragraph bug. ;(
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05996 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete