vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Compress Forum Templates (https://vborg.vbsupport.ru/showthread.php?t=107615)

Trigunflame 02-09-2006 10:00 PM

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

https://vborg.vbsupport.ru/


Description:

This hack compresses your sites Templates into the database resulting in a significantly smaller page size and faster loading pages.
The benefits of this Template Compressor as opposed to virtually any other that you have installed is that this compresses the templates into the database.

Other hacks compress the pages on every page load which takes CPU/Memory usage as well as slows down the actual output of the page.

PS. Use this in conjunction with my Other Hack (Accelerated Plugins) for speeding up your forum even more (If you use plugins especially).
https://vborg.vbsupport.ru/showthread.php?t=107315
PS. Use this in conjunction with my Other Hack (Template Cache System) for speeding up your forum by caching its templates.
https://vborg.vbsupport.ru/showthread.php?t=110144


Background:

This is a semi-port from my Vbulletin 3 Version: https://vborg.vbsupport.ru/showthread.php?t=79923


Instructions:

1. Download Zip File, Extract files..
2. Read install.txt and follow it
3. Note: Anytime you update your templates, make sure to click "Compress Templates".
4. If you have any problems with certain hacks not working, add affected templates to "Template Ignore" setting in the Admin Control Panel settings.


Common Templates That May Need To Be Added to Ignore Settings:

phpinclude_start phpinclude_end editor_jsoptions_font editor_jsoptions_size forumhome navbar forumhome_vbshout forumhome_vbshout_shout


Updates:

Version 4.2: Forgot to upload ZIP File..
Version 4.1:
Changed setting location, you now modify them in the Admin Control Panel under Template Compressor Settings; there you can specify the templates to ignore.
Flashchat, others sometimes cause problems; so by default a few vbchat templates are listed in the ignore setting.
If you have problems with any other hacks not showing, trying add the 'forumhome' template to the ignore setting and recompress your templates.

Version 4: Integrating Hellcats regex, hopefully will solve some problems.

GamerJunk.net 02-10-2006 04:45 AM

How is this better than Hellcat's Page Compression hack

https://vborg.vbsupport.ru/showthrea...hlight=hellcat

Paul M 02-10-2006 04:48 AM

Read the description :)

forte 02-10-2006 05:08 AM

Why does it say that we should download the 3 files when there are only 2?

EDIT: Oh... I was too early, right?

poetic 02-10-2006 05:09 AM

Can we have hellcats installed at the same time? or will it make some errors.

HMBeaty 02-10-2006 05:12 AM

Quote:

Originally Posted by poetic
Can we have hellcats installed at the same time? or will it make some errors.

I'd like to know this as well

Trigunflame 02-10-2006 05:13 AM

Btw guys, I made a small edit to the install.txt file.. so please replace the PHP code it gives you in there if you already made the change to template.php

And no do not use hellcats at the same time as it will be redundant, you only need to click "Compress Templates" after installing it, and anytime you update a template; the rest of the time your pages are already compressed.

PS. Use this in conjunction with my Other Hack that is in development for even faster pages (If you use plugins especially).

https://vborg.vbsupport.ru/showthread.php?t=107315

Trigunflame 02-10-2006 05:17 AM

Updated install.txt, and questions. (Doing This for Page Update).

eNforce 02-10-2006 05:44 AM

I'm using this with your Accelerated Plugins hack, forum seems alot more speedier! (testing on my Live board)

However, after compressing the templates my vBshoutbox disappeared :), any idea?

Edit: Uncompressing didn't bring it back :nervous:

Trigunflame 02-10-2006 05:49 AM

Quote:

Originally Posted by eNforce
I'm using this with your Accelerated Plugins hack, forum seems alot more speedier! (testing on my Live board)

However, after compressing the templates my vBshoutbox disappeared :), any idea?

Looking at that hack, seems have some javascript.. although this hack generally does fine with almost "All" javascript. Im working on remaking the regex to fix this problem.

As for your current situation, looking that vbshoutbox hack, it seems that hes using the template "forumhome_vbshout", for most of the html/javascript.

1. Uncompress all templates
2. I would probably place his html back in the forumhome_vbshout template and forumhome_vbshout_archive, just replace all of it.
3. add forumhome_vbshout and forumhome_vbshout_archive to the $b_t (bad templates) array as shown in the code in install.txt (Just look in there and you will see how ive already got 4 templates that are ignored by default, just add forumhome_vbshout and any other problematic templates in the array).
4. Compress Templates :)

