MyBB Community Forums
Embed Twitter Tweet MyCode - 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: Embed Twitter Tweet MyCode (/thread-192687.html)

Pages: 1 2


Embed Twitter Tweet MyCode - MI-6 - 2016-05-06

I made a MyCode that will embed a Twitter Tweet in a post.

Title: Embed Twitter Status
Short Description: Embeds any public Twitter status in a post.

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

Replacement:
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"><a href="$1"></a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

A working example can be found on my forum here: << snip - domain expired >>


RE: Embed Twitter Tweet MyCode - WallBB - 2016-06-25

Works fine, thanks mate Smile


RE: Embed Twitter Tweet MyCode - Ronshaan - 2016-08-11

cool idea, works fine thanks so much


RE: Embed Twitter Tweet MyCode - palhanow - 2016-08-11

Thank you very much!

And i have to permit html in posts for work, right?

BTW, the <script> </script> tags don't work, i have to remove every time i post a tweet in my Forum.

And after the embed tweet, always show a ".>" 

Is a bug?


RE: Embed Twitter Tweet MyCode - Whiteneo - 2016-08-11

@palhanow nope you only have to create a MyCode with teh code and replacement given.

Then go to a post and use your

[twitter]url to tweet[/twitter]

On a post i think i dunno how twitter works but mycode works in that sense.


RE: Embed Twitter Tweet MyCode - joey1 - 2016-09-03

neat thank you, it' works fine for me Smile


RE: Embed Twitter Tweet MyCode - thesos - 2016-09-12

After you set up the code like in the op, how do you use it in the reply?


RE: Embed Twitter Tweet MyCode - maintainin - 2016-10-28

Hi all,

While this does work for posting tweets to my board there is no sound on videos. Any fix for that?

Also, how does mybb not have a simpler way of embedding tweets yet?


RE: Embed Twitter Tweet MyCode - Darkrad - 2016-12-25

I noticed this breaks something in forum.

I will try to explain
You see there's #9 in this message, if I send link of it to another user that user would directly see #9 message.
Same applies to going to Last Post.

It works okay normally,
But if in that page any particular comment has this twitter code, then user goes to -2# message, therefore when last post is #9, user sees #7.


RE: Embed Twitter Tweet MyCode - phpkiller - 2018-11-19

https://community.mybb.com/thread-210920-post-1319140.html#pid1319140
my solution