MyBB Community Forums

Full Version: plugin less resize image post between [img] tag resize automatically?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
support team does not help me, but I'll assist members
without plugin, image resizing It works until a plugin for 1.6.5


add this code to global.css of your theme

.imagespost{

max-width: 500px; /* Adjust this value according to your content area size*/
    height: auto;

}

find this code at inc/class_parser.php

return "<img src=\"{$url}\" width=\"{$dimensions[0]}\" height=\"{$dimensions[1]}\" border=\"0\" alt=\"{$alt}\"{$css_align} />";
        }
        else
        {
            return "<img src=\"{$url}\" border=\"0\" alt=\"{$alt}\"{$css_align} />;

change into this

return "<div id=\"imagespost\"><img src=\"{$url}\" class=\"imagespost\" width=\"{$dimensions[0]}\" height=\"{$dimensions[1]}\" border=\"0\" alt=\"{$alt}\"{$css_align} /></div>";
        }
        else
        {
            return "<div id=\"imagespost\"> <img src=\"{$url}\" class=\"imagespost\" border=\"0\" alt=\"{$alt}\"{$css_align} /></div>";


To thank you, just send rep
Or, you could apply a class to the psotbit template and use

.class img {
    max-width: Xpx;
    max-height: Xpx;
}

Rather than modifying core files.
I installed the plugin, changed the format number, saved it and then a receive an error message which i cant read. Caan someone help me with this problem?
(2011-11-27, 11:43 AM)euantor Wrote: [ -> ]Or, you could apply a class to the psotbit template and use

.class img {
    max-width: Xpx;
    max-height: Xpx;
}

Rather than modifying core files.

Thanks