Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: dimspace on February 07, 2014, 10:49:00 AM

Title: Automatic Twitter Embedding
Post by: dimspace on February 07, 2014, 10:49:00 AM
Just a quick tip that enables automatic tweet embedding.

Via Embedtweet.com

in display template

find
function template_main()
{


Add after
echo '
<script language="javascript" src="http://embedtweet.com/javascripts/embed_v2.js"></script>';


Works a charm.

You can also customise it yourself using the original js files
JS > http://embedtweet.com/javascripts/embed_v2.js
CSS > http://embedtweet.com/stylesheets/embed_v2.css

In the js file you will obviously have to change the path of the css.



Title: Re: Automatic Twitter Embedding
Post by: lifeguard81 on February 12, 2014, 12:56:48 PM
Thnx man!

First i paste the embed code and think.. What the F#^@^@%@^@
But you only need the normal url.

thnx for this tip

Edit i found a bug :D
If you use this, its fine. But if somebody quote the message with the tweet, the post will be empty, and the post with tweet is now a pst with 2 tweets :D
Title: Re: Automatic Twitter Embedding
Post by: jsniezny on March 11, 2014, 07:00:38 AM
Wow! Thanks guys!
Title: Re: Automatic Twitter Embedding
Post by: Sakae on March 12, 2014, 02:34:34 PM
Pretty nice!! I wish to have some time to work on the CSS of it... But the default is pretty cool too.

Thanks.
Title: Re: Automatic Twitter Embedding
Post by: blogmexicano on March 16, 2014, 04:14:03 AM
awesome, thanks
Title: Re: Automatic Twitter Embedding
Post by: affnice on March 24, 2014, 05:49:59 AM
great tips, but i prefer module  ;D
Title: Re: Automatic Twitter Embedding
Post by: dimspace on October 31, 2014, 12:25:52 PM
Sadly embedtweet appears to be more. We discovered the issue and its in relation to overloading twitter with API calls means you get blocked on a busy forum.

We at VR have figured out a solution which is in three parts.

A JS file that does the basics
A Json file that does the parsing of the tweet
And a database entry that stores the tweets to save repeated calls to twitter
And then a single line in display.template to pull it.

waiting to see if my codewriter gives permissions to put out :D
Title: Re: Automatic Twitter Embedding
Post by: dimspace on October 31, 2014, 01:14:47 PM
We have supplied the code and put it in mod requests so someone is free to develop it further as a modification

http://www.simplemachines.org/community/index.php?topic=529560.msg3759170#msg3759170