GatewayRedbirds.com

A Message Board Dedicated to Discussing St. Louis Cardinals Baseball!
It is currently December 12 18, 6:08 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Embedded Tweets
PostPosted: September 17 15, 3:50 pm 
Online
Puppy Murderer
User avatar

Joined: April 25 06, 6:07 pm
Posts: 8914
Location: Across the River
With as much as twitter stuff gets shared, having them embedded is really helpful. We added this at NSBB and it's worked great, it adds a [tweet] tag and you put the URL of the tweet between it to embed: http://punyweakling.com/add-a-tweet-bbc ... pbb-forum/


Top
 Profile  
 
 Post subject: Re: Embedded Tweets
PostPosted: September 21 15, 8:54 am 
Offline
has a link from 538 to share
User avatar

Joined: December 31 69, 6:00 pm
Posts: 34464
Location: Chicago, IL
Thanks! I'll take a look!


Top
 Profile  
 
 Post subject: Re: Embedded Tweets
PostPosted: October 20 15, 7:51 am 
Offline
bronoun enthusiast
User avatar

Joined: April 14 06, 10:45 pm
Posts: 27814
Location: extremely online
We can do this now.


Top
 Profile  
 
 Post subject: Re: Embedded Tweets
PostPosted: May 12 16, 11:41 pm 
Offline
Perennial All-Star
User avatar

Joined: April 18 06, 11:30 pm
Posts: 4214
Location: St. Louis
Can a similar addition be added for tumblr? It's a little different, because the post id isn't enough to construct a full code. However, tumblr does give an embed code that looks something like this:

Code:
 <div class="tumblr-post" data-href="https://embed.tumblr.com/embed/post/RiJu6iHoqaBbY2DtrSDo_A/144283208335" data-did="d4e6f4e2fa2cbebe4b2be0495ec913c0a9111d47"><a href="http://newpagodi.tumblr.com/post/144283208335/stlcardinals-rally-cat-did-the-cat-remember">http://newpagodi.tumblr.com/post/144283208335/stlcardinals-rally-cat-did-the-cat-remember</a></div>  <script async src="https://secure.assets.tumblr.com/post.js"></script>


The result is that the script replaces the div with an iframe that shows the content of the post and looks like this:

Image

I've done some experimenting and it seems that neither the link nor the data-did attribute are essential. The only thing that's really needed is the data-href attribute.

So could something like this be done:
BBcode usage:
Code:
[tumblr]{SIMPLETEXT1}://embed.tumblr.com/embed/post/{SIMPLETEXT2}/{IDENTIFIER}[/tumblr]


HTML replacement:
Code:
<div class="tumblr-post" data-href="{SIMPLETEXT1}://embed.tumblr.com/embed/post/{SIMPLETEXT2}/{IDENTIFIER}"></div>  <script async src="https://secure.assets.tumblr.com/post.js"></script>


The catch is that I don't know how a user is supposed to get SIMPLETEXT2 without asking for the embed code first and then cutting out the portion they need.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group