Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

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
  #212  
Old 01-17-2006, 01:03 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, well here is your solution to all the bugs. One problem is its in english and not php...

You need to parse out multiple white spaces + newlines in all of the code, you also need to remove html comments. HOWEVER you must ignore anything between <pre> <textarea> and <script> tags.

Ok well theres the brief... i'll see what i can do in a bit. (I think a good starting place would be to see how Vb3.5 handles bb tags especially the [nocode] tag or whatever it is that prevents bb code parsing between it.)

edit:
Well i've been messing arround for a bit and havn't got anywhere... The only 'hacked' solution i could come up with is to match the text area tags to a variable do the white space removal and put the text areas back in again.
Reply With Quote
  #213  
Old 01-18-2006, 03:07 AM
ryuji ryuji is offline
 
Join Date: Jan 2006
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when i get bored ill try my hand at making it conditional... but with my setup it appears immune to the issue unless i use the commented out line of code instead of what i actualy had enabled
Reply With Quote
  #214  
Old 01-18-2006, 03:12 AM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this problem is really bugging me now... i haven't been able to come up with a singal working regex expression...
Reply With Quote
  #215  
Old 01-18-2006, 03:33 PM
Guest210212002
Guest
 
Posts: n/a
Default

Leaving it installed but disabling it for now. The linebreaks in advanced mode are just impossible to work around.
Reply With Quote
  #216  
Old 01-19-2006, 02:42 AM
Guest210212002
Guest
 
Posts: n/a
Default

Can this be modded to only strip commented out code?
Reply With Quote
  #217  
Old 01-19-2006, 09:33 AM
ryuji ryuji is offline
 
Join Date: Jan 2006
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes. comment out the fist replacment command
Reply With Quote
  #218  
Old 01-20-2006, 12:55 PM
voleibolmurcia voleibolmurcia is offline
 
Join Date: Dec 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How could i make that the text...

[Output: 37.45 Kb. compressed to 36.00 Kb. by saving 1.45 Kb. (3.87%)]

be in the same color that the background?

I dont find the template o the code in the footer for this hack.

Thank u.
Reply With Quote
  #219  
Old 01-20-2006, 01:33 PM
Guest210212002
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by voleibolmurcia
How could i make that the text...

[Output: 37.45 Kb. compressed to 36.00 Kb. by saving 1.45 Kb. (3.87%)]

be in the same color that the background?

I dont find the template o the code in the footer for this hack.

Thank u.
From what I can tell by reading the thread a few times (don't hold me to this) the compression, and that expression, are processed before the templates themselves.

Your best bet is to try editing the plugin itself.
Reply With Quote
  #220  
Old 01-20-2006, 03:07 PM
ryuji ryuji is offline
 
Join Date: Jan 2006
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chris-777
From what I can tell by reading the thread a few times (don't hold me to this) the compression, and that expression, are processed before the templates themselves.

Your best bet is to try editing the plugin itself.
actualy... what he wants to change is processed after the page is completely made... so its after the templates
Reply With Quote
  #221  
Old 01-20-2006, 09:10 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just open the xml and find this line

Code:
$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);
Reply With Quote
Reply


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 11:32 AM.


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.09416 seconds
  • Memory Usage 2,297KB
  • 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
  • (2)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
  • (8)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