eNforce 02-10-2006 06:06 AM

I've done all of the above and can't seem to bring it back :(

I also re-imported (while overwriting) his product

(I was planning on getting rid of the shoutbox sometime, but would be nice to know how to enable it again)

Edit: I appear to have it working again, I was playing with the Plugin Accelerator options :ermm:

Edit2: Everytime I click Rebuild All Plugins it will show & hide the shoutbox lol.. Maybe I should be posting this in your Plugin Accelerator thread though.

Trigunflame 02-10-2006 06:17 AM

Quote:

Originally Posted by eNforce
I've done all of the above and can't seem to bring it back :(

I also re-imported (while overwriting) his product

(I was planning on getting rid of the shoutbox sometime, but would be nice to know how to enable it again)

Edit: I appear to have it working again, I was playing with the Plugin Accelerator options :ermm:

Edit2: Everytime I click Rebuild All Plugins it will show & hide the shoutbox lol.. Maybe I should be posting this in your Plugin Accelerator thread though.

Ya please do, would rather it be a problem with the accelerator actually as its new code, this stuff pretty tried and true; was hoping for no new problems with this :)

projectego 02-10-2006 06:17 AM

Installed and seems to be working perfectly. :)

eNforce 02-10-2006 07:17 AM

*runs around the forum*

Quote:

Originally Posted by Trigunflame
So let me get this straight, it works fine as long as its uncompressed? But when you compress it, it only works at the top?

Ya this is a template compressor problem -_-, lets go back over there.

So yeah, this is exactally what's happening

Trigunflame 02-10-2006 07:17 AM

Ok give me a couple min, im gonna make some changes to the hack..

Zia 02-10-2006 07:36 AM

hello...
AHem compressor gonna rocks...

first relase was "realtime page compressor"
2ndly Hellcat compressor
Now this...

Its Kool
hellcat & this one together will work w/o any problem?

Agerly waiting for the reply....

Thnx

Trigunflame 02-10-2006 07:42 AM

Quote:

Originally Posted by Zia
hello...
AHem compressor gonna rocks...

first relase was "realtime page compressor"
2ndly Hellcat compressor
Now this...

Its Kool
hellcat & this one together will work w/o any problem?

Agerly waiting for the reply....

Thnx

No point in using both, hellcats actually slows down page output as its having to compress on every page load... that was the reason i released this hack on vb3 way back when.. and vb3.5 now.

No point in having compression if its not gonna help speed up the page; and you cant if ur compressing on each page load.

Zia 02-10-2006 07:49 AM

thnx man
in post #15 ur told ur gonna modifi some...
so waiting after u update then we will download thta,,

thnx for promt suppot (Y)

wishes for u

Trigunflame 02-10-2006 07:51 AM

Quote:

Originally Posted by Zia
thnx man
in post #15 ur told ur gonna modifi some...
so waiting after u update then we will download thta,,

thnx for promt suppot (Y)

wishes for u

It may be tomorrow, you can go ahead and download it as it will work for almost 99% of the cases; if not just "Uncompress templates" and it should return anything broken back to normal.

BoYagoob 02-10-2006 08:07 AM

I cannot see any difference before and after compressing, and there are still spaces between the lines in each template.

Rover416 02-10-2006 08:25 AM

Very nice.

I have disabled it for now though as even when i add the vb shout templates you stated to the bad templates my shoutbox still vanishes.

Trigunflame 02-10-2006 08:56 AM

Quote:

Originally Posted by Rover416
Very nice.

I have disabled it for now though as even when i add the vb shout templates you stated to the bad templates my shoutbox still vanishes.

Im working on that problem, should have something by later today/tomorrow.

Rover416 02-10-2006 09:07 AM

Quote:

Originally Posted by Trigunflame
Im working on that problem, should have something by later today/tomorrow.

No problem.

I am just glad of the people who will release hacks on here. :)

Replicators 02-10-2006 09:55 AM

I guess i will wait for the next version as well i have vbshout installed and it vanished when i compressed the templates. You should warn people of this on the first post.....

Corriewf 02-10-2006 01:11 PM

Quote:

Originally Posted by BoYagoob
I cannot see any difference before and after compressing, and there are still spaces between the lines in each template.

It doesnt compress on the GUI side (admincp) but if you look at the page source you will see it.

Thanks Trigun!!! I used this on 3.0.3 and my board was flying!

Princeton 02-10-2006 01:14 PM

useful addon that everyone should have :up:

Snake 02-10-2006 01:15 PM

I've been waiting for this... :)

forte 02-10-2006 02:30 PM

Another hack that stops working when compressing is the "Members who have visited the forum (Today or last 24 hours)" hack. Whenever I compress the templates, it wont show but when I decompress them, it shows up.

GamerJunk.net 02-10-2006 03:11 PM

Invalid Specified File when importing the cp_nav tpl xml file as a product?

forte 02-10-2006 03:21 PM

You are supposed to upload the "cpnav tpl compress.xml" file to includes/xml and "product tpl compress.xml" is the one that should be uploaded as a product.

Mastar 02-10-2006 03:43 PM

I got this error after I pressed 'Compress Templates' :

PHP Code:

Parse errorparse errorunexpected ')'expecting '(' in /home/thebedrock/domains/thebedrocktavern.com/public_html/includes/adminfunctions_template.php(2262) : regexp code on line 1

Fatal error
preg_replace(): Failed evaluating code_tag_callback('what=\\\"empire\\\" 'view_ad, Array) in /home/thebedrock/domains/thebedrocktavern.com/public_html/includes/adminfunctions_template.php on line 2262 

Any Ideas?

The Chief 02-10-2006 05:05 PM

Quote:

Originally Posted by Mastar
I got this error after I pressed 'Compress Templates' :

PHP Code:

Parse errorparse errorunexpected ')'expecting '(' in /home/thebedrock/domains/thebedrocktavern.com/public_html/includes/adminfunctions_template.php(2262) : regexp code on line 1

Fatal error
preg_replace(): Failed evaluating code_tag_callback('what=\\\"empire\\\" 'view_ad, Array) in /home/thebedrock/domains/thebedrocktavern.com/public_html/includes/adminfunctions_template.php on line 2262 

Any Ideas?

So I got tons of javascript all over my boards, if I install this you are sure that there won't be any errors?

Karri 02-10-2006 05:37 PM

I am having a problem with a few templates. Some templates are used as text for emails sent by the board and the board sends them in plain text. When they are compressed, all of the white space used to separate parts of the emails is removed so the email comes in as a jumbled mess. It would be helpful to be able to flag certain templates as not to be compressed to avoid that.

Trigunflame 02-10-2006 07:32 PM

OK guys, Im back sorry had to sleep. I messaged hellcat and he agreed to be co-author of this hack by donating some of him regexp to the project.

I will implement his code and then re-release the hack; that should hopefully fix all of you guys problems.

Trigunflame 02-10-2006 08:05 PM

Large Update

1. Integrated Hellcats Regex, hopefully this will solve a few of the script problems that have been happening recently.

eNforce 02-10-2006 08:22 PM

Quote:

Originally Posted by Trigunflame
Large Update

1. Integrated Hellcats Regex, hopefully this will solve a few of the script problems that have been happening recently.

Including the shoutbox?

Just redone the file edit and re-imported the product and the problem is still the same as before.

Trigunflame 02-10-2006 08:30 PM

Quote:

Originally Posted by eNforce
Including the shoutbox?

Just redone the file edit and re-imported the product and the problem is still the same as before.

Try to uncompress all templates, then recompress; if it still doesnt work.

Look inside the shoutboxes product file and make not of every use of every custom template that it installs, and add it to the bad templates array; then recompress again.. and if that still causes problems..

I will install that hack myself and try to figure out; cause im confused as to what could be causing the errors..

eNforce 02-10-2006 08:43 PM

Ahh, tried that just now and can't seem to fix it. I'll just keep shoutbox at the top and wait for you to figure it out :)

I'm not disabling this hack because of the shoutbox, it's an excellent addition.

Zia 02-11-2006 02:04 AM

Quote:

Originally Posted by Trigunflame
Large Update

1. Integrated Hellcats Regex, hopefully this will solve a few of the script problems that have been happening recently.


Rock N RoLL

lets have a try.....

hehe its a peace for Eyes n heart to see the saving % of b/w :D


WeLL Wished to u Mr.Coder

MissKalunji 02-11-2006 06:06 AM

how is this going?


All times are GMT. The time now is 05:50 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01529 seconds
  • Memory Usage 1,848KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete