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.
  #166  
Old 03 Aug 2011, 05:54
Osbes Osbes is offline
 
Join Date: Jul 2008
Hello FReeSTER,

what exactly is your problem? i dont understand what you mean.

Best regards
Sebastian
Reply With Quote
  #167  
Old 03 Aug 2011, 05:56
popmyzit popmyzit is offline
 
Join Date: Jun 2006
Thanks still have an issue with the error above.

Tried also in Vbulletin 3.8:


Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/global.php(355) : eval()'d code on line 56

Fatal error: Class 'vB_Template' not found in /home/user/public_html/forum/index.php(596) : eval()'d code on line 157

I don't have time to hack it up for Vbulletin 3.8 but hopefully somebody does.
Reply With Quote
  #168  
Old 03 Aug 2011, 07:16
Osbes Osbes is offline
 
Join Date: Jul 2008
Hello popmyzit,

please look into the StyleVar imgdir_sprite. Since your error message just says


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

Ik looks like this StyleVar is empty on your system, you could use as a value the default sprite folder of vBulletin:


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

Best regards
Sebastian
Reply With Quote
  #169  
Old 03 Aug 2011, 07:49
Osbes Osbes is offline
 
Join Date: Jul 2008
Hello ZeroHour,

i just want to inform you, that i didnt forget your problem, but i didnt have the time to give you a solution at the moment.

Best regards
Sebastian
Reply With Quote
  #170  
Old 03 Aug 2011, 15:44
popmyzit popmyzit is offline
 
Join Date: Jun 2006
Thanks Sebastian will try the above,

best
Reply With Quote
  #171  
Old 03 Aug 2011, 17:31
steeler7 steeler7 is offline
 
Join Date: Oct 2009
I ran the Google Page Speed Test and My score still stinks It suggested that I run Css Sprites even though I put this Hack on and it appears that I have sprites in the Image Directory that was made too.
Reply With Quote
  #172  
Old 03 Aug 2011, 17:38
Mooff Mooff is offline
 
Join Date: Mar 2010
But i suppose you do see an improvement?

Yes, google will still show up css sprites beeing an issue since gradients can't be included in the sprite since they are highly dependend on styles. But since they are mostly <10px google says you should combine them.
In addition, if you have some addons installed google might pick up on pictures those addons include.

And there of course is allways the option of using the 'add_custom_image_to_sprite' hook we provide in our addon, where you can add additional custom icons your board uses.


Aside that, i have to ask this, did you make the required template changes? Without them your board won't be using the sprite.
Reply With Quote
  #173  
Old 03 Aug 2011, 17:59
giorgino giorgino is offline
 
Join Date: Dec 2009
Originally Posted by Mooff View Post
And there of course is allways the option of using the 'add_custom_image_to_sprite' hook we provide in our addon, where you can add additional custom icons your board uses.
Hi Moof, can you provide some sort of instruction to add custom icons to your (super-great) plugin?
Reply With Quote
  #174  
Old 03 Aug 2011, 18:09
archet1337's Avatar
archet1337 archet1337 is offline
 
Join Date: Sep 2009
Real name: Olav
After running the google speed test, I noticed that there is still 27 images that is not turned into css sprites.

How do I add these as well?

Most of them are in my additional.css template.
__________________
Administrator @ RadioCtrl Forums - Your online R/C community.
Reply With Quote
  #175  
Old 03 Aug 2011, 18:13
steeler7 steeler7 is offline
 
Join Date: Oct 2009
Originally Posted by Mooff View Post
But i suppose you do see an improvement?

Yes, google will still show up css sprites beeing an issue since gradients can't be included in the sprite since they are highly dependend on styles. But since they are mostly <10px google says you should combine them.
In addition, if you have some addons installed google might pick up on pictures those addons include.

And there of course is allways the option of using the 'add_custom_image_to_sprite' hook we provide in our addon, where you can add additional custom icons your board uses.


