So let me get this right. for the lite version I place in the includes file:
Questions.. does this alter all my files or is it only changing whats output? I mean if I open my files via ftp will they be all compressed?
-If something goes wrong can I back out of this by just removing the code? What happened to that guy above who tried to back out and is toast? I'd like to install this but am scared it will screw something up beyond repair? thanks!
To answer if that would give you the lite version... yes that would.
It compresses the output given to any web request... not your source files... so your files via FTP are untouched, this only strips whitespace from what is returned to a web request.
If you don't like this, then delete the lines you added.
Not sure which guy couldn't back out and is toast... there's just nothing that can really go wrong, it doesn't touch your source files, your templates, nothing.
The only scenario that might put you off is this: If your forum has people posting stuff within <pre> blocks (think the [code] bbcode) then where that depends on whitespace for formatting the whitespace is removed and formatting can be mucked up as a result.
So if you're a technical forum where people post chunks of HTML in code tags, then you might think that this hack is not for you.
However in all other cases this hack has no ill effect on your forum and does speed up rendering of the page on most browsers (I haven't viewed it in Opera, Safari or Lynx so I have no idea what it does for them, but IE and Firefox both seem to render faster with this hack in place), which is the point of it
Help! I installed it and got an error so I removed the code and now I get this on any page of the forums!
Parse error: parse error, unexpected $, expecting ',' or ';' in /homepages/15/d110888008/htdocs/thegamernation.com/forums/includes/functions.php on line 3734
Right, just seen this... I have no idea what you have done... but will place a fair guess that you deleted too much when you removed the code or left a stray character in place.
You only added the stuff between and including the // HACK lines right? And then you deleted just those lines to uninstall right? If so then that process cannot cause what you have posted alone... you must have either left a $ in place or deleted too much from your code.
Worst case scenario: download vb from the members part of vb.com and compare the original vb file with your one and restore the bit that you accidentally deleted or left in.
Can/should this hack be used WITH the "Compress Forum Templates & Phrases" hack?
Do the hacks conflict?
They can work together quite fine... though you'd not gain much from doing so.
The hacks do not conflict.
I recommend Trigunflames hack as my hack will perform the whitespace stripping every page load, which attributes to server load. Trigunflames is a manual step, you click to compress your templates in your AdminCP... once done though, you don't need to do it again until the next time you edit a template.
That one is easy to get working in 3.5.x (view the end of the thread), and is superior because it only compresses once, rather than on every page request.
That one is easy to get working in 3.5.x (view the end of the thread), and is superior because it only compresses once, rather than on every page request.