vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Compress Forum Templates (Speed up your Forums & Save Bandwidth) (https://vborg.vbsupport.ru/showthread.php?t=79923)

kall 04-19-2005 10:25 PM

Quote:

Originally Posted by Trigunflame
ya, hopefully *no more development*

far as im concerned, it's done.

I *does* continually screw over certain templates still..I have to save my forumhome_loggedinusers template each time I accidentally compress templates, otherwise it parses stuff a bit bodgily.

Trigunflame 04-20-2005 12:21 AM

Quote:

Originally Posted by kall
I *does* continually screw over certain templates still..I have to save my forumhome_loggedinusers template each time I accidentally compress templates, otherwise it parses stuff a bit bodgily.

The bad templates array exist for a reason, add the offending templates to the array and it will skip them.

msimplay 04-20-2005 06:08 AM

Quote:

Originally Posted by Trigunflame
The bad templates array exist for a reason, add the offending templates to the array and it will skip them.

would be good if a list of bad templates could be added here

The Realist 04-20-2005 09:06 AM

What I've noticed on my forums is all my avatars and picture attachments have gone a bit hay wire.

I now have to re-upload them as they are all buggered :)

Laters

MentaL 04-20-2005 10:48 AM

Worth using on ragezone.com or will i get just tons of errors?

Trigunflame 04-20-2005 12:15 PM

Quote:

Originally Posted by mentalrz
Worth using on ragezone.com or will i get just tons of errors?

It is all reversible, the above person unfortunately has no idea what he is talking about; as this mod "only" modifies templates; and has no effects on attachments or avatars.

Blam Forumz 04-21-2005 03:08 PM

Quote:

Originally Posted by mentalrz
Worth using on ragezone.com or will i get just tons of errors?

its worth it. definately

MentaL 04-21-2005 03:22 PM

Installed.........


And DAMN.. its 3 times faster ^__^

http://forum.ragezone.com

lazytown 04-26-2005 07:49 PM

First, Thank you for this hack. I think the idea is great.

However, I am having a minor problem. Some items (like in vbGarage 4.1.0) are not appearing the same as they did before. For example, a series of thumnbail photos used to wrap, and with the templates compressed they no longer wrap, which causes the user to have to horizontally scroll their browser.

I looked at the html before and after compression, and it appears that there was originally a series of spaces in between each <img> tag. With the spaces removed, IE will not allow them to wrap to the next line. Can the program just remove spaces after the first one? That way it is still compressing but not removing possibly necessary spaces.

Thanks
-V

Trigunflame 04-26-2005 08:45 PM

Quote:

Originally Posted by vissa
First, Thank you for this hack. I think the idea is great.

However, I am having a minor problem. Some items (like in vbGarage 4.1.0) are not appearing the same as they did before. For example, a series of thumnbail photos used to wrap, and with the templates compressed they no longer wrap, which causes the user to have to horizontally scroll their browser.

I looked at the html before and after compression, and it appears that there was originally a series of spaces in between each <img> tag. With the spaces removed, IE will not allow them to wrap to the next line. Can the program just remove spaces after the first one? That way it is still compressing but not removing possibly necessary spaces.

Thanks
-V

Change

PHP Code:

$search  = array('/\s+/''/\t+/'); 

To

PHP Code:

$search  = array('/\s\s+/''/\t+/'); 

Does it work now?

Oblivion Knight 04-28-2005 06:23 PM

I finally got around to updating to 2.8 from 2.6 - so far, so good.

Relieved to see that the updates have calmed down somewhat.. ;)

Lizard King 04-28-2005 10:07 PM

Installed 5 minutes ago and working pretty good...

Oblivion Knight 05-01-2005 01:24 PM

Quote:

Originally Posted by Trigunflame
Change

PHP Code:

$search  = array('/\s+/''/\t+/'); 

To

PHP Code:

$search  = array('/\s\s+/''/\t+/'); 

Does it work now?

Even with the suggested fix, there does appear to be a slight issue with it taking away spaces that it shouldn't from a design point of view..

