Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Compress Forum Templates (Speed up your Forums & Save Bandwidth) Details »»
Compress Forum Templates (Speed up your Forums & Save Bandwidth)
Mod Version: 2.8, by Trigunflame (Coder) Trigunflame is offline
Developer Last Online: Jan 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.7 Rating: (10 votes - 4.40 average) Installs: 95
Released: 14 Apr 2005 Last Update: Never Downloads: 8
Supported  

Compress Forum Templates & Phrases
Speed up your Forums & Save Bandwidth


Description:

Hi, this is a pretty simple hack that involves compressing the 'compiled' version of your templates, this way it only compresses the part thats to be shown on the forum and not the actual template data you edit.

Background:

Got the idea from Zero Tolerance in buro9's thread:
http://www.vbulletin.org/forum/showthread.php?t=69787

The above hack compresses the page at parse time, while it provides some speed enhancement, on large pages you can actually "negate" the point of using the hack in the first place, because of the overhead in compression.

Thus, the creation of this hack is to provide similiar functionality, but done in the adminCP; and without the overhead of constant compression.

Info:

No Queries. Only query is used when compressing your templates, the rest of the time its just pulling the templates straight out of the database like normal.

Updates:

Version 2.8 - Added Strip Whitespace from Start of JS Line by buro9
Version 2.7 - Option to strip HTML Comments from Compressed Output
Version 2.6 - Removed Phrase Compression altogether, Too Iffy
Version 2.5 - Removed the ASCII \n removal, emails should work now.
Version 2.4 - Had to add editor_jsoptions_size to the Bad Templates array, it also was causing a font selection error.
Version 2.3 - Added Phrase compression support, should help further increase page compression.
Version 2.2 - Slightly Recoded Template compression for faster results.
Version 2.1 - Added php_include templates to bad templates, will not compress these.
Version 2.0 - Recoded Script, added support for certain templates to not compress
Version 1.9 - Re-Added support for InLine Styles.
Version 1.8 - Removed support for InLine Styles, all Style data is left with Linebreaks.
Version 1.7 - Removed support for InLine Javascript, all JavaScript is left with Linebreaks.
Version 1.6 - Fixed Tab problem, tabs are replaced with a single space
Version 1.5 - Removed a part of the SQL.
Version 1.4 - TOTALLY Remade, Works perfect now; Ultimate Compression
Version 1.3 - Adjusted Again
Version 1.2 - Adjusted Stripping regex
Version 1.1 - Added Uncompress Support
Version 1.0 - Release

Install:

Step 1. [ Open admincp/template.php ]
Step 2. [ Go to about line: 1278, or just look for $_REQUEST['do'] == 'edit' ]
Step 3. [ Above Step 2, add the below code ]


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 4. [ close admincp/template.php and open admincp/index.php ]
Step 5. [ look for ]


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 6. [ below this, add the code ]


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

How-To Run

1. Install
2. In the admincp left navigation, select "Compress Templates".
3. Repeat Step 2 after each modification of your Templates whenever you decide to change something.
4. If you want to uncompress all Templates, select "Uncompress Templates"
5. IF Any Templates Come Out Weird, add the template Name to the Bad Templates Array and Re-Run the Compress Templates.

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	example.JPG
Views:	1191
Size:	423.0 KB
ID:	25733

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Compress Forum Templates Trigunflame vBulletin 3.5 Add-ons 185 26 Feb 2012 01:53
Save bandwidth with CSS. Brad vBulletin 2.x Template Modifications 14 05 Nov 2005 18:11

  #31  
Old 16 Apr 2005, 08:54
Blam Forumz's Avatar
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
it just displays my alt tag
Reply With Quote
  #32  
Old 16 Apr 2005, 09:52
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Originally Posted by Blam Forumz
it just displays my alt tag
Update;

Contact with Blamz, fixed problem.

Notice;

Everyone, even if you have installed this hack. REINSTALL it with the latest code, it drastically changes some stuff that would cause errors otherwise..

Last edited by Trigunflame : 16 Apr 2005 at 10:13.
Reply With Quote
  #33  
Old 16 Apr 2005, 10:20
jcr jcr is offline
 
Join Date: Apr 2004
New version installed, just one quickie before I do anything;

Should I uncompress before applying the new way to compress?


Edit:

One more thing, the reputation images gets very seperated after this hack :-/

Last edited by jcr : 16 Apr 2005 at 10:29.
Reply With Quote
  #34  
Old 16 Apr 2005, 10:28
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Originally Posted by jcr
New version installed, just one quickie before I do anything;

Should I uncompress before applying the new way to compress?
Nah, everytime you select compression, its source is from the "editable" version of the templates.

In other words, everytime you select Compress Templates its compressing them freshly.
Reply With Quote
  #35  
Old 16 Apr 2005, 10:30
jcr jcr is offline
 
Join Date: Apr 2004
Originally Posted by Trigunflame
Nah, everytime you select compression, its source is from the "editable" version of the templates.

In other words, everytime you select Compress Templates its compressing them freshly.
wow, great! Absolutely great! , See my other edited question also if you have time (about the reputation images), otherwise, thank you for a great hack, and fast support
Reply With Quote
  #36  
Old 16 Apr 2005, 10:36
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Originally Posted by jcr
One more thing, the reputation images gets very seperated after this hack :-/
Mine does'nt :/

Try uncompress/compress, if that doesn't work, paste the html code of posts where this is affected, if I see what the html looks like I may can help you.

Almost post a screenshot.
Attached Images
File Type: jpg rep.JPG (146.2 KB, 46 views)

Last edited by Trigunflame : 16 Apr 2005 at 10:39.
Reply With Quote
  #37  
Old 16 Apr 2005, 10:39
Deimos Deimos is offline
 
Join Date: Oct 2002
Works aok for me, not sure if I see much of a difference performance wise
Reply With Quote
  #38  
Old 16 Apr 2005, 10:40
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Originally Posted by Deimos
Works aok for me, not sure if I see much of a difference performance wise
It has more of a bandwidth save than performance

If you use this in addition to gzip compression you will save roughly 50-60% in total bandwidth per page.
Reply With Quote
  #39  
Old 16 Apr 2005, 10:43
jcr jcr is offline
 
Join Date: Apr 2004
Originally Posted by Trigunflame
Mine does'nt :/

Try uncompress/compress, if that doesn't work, paste the html code of posts where this is affected, if I see what the html looks like I may can help you.

Almost post a screenshot.
Okay hm, I have removed the reputation in the postbit, it is in the memberlist, things looks kinda strange over at my place.

Uncompressing, and then compressing again removed the whitespace between the reputation images
Attached Images
File Type: gif error_reputation_compressed.gif (56.9 KB, 36 views)
Reply With Quote
  #40  
Old 16 Apr 2005, 10:46
The Realist's Avatar
The Realist The Realist is offline
 
Join Date: Oct 2001
Real name: Brian
This latest code does not work for me in IE, the one before worked ok. What Im getting now is my dropdown menues work ok but when I click the New Posts link nothing happens?

Owe well.
Reply With Quote
  #41  
Old 16 Apr 2005, 10:46
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Originally Posted by jcr
Okay hm, I have removed the reputation in the postbit, it is in the memberlist, things looks kinda strange over at my place.

Uncompressing, and then compressing again removed the whitespace between the reputation images
So everythings fine now?
Reply With Quote
  #42  
Old 16 Apr 2005, 10:48
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Originally Posted by The Realist
This latest code does not work for me in IE, the one before worked ok. What Im getting now is my dropdown menues work ok but when I click the New Posts link nothing happens?

Owe well.
Before I was getting massive javascript errors in IE, thats the reason it was changed.

I'll try and contact you, and help you out.
Reply With Quote
  #43  
Old 16 Apr 2005, 10:52
jcr jcr is offline
 
Join Date: Apr 2004
Originally Posted by Trigunflame
So everythings fine now?
Superb., just wanted to share the error in case someone meets it later
Reply With Quote
  #44  
Old 16 Apr 2005, 10:57
boeserwolf boeserwolf is offline
 
Join Date: Jan 2004
Real name: Markus
Nice hack


Klick install


yours


Markus
Reply With Quote
  #45  
Old 16 Apr 2005, 11:15
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Originally Posted by Trigunflame
Before I was getting massive javascript errors in IE, thats the reason it was changed.

I'll try and contact you, and help you out.
Update;

Contacted; Fixed problem

Notice:

Everyone use the new version, I was replacing tabs with '', which would cause some problems if in links; now its replaced with a single space ' '.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 21:33.

Layout Options | Width: Wide Color: