News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Automatic Twitter Embedding

Started by dimspace, February 07, 2014, 10:49:00 AM

Previous topic - Next topic

dimspace

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.




lifeguard81

#1
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
www.doenwenu.nl
Excuse me for my english. i am from holland :)

jsniezny


Sakae

Pretty nice!! I wish to have some time to work on the CSS of it... But the default is pretty cool too.

Thanks.
http://www.tigrelog.com.br
l: simple p: machines

blogmexicano

Visita Blog Mexicano entretenimiento y noticias


dimspace

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

dimspace

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

Advertisement: