Embed instagram post
#11
how can I use this mycode with the simple url instead of the share url?
Reply
#12
(2017-02-09, 12:11 PM)Neo[blue] Wrote: 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 : 
\[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);

[Image: Capture_d_e_cran_2017_02_09_a_13_09_55.png]

Have a nice day.
N.

Where do I put the regex, and where do I put the replacement file?  Which file do I modify?

Is there a plug-in that I can install for this?
Reply
#13
(2022-07-01, 11:08 PM)nuraman00 Wrote: Where do I put the regex, and where do I put the replacement file?  Which file do I modify?

Is there a plug-in that I can install for this?
ACP > Configuration > MyCode
Click the tab "Add New MyCode"
Tchat en français
Do not ask me help through PM or Discord

Reply
#14
Thread view counts not updated with this mycode. Please fix it.

(2022-07-15, 09:38 AM)tolgacan Wrote: Thread view counts not updated with this mycode. Please fix it.

Ok, I find the solution myself. I just deactivate mycode and replace the code with no any blank. And it's okay now at least for me. It counts every thread. Hope it's working for anybody. So new code is:

<iframe src="//instagram.com/p/$1/embed/captioned/" width="612" height="1200" 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>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)