Embed Twitter Tweet MyCode
#1
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 >>
[Image: misc.php?page=signature]
Reply
#2
Works fine, thanks mate Smile
- MyBB Heart
Reply
#3
cool idea, works fine thanks so much
Reply
#4
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?
Reply
#5
@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.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply
#6
This user has been denied support. This user has been denied support.
neat thank you, it' works fine for me Smile
Sad 
[Image: 7gZ64Mm.png]
Reply
#7
After you set up the code like in the op, how do you use it in the reply?
Reply
#8
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?
Reply
#9
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.
Reply
#10
https://community.mybb.com/thread-210920...pid1319140
my solution
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)