Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > Programming Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New Image Tag to reduce Imagesize
utw-Mephisto
Join Date: Jan 2005
Posts: 648

 

Show Printable Version Email this Page Subscription
utw-Mephisto utw-Mephisto is offline 08-13-2005, 10:00 PM

I had this done with Deaths with version 3.0.7 but it applies here as well of course.

This is not really professional but ey, it works for me

To post an image you usually use [IMG].

You can create another tag, let's say [IMGO] for oversized images.

Go to your admincp

Admincp => Custom BB Codes => Add New BB Code

Title : Whatever you want
Tag : imgo
Replacement : <a href="{param}" target="_blank"><img border="0" width="400" alt="Thumb resize." src="{param}" /></a>
Example : [imgo]http://img96.imageshack.us/img96/7499/gibraltar12804sx.jpg[/imgo] (you need an example otherwise it will displays only the link)
Description : Whatever you want
Use {option} : No
Button Image (Optional) : Well, optional

As I said, it is not the best, professional one, but usefull. The dark side of that one is when using with picture smaller than 400 pixel width It'll be resized also ....

Original Post / Version 3.0.7
Reply With Quote
  #2  
Old 08-18-2005, 12:07 AM
TCM TCM is offline
 
Join Date: Dec 2004
Location: 3.6.8
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uh.... the height remains, so the image will be disorted. 'cause it's client-side, they'll still download the full filesize of the full image, which defeats the purpose of thumbnails in many applications. What's the point?
Reply With Quote
  #3  
Old 08-18-2005, 06:27 AM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The point is to avoid the forum being disorted (optic wise) ...
Reply With Quote
  #4  
Old 08-23-2005, 04:50 PM
Jenta Jenta is offline
 
Join Date: Dec 2004
Posts: 377
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TCM
Uh.... the height remains, so the image will be disorted. 'cause it's client-side, they'll still download the full filesize of the full image, which defeats the purpose of thumbnails in many applications. What's the point?
ive been using something similar for years and the images dont distort at all without a height attribute

HTML Code:
<a href="{param}" target="_blank"><img src="{param}" width="640" border="4" alt="Click the image to view the full version" /></a><div align="center"><b>Click the image to view the full version.</b></div>
Reply With Quote
  #5  
Old 08-27-2005, 07:50 AM
Brinnie's Avatar
Brinnie Brinnie is offline
 
Join Date: Jul 2005
Location: Louisiana
Posts: 360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's "Dimensions"... Not filesize. Get it right.
Reply With Quote
  #6  
Old 08-30-2005, 03:01 PM
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jenta
ive been using something similar for years and the images dont distort at all without a height attribute

HTML Code:
<a href="{param}" target="_blank"><img src="{param}" width="640" border="4" alt="Click the image to view the full version" /></a><div align="center"><b>Click the image to view the full version.</b></div>
where do you put that Jenta?
Reply With Quote
  #7  
Old 08-30-2005, 03:04 PM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ggiersdorf
where do you put that Jenta?
At "Replacement" ....
Reply With Quote
  #8  
Old 08-30-2005, 04:22 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TCM
Uh.... the height remains, so the image will be disorted. 'cause it's client-side, they'll still download the full filesize of the full image, which defeats the purpose of thumbnails in many applications. What's the point?
Actually, this is a common technique. If you only specify one dimensional attribute, the browser will automatically scale the other to match.
Reply With Quote
  #9  
Old 09-11-2005, 07:42 PM
ricker ricker is offline
 
Join Date: Jun 2003
Location: Apple Valley, CA
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool! Thanks for sharing.
Reply With Quote
  #10  
Old 09-11-2005, 09:58 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks you for sharing
Reply With Quote
Reply


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 01:27 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.04535 seconds
  • Memory Usage 2,290KB
  • 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
  • (2)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete