PDA

View Full Version : Any way to specify image size in BBcode?



Jeff
28th May 2010, 04:34 PM
I've Googled and came up with http://i5.photobucket.com/albums/y157/jingleweasel/Pokemon/2nso215.png, but it doesn't work here. Is there another way to do it here or can't it be done at all?

Telume
28th May 2010, 07:11 PM
iirc, unless the board has HTML enabled, no.

shazza
31st May 2010, 06:02 AM
Enable HTML in Mt. Moon.

Lady Vulpix
31st May 2010, 09:38 AM
Sorry, the admin CP doesn't provide any way to make a BB code tag with more than 1 option, nor to split the option and use its parts separately. All I can do is content, and that's not enough to determine both width and height.

The best I can think of is making a tag to determine the CSS class of the image, and then write the CSS for each class. But that would only give us a few preset sizes (or maximum widths and/or heights). I can't make it flexible enough to specify arbitrary dimensions. That would require PHP scripting and I don't have that kind of server access.

And adding JavaScript to the template to manipulate the tags would not only be dirty, but it would also make the threads take longer to load.

Jeff
31st May 2010, 10:20 AM
That's not a problem. I just want to make it easier for people to keep images in news posts small so they don't break the main site's layout. So being able to set height isn't necessary, just width.

Lady Vulpix
31st May 2010, 12:31 PM
You do know that all images in posts and signatures have a maximum width of 725 pixels set specifically for that purpose, don't you?

Although, now that I think of it, that only works for the forum. The main site requires a maximum width of 610 pixels. That can be done through CSS, though.

div img {max-width: 610px;}

Or you can use the new [simg] tag, which should ensure that the image does not break the layout of the main site.

Jeff
31st May 2010, 12:57 PM
Thanks, that should work.

Lady Vulpix
31st May 2010, 01:00 PM
You're welcome.