The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Realtime Template Compressor: Reduces page sizes, loads pages faster, saves bandwidth Details »» | |||||||||||||||||||||||||||
Realtime Template Compressor: Reduces page sizes, loads pages faster, saves bandwidth
Developer Last Online: Nov 2023
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
|
Comments |
#22
|
|||
|
|||
I just noticed that in the "new posts" page, the topic titles are crammed against the "go to first new post" icon. There is no space in between. It's fine everywhere else though.
|
#23
|
|||
|
|||
That alternate expression was experimental, which is why I said that I was still playing with it. Here is the new one I'm playing with:
Quote:
|
#24
|
|||
|
|||
It seems that I made writing expressions more complicated than it needed to be. ^_^;;
I wrote something entirely new that I think will be much more efficient so I've released version 1.1.0. |
#25
|
||||
|
||||
Your current regex kills whitespaces that are there intentionally.
And you could achieve higher compression if you remove HTML comments. However, this might cause problems with JavaScript then. |
#26
|
|||
|
|||
KirbyDE, aren't all of the whitespaces there intentionally? The regex in 1.0.0 was Logician's original regex but it didn't compress things well enough and my attempts at an advanced regex compressed things so well that it killed whitespaces that are necessary for the presentation so I wrote a simpler regex that strips the whitespaces at the beginning of each line.
It doesn't have any effect on how you view the page unless you're viewing the XHTML. If you were viewing the XHTML, you would not have any level of template compression enabled on your forums. I have this installed on my forums if you want to check it out: http://www.pokemonfanuniverse.com/forums/ By the way, thanks for the tip regarding the comments. I was considering stripping them in a new version but I didn't realize that stripping them might affect javascript. Looking at the syntax Jelsoft used I could probably strip them either by ensuring they're on a single line or by also requring the whitespace found after "<!--" in comments but not in the javascript (from what I can see). Edit: Also, if anyone is interested in why vBulletin strips slashes from the plugin upon submit/edit, they'll want to check out this bug report at vBulletin.com: http://www.vbulletin.com/forum/bugs3...view&bugid=184 It should be fixed in vBulletin 3.5.0 Beta 2 from what I can gather. |
#27
|
||||
|
||||
What about that
Code:
The following line has 4 spaces at the beginning Test |
#28
|
|||
|
|||
Quote:
|
#29
|
||||
|
||||
This is the stock [code] Tag
It generates <pre>-Tags, which should preserve whitespaces - but you strip them out. |
#30
|
|||
|
|||
Quote:
By the way, shouldn't Logician's orignal regex also have stripped out those whitespaces? |
#31
|
|||
|
|||
I use
$output=preg_replace ('/(\s*)\r\n(\s*)/', "", $output); $output=preg_replace ('/<!-- .*? -->/',"",$output); and get about 15% compression, don't know why you still need the \r\n? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|