vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   New Image Tag to reduce Imagesize (https://vborg.vbsupport.ru/showthread.php?t=94250)

utw-Mephisto 08-13-2005 10:00 PM

New Image Tag to reduce Imagesize
 
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

TCM 08-18-2005 12:07 AM

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?

utw-Mephisto 08-18-2005 06:27 AM

The point is to avoid the forum being disorted (optic wise) ...

Jenta 08-23-2005 04:50 PM

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>

Brinnie 08-27-2005 07:50 AM

It's "Dimensions"... Not filesize. Get it right.

ggiersdorf 08-30-2005 03:01 PM

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?

utw-Mephisto 08-30-2005 03:04 PM

Quote:

Originally Posted by ggiersdorf
where do you put that Jenta?

At "Replacement" ....

Wayne Luke 08-30-2005 04:22 PM

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.

ricker 09-11-2005 07:42 PM

Cool! Thanks for sharing.

Allan 09-11-2005 09:58 PM

Thanks you for sharing :)


All times are GMT. The time now is 01:03 AM.

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.01271 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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