I noticed this one earlier this morning when I was fixing various bugs on my forum.

Trigunflame 05-01-2005 10:17 PM

Quote:

Originally Posted by Oblivion Knight
Even with the suggested fix, there does appear to be a slight issue with it taking away spaces that it shouldn't from a design point of view..

I noticed this one earlier this morning when I was fixing various bugs on my forum.

try using just

$search = array('/\s\s+/');

for some reason vbulletin uses tabs in various places.. that could be the problem..

laeth 05-02-2005 06:42 AM

Heya,

Cool hack, but when I compress the templates all my links become underlined, when they are not supposed tobe. Any ideas?

Oblivion Knight 05-02-2005 07:06 AM

Quote:

Originally Posted by Trigunflame
try using just

$search = array('/\s\s+/');

for some reason vbulletin uses tabs in various places.. that could be the problem..

Nope, that isn't the problem.. :nervous:

LambHyjoo 05-10-2005 02:05 PM

I am worried by the "needed spaces" (for design, which should be replaced by some "&nbsp;") too. How did you manage your spaces problems, vissa ? Did you have to replace all the spaces by "&nbsp;" ? Or the Trigunflame tip made the work for you ?

But this hack seems definitely to be useful. I'll keep in touch with this thread.

mutus123 05-14-2005 03:15 PM

This reduced the file size of my showthread page by nearly 20% :up:

Definitely speeds things up too.

Thank you!

dutchbb 05-15-2005 02:58 PM

How can I apply this to only certain (payed) usergroups?

4number8 05-15-2005 05:36 PM

Installed and works great, I can see a nice increase in page loading...many thanks :)

Trigunflame 05-16-2005 04:56 PM

Quote:

Originally Posted by LambHyjoo
I am worried by the "needed spaces" (for design, which should be replaced by some "&nbsp;") too. How did you manage your spaces problems, vissa ? Did you have to replace all the spaces by "&nbsp;" ? Or the Trigunflame tip made the work for you ?

But this hack seems definitely to be useful. I'll keep in touch with this thread.

Sorry, Ive been away for a while. I will try to fix this problem ASAP.

Trigunflame 05-16-2005 04:57 PM

Quote:

Originally Posted by Triple_T
How can I apply this to only certain (payed) usergroups?

I don't quite understand the need for this?

dutchbb 05-16-2005 06:26 PM

Quote:

Originally Posted by Trigunflame
I don't quite understand the need for this?

Does this hack make the board run faster? So members in that usergroup can browse faster... Or is it only saving bandwith?

Trigunflame 05-16-2005 06:54 PM

Quote:

Originally Posted by Triple_T
Does this hack make the board run faster? So members in that usergroup can browse faster... Or is it only saving bandwith?

This is to be applied to your forum as whole, controlled by you in the admin control panel.

This hack compresses your templates, thus saving you bandwidth while Also speeding up your forums a good bit on large pages.

diettalk 05-17-2005 12:02 PM

How about optimizing the "archive"?

Zero Tolerance 05-18-2005 04:57 AM

Quote:

Originally Posted by diettalk
How about optimizing the "archive"?

The Archive loads with such speed and uses very little HTML i doubt compressing it would actually make much of a difference really.

Also good work Trigunflame, i'm going to install this now and compare the loading times and see how well this works :)

- Zero Tolerance

lazytown 05-18-2005 10:19 AM

The Trigunflame seemed to work for my problems. I believe it always leaves the first space now (which solves design formatting problems).

-V

Quote:

Originally Posted by LambHyjoo
I am worried by the "needed spaces" (for design, which should be replaced by some "&nbsp;") too. How did you manage your spaces problems, vissa ? Did you have to replace all the spaces by "&nbsp;" ? Or the Trigunflame tip made the work for you ?

But this hack seems definitely to be useful. I'll keep in touch with this thread.


Spinball 05-20-2005 08:17 PM

Got a problem with the forum home when compressing templates.
See the attached screen grabs.
The first is a grab after templates have been compressed. And the second is when they are not compressed.
Note that the number of users visiting is missing a space before it.
What do I do to fix this, please?

