Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
United-Forum CSS Sprites - ludicrous speed - NOW! Details »
United-Forum CSS Sprites - ludicrous speed - NOW!
Mod Version: 0.7.2, by Osbes (Member) Osbes is offline
Developer Last Online: Feb 2013 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (31 votes - 4.55 average) Installs: 268
Released: 12 Jul 2011 Last Update: 06 Aug 2011 Downloads: 2878
Not Supported Uses Plugins Auto-Template Additional Files Is in Beta Stage  

tl;dr Makes your forum faster.

Want an easy one-click installation for this addon? . Vote for this jira-entry

Add on currently is in beta stage

When visiting a website, speed is a very important factor not only for users but crawlers as well. Long loading times are a nuisance since your time is basically wasted during the waiting period. Hence, we are trying everything we can in order to speed up our site. One great way to improve loading times is by the use of css sprites. Unfortunately these are not implemented by vBulletin.

We therefore decided to develop our own css-sprite add on for vBulletin boards and want to share this code with the worldwide vBulletin community.

Live demo
The add on is permanently running in our vBulletin board ( > 2.000.000 posts), take a look:
http://www.united-forum.de

The add on will be supported via this thread. If you have any questions, issues, improvements or feedback regarding this add on, please feel free to post a comment or write us a pm at any time. We are happy to discuss

vBulletin performance using css sprites
Our tests are based on version 0.7.0. We used the analytic tools firebug network utility and the googlelabs.com page speed site

on the client side the following parameter were used:
download speed: 5.7 MBit/s
ping: 31ms




css sprites - what are they?
The intention behind css sprites is the bundling of many small graphics into one large graphic in order to decrease the number of required http requests. This shortens the loading times of the given website. In addition, the the accumulated size of all small graphics is higher than the size of the sprite due to reasons of compression.
You can find further information in a great article by Chris Coyier.
What is the gain in using css sprites?
Aside from the technical implementation, the question on how much one actually does gain by using css sprites is of the most interest. Obviously they decrease loading times - but how important are small loading times and what is the impact on vBulletin overall loading times?

A short time ago, Jasper Aguila pointed out that speed is one crucial stickiness factor in his blog on vBulletin.com.
Originally Posted by Jasper Aguila vBulletin Support
The internet has unfortunately contributed to the exponential decrease in attention span for many individuals. That's why this decade is seeing a trend in emerging technologies emphasizing the importance of speed request. It's crucial for your content to be promptly distributed in a timely manner, else bounce rate will increase - making you lose returning visitors. It's also important to note that slow sites may be penalized by search engines.

With better browsers, more powerful processors, and improved technologies constantly releasing each year, it's becoming quite difficult to provide excuses for slow loading pages. Therefore, try optimizing your server for speed. Read up and learn optimization techniques at vBulletin.com's Server Configuration forum.
In addition, the google ranking is influenced by the site speed as well.

Google Webmaster Central Blog
Originally Posted by 09.04.2010 - Google Webmaster Central Blog
You may have heard that here at Google we're obsessed with speed, in our products and on the web. As part of that effort, today we're including a new signal in our search ranking algorithms: site speed. Site speed reflects how quickly a website responds to web requests.
vBseo Webmaster Mert Gökçeimam
CSS sprites is a huge bonus for big boards , any big board owner definately should use it.
Last but not least, not only the user's loading time is reduced, but also does the server load decrease as the server will have to handle a lot less of http requests. This clears available connections and cpu time.
Add on features
In the current released beta version 0.7.2, sprites are available for FORUMHOME and FORUMDISPLAY. Coming up next SHOWTHREAD.

Sprites are created style based for all forum styles and saved in a folder which you can set via the imgdir_sprite stylevar. You have one additional button in the ACP (CSS-Sprites -> Refresh) which automatically creates all sprites, the according css definitions and includes those css definitions in the vBulletin css rollup files.
Installation

First of all, if you didnt want to change the templates manually, install the Template Modification System (TMS). Now proceed with the installation:
  • upload the contents of the upload folder into your forum home directory.
  • import the add on in the ACP
  • upon installation a new stylevar imgdir_sprite will be created. Update this stylevar based on your file structure - default value is the vbulletin sprite directory. Make sure the folder is writable, else the sprites can't be saved!
  • create the sprites via the ACP at CSS-Sprite using the Refresh option.
  • If you have installed TMS, you are done now. This was an easy gained speed up, not? If you didnt installed TMS and didnt want to do it, proceed with the next point:
  • in order to use the sprites, you then will have to edit some templates. The diffs (xou will find it in the do_not_upload folder show which parts you have to delete '<' and which parts to add '>' In addition, on top find the lines in which you will find the respective code.[/b]

Download Now

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

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	forumdisplay_default.jpg
Views:	2235
Size:	151.3 KB
ID:	131565   Click image for larger version

Name:	forumdisplay_sprites_070.png
Views:	1629
Size:	70.8 KB
ID:	131566   Click image for larger version

Name:	forumhome_default.jpg
Views:	1318
Size:	145.6 KB
ID:	131567   Click image for larger version

Name:	forumhome_sprites_070.png
Views:	1168
Size:	66.6 KB
ID:	131568  

Click image for larger version

Name:	nachher_forumdisplay.jpg
Views:	1557
Size:	96.6 KB
ID:	131570   Click image for larger version

Name:	nachher_forumhome.jpg
Views:	1173
Size:	94.1 KB
ID:	131572  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #46  
Old 20 Jul 2011, 17:34
giorgino giorgino is offline
 
Join Date: Dec 2009
I've a big problem. My attachments aren's visible anymore (error 404)
Can you help me?
Reply With Quote
  #47  
Old 20 Jul 2011, 21:41
Osbes Osbes is offline
 
Join Date: Jul 2008
Hello extreme-gaming,
i have currently added icons from FORUMHOME to the sprite, but yes the next step will be adding icons from SHOWFORUM.

----------------------------------
  • /images/misc/forum_stats.png

This image is replaced in the last version.
I see, that you are using some additional stats, so these add this image antoher time. Please replace


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

with


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

but be aware that "Spam-O-Matic Statistics" could be an phrase, so look first in your template.

Do this also for "Visitors found this page by searching for:" and "Video Game Chat - Vbulletin Statistics"

----------------------------------
  • /images/buttons/search.png
  • /images/misc/arrow.png
  • /images/misc/navbit-home.png

These images will be supportet in the next bigger addon with a lot of icons from SHOWFORUM (0.7.0 or maybe earlier).

----------------------------------
  • /images/misc/tab-collapsed.png
  • /images/misc/tab-expanded.png

These images could be replaced within this addon, but not in the near future, since i have to modify an vBulletin-Javascript what will increase my workload to support this addon a lot with every vBulletin Update just to save 2 images.

----------------------------------
  • /images/buttons/collapse_40b.png
  • /images/buttons/collapse_40b_collapsed.png

These images will never be replaced within this addon, since it is used by many other addons and as long as you didnt change everything to using sprites it will need a second Javascript-file just to manipulate the className-attribute instead of the scr-attribute.
vBulletin has to do this.

----------------------------------
  • /images/misc/blog/top-highlight.png

I am not sure whether or not i will add this icon, since it looks like an gradient and i am not sure whether or not i will create an second sprite for gradients. I would advise using CSS3 for gradients (just like digital point did with his addon for gradients): http://www.vbulletin.org/forum/showthread.php?t=263393

Best regards
Sebastian
Reply With Quote
  #48  
Old 20 Jul 2011, 21:56
Osbes Osbes is offline
 
Join Date: Jul 2008
Hello giorgino,
i haven't added anything in connection to the attachment-system in this addon, so i didnt belive, that this problem has to do anything with it.


as far as i can see, you are using nginx and vbseo rewrite for attachments? an am i correct, that you problem is, that attachment-urls like http://www.propit.it/attachments/f66...-.4.09-005.jpg resolve into an 404 error? since our forum use nginx and vbseo too, i think i can help you anyway.

vbseo will rewirte the url of yout attachments to something like "attachments/f66/372d1280162113-firma-nostro-libro-ospiti-stlegdv14-1-1-.4.09-005.jpg". in our nginx configuration, nginx deliver jpeg directly and doesnt check each time if they exists, so it could use vbseo if it didnt exists.
since we didnt wanted to change this behavior of nginx we drop the rewrite of attachments with vbseo. hope this could help you.

Best regards
Sebastian
Reply With Quote
  #49  
Old 21 Jul 2011, 00:25
Mooff Mooff is offline
 
Join Date: Mar 2010
Another quick word on gradients.
I'm not so sure whether we should implement them at all. Those gradients are mostly used for background manipulation and in the styles i made for our board i used those gradients in many places. Places they weren't used in the default vb version and i removed them in a lot of backgrounds where vbulletin has them.
I personally think it will be impossible for us to create the addon in a way that we will automatically find all the places where you have used this one particular gradient - and will end up in serving the background some times via sprite and some times via icon.

But you can add those gradients in the sprite yourself. Since 0.6.0 we have added the
posibility to add custom icons into the sprite via the plugin-hook sprite_add_icon.
Be aware that this option is meant for experienced users and will probably stay that way for a long time. That aside, if you are using a modded style it gives the style designer the opportunity to offer a plugin to our addon, which includes all his additional graphics.
Reply With Quote
  #50  
Old 21 Jul 2011, 19:57
Makaveli007's Avatar
Makaveli007 Makaveli007 is offline
 
Join Date: Jun 2008
i receive the following on vb4.1.4 when clicking refresh

Call to undefined function imagecreatetruecolor() in /home/makaveli/public_html/admincp/sprite.php on line 653

any ideas?
Reply With Quote
  #51  
Old 21 Jul 2011, 20:02
Mooff Mooff is offline
 
Join Date: Mar 2010
You probably do not have GD installed on your server.
Reply With Quote
  #52  
Old 21 Jul 2011, 20:35
giorgino giorgino is offline
 
Join Date: Dec 2009
Originally Posted by Osbes View Post
Hello giorgino,
i haven't added anything in connection to the attachment-system in this addon, so i didnt belive, that this problem has to do anything with it.


as far as i can see, you are using nginx and vbseo rewrite for attachments? an am i correct, that you problem is, that attachment-urls like http://www.propit.it/attachments/f66...-.4.09-005.jpg resolve into an 404 error? since our forum use nginx and vbseo too, i think i can help you anyway.

vbseo will rewirte the url of yout attachments to something like "attachments/f66/372d1280162113-firma-nostro-libro-ospiti-stlegdv14-1-1-.4.09-005.jpg". in our nginx configuration, nginx deliver jpeg directly and doesnt check each time if they exists, so it could use vbseo if it didnt exists.
since we didnt wanted to change this behavior of nginx we drop the rewrite of attachments with vbseo. hope this could help you.

Best regards
Sebastian
Hi Sebastian you're right. We've nginx with some difficult in configuration... (cry).
I don't understand your super nice help (my english is really poor, sorry for this) and I ask you for extended suggestions
Reply With Quote
  #53  
Old 21 Jul 2011, 22:42
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Disable attachment rewriting in vbseo. How can you not understand that?

drop the rewrite of attachments with vbseo
Originally Posted by giorgino View Post
Hi Sebastian you're right. We've nginx with some difficult in configuration... (cry).
I don't understand your super nice help (my english is really poor, sorry for this) and I ask you for extended suggestions
Reply With Quote
  #54  
Old 21 Jul 2011, 23:03
Makaveli007's Avatar
Makaveli007 Makaveli007 is offline
 
Join Date: Jun 2008
Originally Posted by Mooff View Post
You probably do not have GD installed on your server.

you are correct sir. thanks. resolved
Reply With Quote
  #55  
Old 22 Jul 2011, 06:44
giorgino giorgino is offline
 
Join Date: Dec 2009
Originally Posted by extreme-gaming View Post
Disable attachment rewriting in vbseo. How can you not understand that?
Great! Thank you, work perfect!
Reply With Quote
  #56  
Old 22 Jul 2011, 08:33
Osbes Osbes is offline
 
Join Date: Jul 2008
Hi giorgino,

the commenly wrong assumption when working with nginx is, that every matching location directives will executed. Nginx will in general execute only one location directive.


To summarize, the order in which directives are checked is as follows:

Directives with the "=" prefix that match the query exactly. If found, searching stops.
All remaining directives with conventional strings. If this match used the "^~" prefix, searching stops.
Regular expressions, in the order they are defined in the configuration file.
If #3 yielded a match, that result is used. Otherwise, the match from #2 is used.
So if your nginx configuration looks like (http://www.axivo.com/community/threa...letin-3.123/):


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

and you want to access an vbseo rewrite attachment url like http://www.propit.it/attachments/f66...-.4.09-005.jpg the executed location directive will be


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

Since this doenst call vbseo.php the url will not resolve in the correct attachment url and you get an 404 http error.


So you could either extend your nginx configuration to always use try_files and then call vbseo.php as fallback, or you disable the rewrite of attachments with vbseo.

On our Forum we disabled this rewrite, cause the gain of this is - for us - lower than the gain of performance, since using try_files for every file isnt that good.

Best regards
Sebastian
Reply With Quote
  #57  
Old 22 Jul 2011, 08:52
giorgino giorgino is offline
 
Join Date: Dec 2009
Hi sebastian since you're so kind, I try to take advantage of your expertise.

This is my .conf


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

Reply With Quote
  #58  
Old 23 Jul 2011, 08:59
Mooff Mooff is offline
 
Join Date: Mar 2010
Version 0.6.3 (23.07.2011)
  • Added the possibility to use TMS for automatic template modification.
  • Icons can now be merged into different sprites and css rollups instead of one big sprite.
  • Addon is now compatible with vBulletin 4.1.x
New template edits:
  • None
Reply With Quote
  #59  
Old 23 Jul 2011, 09:23
giorgino giorgino is offline
 
Join Date: Dec 2009
Hi Mooff which template changes from 0.6.2 -> 0.6.3?
How upgrade? Simply overwrite files and rebuild sprites?
Reply With Quote
  #60  
Old 23 Jul 2011, 09:35
Osbes Osbes is offline
 
Join Date: Jul 2008
Hi giorgino,

There are no template changes from 0.6.2 -> 0.6.3.

If you want to Upgrade from 0.6.2 -> 0.6.3, simply overwrite files, reinstall the addon (simply upload XML-product file with overwrite) and rebuild sprite.

If you want to switch from maually template changes to automatic template changes, there is additional work to be done:
  • install the Template Modification System
  • undo the template changes you did for sprites
  • reinstall this addon (simply upload XML-product file with overwrite).

Now your Templates are automatic changed. This will help you in the next versions, since the upcomming template changes will also be done automatically.


I would advise to do it now, before more template modification need to be done.

Best regards
Sebastian

PS:
I will look into your nginx configuration later
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 07:20.

Layout Options | Width: Wide Color: