MyBB Community Forums
edit img tag with mycode - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: edit img tag with mycode (/thread-206265.html)



edit img tag with mycode - metulburr - 11-29-2016

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-multiple-markers-based-on-bright-spots-detection-on-raspberry-pi-3?pid=5470#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]