vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hack to limit max width and height for img tag? (https://vborg.vbsupport.ru/showthread.php?t=34406)

Gutspiller 01-23-2002 05:28 PM

A user found an exploit and created an image width and height a huge a$$ number and it really messed things up. Where can I find a hack that will limit the max image width and height for the image tag? I thought there was one, but I can't seem to find it.

Can somebody please help me, I don't want people to do this again.

Any help would be greatly appreciated.

Thanks.

newvbuser 01-23-2002 05:50 PM

Hmm interesting was thisusing the [img] [/img] tag or upload file tag or some other vbfeature set?

Gutspiller 01-23-2002 06:35 PM

it was using html image coding and they set the height and width to something that was at least 10 characters long. It had to be at least 100 pages down and 100 pages to the right. Very annoying.

newvbuser 01-23-2002 06:42 PM

Just turn off html code insert capability while there is a fix?

Gutspiller 01-23-2002 07:58 PM

turn off html? You funny.

dlst 01-23-2002 09:21 PM

I'm working on a solution to this, which will be posted when it's done. Here's how it works:

A Javascript function (very simple, small one) gets the available width of the browser window (taking into account page resolution, screen size, etc. automatically).

It then subtracts the number of pixels you need for other page sections (like a navigation bar on the side ~200pixels, table padding ~15 pixels, whatever).

It then has actual maximum width in pixels an image can be without "breaking" the page and forcing the veiwer to scroll forever to the right...

Finally it simply overrides whatever image width and height properties it finds and resizes all the images on the page.

I'm not exactly sure if this will all work, but I've got the javascript working, but not yet sure how to integrate it into the pages themselves... any ideas?

Gutspiller 01-23-2002 09:52 PM

Quote:

Originally posted by dlst
I'm working on a solution to this, which will be posted when it's done. Here's how it works:

A Javascript function (very simple, small one) gets the available width of the browser window (taking into account page resolution, screen size, etc. automatically).

It then subtracts the number of pixels you need for other page sections (like a navigation bar on the side ~200pixels, table padding ~15 pixels, whatever).

It then has actual maximum width in pixels an image can be without "breaking" the page and forcing the veiwer to scroll forever to the right...

Finally it simply overrides whatever image width and height properties it finds and resizes all the images on the page.

I'm not exactly sure if this will all work, but I've got the javascript working, but not yet sure how to integrate it into the pages themselves... any ideas?

If I understand what you are saying it sounds like a great idea. Sounds like a hack I have installed that I have asked the hacker to make better, but they wont. :( I have one suggestion, on the images that the hack/script is resizing, please please PLEASE make it so that the images are a hyperlink to the full version. This way people that want to see the full version of whatever image was posted (background and whatnot) can click the image and they can see the full version.

Let me know when you release this hack with a PM please. :up:

dlst 01-23-2002 10:38 PM

Um, you're not talking about an HTML resize, then. You're talking about a full thumbnail generator built into the board. That's a much bigger project, and requires something like ImageMagik to funciton. I don't think what I'm doing will help you, considering you want two versions of each image, one small and one large. Sorry.

Gutspiller 01-24-2002 03:28 PM

UH! Nobody understands OK, you have an image, and although it's size is 1024x768 it shows a version that is something like 500x350 or whatever is porportional to 1024x768, BUT IT ISN'T A THUMBNAIL, it's the same exact picture, just with a set width and hieght. THATS ALL I WANT. Nobody can even make it, it's like they have a brain fart or something... and it's really pissing me off. I don't want it to make a thumbnail, I just want it so whenever somebody posts a picture on my forum it makes sure it doesn't go above the size of 500 x 500, but keeps the image proportional.

Is that so hard to do???

Sorry, I am just getting tired of asking for this hack and everybody seems to just pass it by. :(

dlst 01-24-2002 03:36 PM

Dude, relax.

That's exactly what I was suggesting above to do with Javascript. Go back and reread the post YOU QUOTED above.

And relax.


All times are GMT. The time now is 09:54 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01090 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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