Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
Attachment Optimiser Details »»
Attachment Optimiser
Version: 1.0, by Darkimmortal Darkimmortal is offline
Developer Last Online: Oct 2021 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.0.0 Beta 5 Rating:
Released: 11-27-2009 Last Update: Never Installs: 17
Uses Plugins
Re-useable Code  
No support by the author.

DEPRECATED - This is now merged with vB4: SuperCharged



vBulletin's attachment.php can cause a mini DoS on a FastCGI setup when images are set to display inline (or even with thumbnails, if you have enough of them on one page).

This mod assumes that your attachments are stored on the filesystem and are accessible via http://yourdomain.com/customattachments.

This mod also assumes that your are using nginx along with FastCGI. If you are using lighttpd etc. you will need to translate the config into something that works with lighty. If you are using Apache or a similar threaded webserver, that's your problem and this is no use to you.

What it does is turns this:

Code:
/attachment.php?attachmentid=246&stc=1&d=1213237132
Into this:

Code:
/customattachments/4/9/246.attach?.jpg
Which basically means your attached images load considerably faster and your forum lags a lot less.


To install, simply upload the attached .xml file as a plugin and add the following to your domain in nginx.conf:

Code:
location /customattachments {
	if ($request_uri ~* \.(png)) {
		add_header Content-Type image/png;
	}
	if ($request_uri ~* \.(jpg|jpeg)) {
		add_header Content-Type image/jpeg;
	}
	if ($request_uri ~* \.(gif)) {
		add_header Content-Type image/gif;
	}
}
Another mod which improves your FastCGI performance is my CSS Optimiser.

Download Now

File Type: xml attachment-optimiser.xml (484 Bytes, 124 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-28-2009, 11:15 PM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one
reserved
however the whole url system is still not suitable for non-English forums
reserved
Reply With Quote
  #3  
Old 11-30-2009, 09:53 PM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try

thnxx man
________
BUY EASY VAPE VAPORIZER
Reply With Quote
  #4  
Old 12-05-2009, 09:57 PM
milsirhc's Avatar
milsirhc milsirhc is offline
 
Join Date: Jan 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone using lighttpd that is able to translate this?
Reply With Quote
  #5  
Old 12-06-2009, 01:36 AM
EagleNick's Avatar
EagleNick EagleNick is offline
 
Join Date: Dec 2007
Location: Florida
Posts: 517
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this also mean that due to the .jpg extension, search engine spiders will have an easier time indexing/crawling the attached images? My forum is very photo (attachment)-heavy, but I've never had any luck getting Google to index any of the attachments.

Secondly, do you plan to release something like this for 3.8?
Reply With Quote
  #6  
Old 12-06-2009, 04:19 AM
Darkimmortal Darkimmortal is offline
 
Join Date: Apr 2009
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EagleNick View Post
Does this also mean that due to the .jpg extension, search engine spiders will have an easier time indexing/crawling the attached images? My forum is very photo (attachment)-heavy, but I've never had any luck getting Google to index any of the attachments.

Secondly, do you plan to release something like this for 3.8?
http://images.google.com/images?q=inurl%3Agamingmasters

Only avatars and signatures there, so I'd assume no. Or perhaps it is the lack of title/alt tags on the images?

I'll have to look into making a rewrite so there's no need for the ? (which is probably what is stopping google from indexing the images).

And it's simple enough that it might just work on 3.8 without any changes.
Reply With Quote
  #7  
Old 12-06-2009, 01:58 PM
SİMAR's Avatar
SİMAR SİMAR is offline
 
Join Date: Jun 2009
Location: Germany~Offenburg
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
Reply

Thread Tools

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

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07799 seconds
  • Memory Usage 2,271KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete