MyBB Community Forums

Full Version: Image Embeder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Image Embeder want Please ???
Ok... A little more details?
if i post only image link than automatic [IMG] [/IMG] code
Hmm... I'm not sure that there is some plugin for that, I can try something and keep you notified.

For now, this plugin can help a bit maybe: https://community.mybb.com/mods.php?action=view&pid=428

So, you can try with following code...

Go to ACP -> Configuration -> MyCode -> Add new MyCode

Than choose title and paste this:

Regular Expression:
\[url\](.*?).jpg\[/url\]

Replacement:
<img src="$1.jpg" />

Or if you want for image to become also a link:

Replacement:
<a href="$1.jpg"><img src="$1.jpg" /></a>

Please note: that you need to repeat this for each of image extensions.

This is just for .jpg extension

Here are some of other extensions which I have on my mind now...

Regular Expression:
\[url\](.*?).png\[/url\]

Replacement:
<img src="$1.png" />



Regular Expression:
\[url\](.*?).jpeg\[/url\]

Replacement:
<img src="$1.jpeg" />



Regular Expression:
\[url\](.*?).gif\[/url\]

Replacement:
<img src="$1.gif" />

etc.
not working
Please write steps you did and error which occours...