View Full Version : Allowing BB IMG Code in posts(IMG size)
Smoothie
Tue 27th Nov '01, 7:56pm
I allow BB IMG Code in posts, how do I limit the size of the image members can post. If the image is too big, it spreads the table out to far, plus I want to let members post images, but not huge ones. This is not for attachments, but for the actual BB IMG code that allows members to add picts to their posts.
Thanks,
Smoothie
tubedogg
Tue 27th Nov '01, 11:25pm
There is currently no way to limit the size of linked images.
Smoothie
Wed 28th Nov '01, 1:19am
Originally posted by tubedogg
There is currently no way to limit the size of linked images. What a bummer. A possible feature request?:D
tubedogg
Wed 28th Nov '01, 1:31am
Sure.
Moving...
amykhar
Wed 28th Nov '01, 4:08pm
what I would love would be the addition of size parameters to the img tag. Then I could specify the size myself. :)
Amy
bira
Thu 29th Nov '01, 2:01am
what I am trying to do - and I posted a question (http://vbulletin.com/forum/showthread.php?s=&threadid=33652) already- is write a hack that will allow me to offer the users three options (whereby currently there are two):
1) Show images in full size
2) show images as clickable thumbnails
3) Show images as links
In order to add #2, I must be able to use the GetImageSize function, because I have to check if an image is smaller than, say, 100 pixel wide or else every external 16x16 smilie will become a 100x100 'thumbnail' :)
Anyhow, maybe this thread will actually invoke one of the developers to reply to my question and if I solve this riddle, I'll write the hack.
Alternatively, perhaps the developers will look into adding the above idea to the next version - there is a great demand on my BB for such an option.
Cheers,
Bira
Wayne Luke
Thu 29th Nov '01, 2:04am
The only way to use the getimagesize() function is to upload the image to your server, at least temporarily. If you look at the process for adding an Avatar or Attachment you will get ideas on how this is done.
bira
Thu 29th Nov '01, 2:17am
Wluke that is absolutely and positively untrue.
Please open notepad and put this in it:
<?php
$image_size = getimagesize("http://vbulletin.com/forum/images/vBulletin_logo.gif");
echo $image_size[3];
?>
Run this script from your own server and see what you get.... :rolleyes:
tubedogg
Thu 29th Nov '01, 2:28am
Yeah she's right...there's even an example using a URL on the manual page (http://www.php.net/getimagesize).
bira
Thu 29th Nov '01, 2:41am
Actually I apologise - the remote URL ability was added in 4.0.5, so if you run a previous PHP version than that, it will not work.
Smoothie
Thu 29th Nov '01, 4:21am
I'm not an expert by any means regarding code, but I'm glad other members have expressed an interest in this. I have 1 forum strictly for images, and I can see now it's going to be a headache dealing with picts larger then I really want to allow. For some reason I thought there was control over image size allowed by BB code.
Smoothie
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.