MyBB Community Forums

Full Version: edit img tag with mycode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im trying to edit [ img ] tags to create a max size. The simplest solution i found is just to recreate img tag as a custom mycode which apparently writes over the default. 

As is the buffer around the image is quite large, is there a way i can minimize this? Also is there a way i can force the images to show side by size instead of over top on another?

i tried this

regex:
\[(?:img)\]([\s\S]+?)\[\/(?:img)\]

replacement:
<center>
<a href="$1" title="Go to full size image">
<img style="maxwidth: 255px;max-height:255px" src="$1">
</img> 
</a>
</center>


an example in forum would be 
http://python-forum.io/Thread-Detecting-...70#pid5470

i tried adding 0 margins, and border collapse, but that doesnt change anything. 
<center>

<a href="$1" title="Go to full size image">
<img style="maxwidth: 255px;max-height:255px; padding:0; margin:0; border-collapse: collapse;" src="$1">
</img> 
</a>
</center>

If i remove center and try

float:left; margin: 0 0 0px 0px;

one is higher while the other is lower?
[attachment=37914]