2017-02-09, 12:11 PM
Hello world,
This is my first post, i'm a french admin on a small friends private forum and i just fork from something found on a phpbb help forum. A code for embedding an instagram post in forum.
Here is the regex :
and the replacement code :
remove "captioned/" if you want.
Hope you enjoy it.
Tell me if you find a better way (or if you have an idea to improve it in any way)
you user just have to copy/paste the share url of an instagram post and put it in [insta] [/insta] tags.
With some CSS (border, light shadow), it can be nicely integrated to your forum posts, i put it directly in replacement code but you cant have it here :
![[Image: Capture_d_e_cran_2017_02_09_a_13_09_55.png]](https://camo.mybb.com/ea38e4ec0b3dbcc6b4587f2c0e3e07092b36c429/687474703a2f2f707265766965772e6962622e636f2f63384b6731462f436170747572655f645f655f6372616e5f323031375f30325f30395f615f31335f30395f35352e706e67)
Have a nice day.
N.
This is my first post, i'm a french admin on a small friends private forum and i just fork from something found on a phpbb help forum. A code for embedding an instagram post in forum.
Here is the regex :
\[insta\]https://www.instagram.com/p/(.*?)/\[/insta\]
and the replacement code :
<iframe src="//instagram.com/p/$1/embed/captioned/" width="612" height="710" frameborder="0" scrolling="auto" allowtransparency="true" style="border: 1px #b2a998 solid; border-radius: 5px; box-shadow: 0px 0px 7px 0px rgba(106, 101, 91, 0.5); "
></iframe>
remove "captioned/" if you want.
Hope you enjoy it.
Tell me if you find a better way (or if you have an idea to improve it in any way)
you user just have to copy/paste the share url of an instagram post and put it in [insta] [/insta] tags.
With some CSS (border, light shadow), it can be nicely integrated to your forum posts, i put it directly in replacement code but you cant have it here :
border: 1px #b2a998 solid;
border-radius: 5px;
box-shadow: 0px 0px 7px 0px rgba(106, 101, 91, 0.5);
Have a nice day.
N.