aranthorn 05-25-2005 05:52 PM

installed (yes, I clicked the install button) and thanks. My bandwidth has been going through the roof over the past month with a big influx of members, this can't hurt. I'll have to give it a couple days and look at the raw numbers, when I get some results I will post some feedback :D

Andreas 05-30-2005 05:12 PM

Nice hack.
Just wanted to point out that Zero Tolerance was not the first one who had this idea ;)

One suggestion:
Add an option to let the admin decided if Templates should be automatically compressed when saving them.
This way one could edit templates without always having to re-do the compression :)

PIKenPIK 05-31-2005 10:17 AM

w00t .............. forum goes like a rocket :lick: :lick: :lick: :lick: :lick: :lick:

Big HUGGGG :banana:

//edit:
one small Q:
Quote:

The bad templates array exist for a reason, add the offending templates to the array and it will skip them.
I've done the compression & everything seems to work like a a charm.

Compress Templates and Uncompress Templates seems for me the only 2 options in the ACP ..
Is there only a bad templates array when there is a bad template?
Or where can i find this array?

LambHyjoo 06-02-2005 07:47 AM

I forgot to post my opinion on this hack : Very good job ! :D

I had little problems with some custom templates I did, but it was tuned in less an hour.

Thanks again !

PIKenPIK 06-02-2005 07:58 AM

Quote:

Originally Posted by LambHyjoo
I forgot to post my opinion on this hack : Very good job ! :D

I had little problems with some custom templates I did, but it was tuned in less an hour.

Thanks again !

So, you can give me an answer to my question? :ninja:

Marco van Herwaarden 06-02-2005 08:12 AM

In admincp/template.php:
PHP Code:

    // List of Templates to NOT Compress 
    
$badTemplates = array( 
        
'editor_jsoptions_font'
        
'editor_jsoptions_size'
        
'phpinclude_start'
        
'phpinclude_end' 
    
); 


smacklan 06-02-2005 10:01 PM

What a freakin awesome hack...I'm running 2 to 3 times faster!!! Installed without any ill effects as far as I can tell ( at least none that I can't live with)! Thanks dude!

LuBi 06-09-2005 02:45 AM

worked fine for me on a very modded and styled board.. no issues I can see at all..? nice release. thanks.

kthlnwrnr 07-14-2005 07:00 AM

Does this hack work with VB 3.3?
I tried insalling it but I guess I am doing something wrong. I get an internal server error everytime I click on the compress link.

There is a chance that I am doing one thing wrong. In step to the instruction says I should
Quote:

[ Go to about line: 1278, or just look for $_REQUEST['do'] == 'edit' ]

Now should I paste the codes right above
Quote:

$_REQUEST['do'] == 'edit')
or right above
Quote:

if ($_REQUEST['do'] == 'edit')
Or right above
Quote:

(This is line 1278 in my template.php)//################################################## ###########################
// edit form for an existing template
if ($_REQUEST['do'] == 'edit')
?

I apologize in advance for my ignorance, but I am a bit confused and would like to get this hack to work.

Prodimysterio 08-03-2005 07:17 PM

Quote:

Originally Posted by LuBi
worked fine for me on a very modded and styled board.. no issues I can see at all..? nice release. thanks.

Same here. Thanks for the great modification.

:)

loftyasianz 08-12-2005 07:12 PM

thanks for this awesome hack. it really seems like a good idea.

i just finished installing this and i compressed my templates. but when i refreshed my page, i got this
Code:

Parse error: parse error, unexpected ',' in /home/gm0nk3y/public_html/forums/index.php(672) : eval()'d code on line 1
any suggestions? it was all fixed when i uncompressed the templates.

thanks in advance,
warren

gbechtel 08-29-2005 04:05 AM

Installed & woking on masscops.com with no problems at all! Excelent job, thanks...


All times are GMT. The time now is 03:55 PM.

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.01864 seconds
  • Memory Usage 1,838KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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