MyBB Community Forums

Full Version: Individual Tables for Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I posted this in the suggestion forum as well.

If a member posts a very large image it increases the width of all posts below or above it. It would be great if each post's width was independent. That way if someone posts a really large image, it wouldn't make the other posts hard to read (because you need to scroll horizontally to read the messages).

Which templates would need to be updated to accomplish this?
i dont think it would be easy to do that Wink!! at all.

anyway , u know that u may use [img=100X100 ] [/img ] so u can specify the size!!

regards
It's actually when someone posts a very large outside image.
(picture not from my website)
[Image: 77_apple_computers_freedesktopwallpaper_l.jpg]
i know that but u can make

[Image: 77_apple_computers_freedesktopwallpaper_l.jpg]

using what i have mentioned
regards,
[Image: 77_apple_computers_freedesktopwallpaper_l.jpg]
That's cool, I don't think my users will know how to do that though. Is there any way to keep the height relative. So that the image doesn't distort.
Try the following:
Open the template headerinclude and insert:
<script type="text/javascript">
function largerThan(a,b)
{
return a>b;
}
</script>
Open the file /inc/functions_post.php and search for:
$message = preg_replace("#\[img\]([a-z]+?://){1}(.+?)\[/img\]#i", "<img src=\"$1$2\" border=\"0\" alt=\"\" />", $message);
Replace with:
$message = preg_replace("#\[img\]([a-z]+?://){1}(.+?)\[/img\]#i", "<img src=\"$1$2\" border=\"0\" alt=\"\" onload=\"if(largerThan(this.width,800)) {this.width=800;this.alt='Click for full version';}\" onmouseover=\"if(this.alt) this.style.cursor='pointer';\" onclick=\"if(this.alt) window.open('$1$2');\" border=\"0\" />", $message);
(Thanks to msone for that code Smile)
Thanks Michael, that worked great.