Aside that, i have to ask this, did you make the required template changes? Without them your board won't be using the sprite.
Yes, I did make ther required Template changes and the listing of images they mention that should be made into CSS Sprites are these ..

GlossyHeader.png
collapse.png
collapse_40b.png
lastpost-right.png
search.png
widget-comment.png
selected-tab-gradient-with-top-alpha.png
icon1.png
arrow.png
bottom-shadow.png
event.png
facebook_login.gif
forum_stats.png
legend.png
navbit-home.png
rss_40b.png
tab-collapsed.png
forum.png
profile.png
category-16.png
forum_link-16.png
forum_new-16.png
forum_old-16.png
post_old.gif

Tough for me to say if there's been an improvement since I didn't run the test before hand. I'm trying to make other optimizations and work on the Leverage caching. My score of 54 is pretty bad
Reply With Quote
  #176  
Old 03 Aug 2011, 18:26
Mooff Mooff is offline
 
Join Date: Mar 2010
lastpost-right.png
search.png
event.png
forum_stats.png
legend.png
forum.png
profile.png
category-16.png
forum_link-16.png
forum_new-16.png
forum_old-16.png
Those should be covered by the addon (if you made all template changes). If they are not you are probably using some what's going on block modification - then you should search for them manually and replace them.

I'm going to translate the custom_icon_add instructions we have posted on vb-ger.org right now, as a warning. They are what i would call advanced.
Reply With Quote
  #177  
Old 03 Aug 2011, 18:41
Mooff Mooff is offline
 
Join Date: Mar 2010
How-To:
Include custom icons to your sprite:

!Warning! very advanced - if you do not know what you are doing. Stop right here.


Custom icons are added via plugin and hook
  • In the ACP create a new plugin
    • Add-on: vBulletin
    • Hook: sprite_add_icon
    • Titel: choose your own title. whatever makes sense for you
    • execution order: 5
    • PHP-CODE: (this is an example, path would be your icon, css would be the name of your icon!)

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

  • As for the rollup part. Right now allways use $CSS_FORUMHOME_ROLLUP - in later versions we will have different sprites for FORUMHOME and SHOWTHREAD (f.e.) - then you can choose which one. right now stay with Forumhome.
  • height, width and padding are optional. If you do not need them, delete all of those array values.
  • set it to active
  • save
  • refresh css sprites
  • modify the template in which your sprite is placed
    search

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

    replace

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

  • the icon should be loaded via the sprite now

I hope it helps. And do not say i didn't warn you. It is advanced.
Reply With Quote
  #178  
Old 03 Aug 2011, 19:33
steeler7 steeler7 is offline
 
Join Date: Oct 2009
Originally Posted by Mooff View Post
Those should be covered by the addon (if you made all template changes). If they are not you are probably using some what's going on block modification - then you should search for them manually and replace them.

I'm going to translate the custom_icon_add instructions we have posted on vb-ger.org right now, as a warning. They are what i would call advanced.
I'm sorry if I made you think too much today. I just realized that I only applied the Template Changes for this version not all of the previous ones. If I had any knowledge of what TMS does I'd use that, seems easier than having to go do all of these manual edits
Reply With Quote
  #179  
Old 03 Aug 2011, 19:56
archet1337's Avatar
archet1337 archet1337 is offline
 
Join Date: Sep 2009
Real name: Olav
Thanks Mooff, that helps a lot

But some of the images I have to replace is defined in additional.css.

Do I have to find where they are called in the forumhome template and add the <span class="sprite....."></span> code there and remove the line from additional.css, or is there another way to do that?
__________________
Administrator @ RadioCtrl Forums - Your online R/C community.
Reply With Quote
  #180  
Old 03 Aug 2011, 20:00
Osbes Osbes is offline
 
Join Date: Jul 2008
Hello archet1337,

please give an full example of your situation, this would help us to give you the best solution

Best regards
Sebastian
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 17:17.

Layout Options | Width: Wide Color: