MyBB Community Forums
Image Frame - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: MyCodes (https://community.mybb.com/forum-117.html)
+--- Thread: Image Frame (/thread-105430.html)

Pages: 1 2


Image Frame - M.Abbasi - 2011-10-07

[Image: 5ky4x25uddu8b02mvout.jpg]

Title: Image Frame
Regular Expression:
\[img\](.*?)\[/img\]

Replacement:
 <span class="Apple-style-span" style="color: rgb(51, 51, 51); white-space: normal; widows: 2; word-spacing: 0px; background-color: rgb(255, 255, 255);"><span class="Apple-style-span" line-height: 20px; background-color: rgb(246, 246, 246);"><p style="padding: 0px; outline-style: none; line-height: 18px; "><img class="aligncenter size-full wp-image-48451" src="$1" style="margin: 7px auto; padding: 3px; outline-style: none; border-width: 6px ! important; opacity: 0.9; display: block; border-style: solid ! important; border-color: rgb(255, 255, 255) ! important; background-color: rgb(255, 255, 255); box-shadow: 0px 0px 9px rgb(68, 68, 68); border-radius: 9px 9px 9px 9px; max-width: 625px;" /></p><p style="padding: 0px; outline-style: none; line-height: 18px; "></p></span></span>

Enabled? Yes

****************************
What's Your Opinion about This?
****************************



RE: Image Frame - patrick - 2011-10-07

- you can do that with CSS, there's no need for a custom mycode
- the replacement code is invalid (you have open elements)


RE: Image Frame - M.Abbasi - 2011-10-07

(2011-10-07, 10:30 AM)patrick Wrote: - you can do that with CSS, there's no need for a custom mycode
- the replacement code is invalid (you have open elements)

1- Probably if you use CSS for this, You will see all images with this effect.
2- are you sure it is invalid? i test it again now!!!


RE: Image Frame - x-Treme - 2011-10-07

Yes, you have two <span> tags open but have no closing tags for them.


RE: Image Frame - M.Abbasi - 2011-10-07

Edited and Closed! [Image: shekl17.gif]


RE: Image Frame - patrick - 2011-10-07

you're using \[img\](.*?)\[/img\] so that already affects all images. If you talk about all images of your forum (including theme images), that isn't a problem. Instead of styling img {} style .post_body img {}

BTW, what's the point of setting font properties? I know, because of wp-image-48451. I'm just saying that if you want to use this on your forum, you should remove all redundant code.


RE: Image Frame - M.Abbasi - 2011-10-07

Edited Again!


RE: Image Frame - Jason L. - 2011-10-25

Can you explain why your using inline styling?


RE: Image Frame - lexy - 2011-10-27

it is bbcode safe to use and can be changed to auto resize picture 800x600


RE: Image Frame - patrick - 2011-10-27

no offence, but it's just bad written. It's full with useless and inefficient code, errors, and lacks browser compatibility.