Advertisement:

Author Topic: Automatic Twitter Embedding  (Read 8692 times)

Offline dimspace

  • Jr. Member
  • **
  • Posts: 343
    • @dimspace on Twitter
    • Velorooms.com
Automatic Twitter Embedding
« on: February 07, 2014, 10:49:00 AM »
Just a quick tip that enables automatic tweet embedding.

Via Embedtweet.com

in display template

find
Code: [Select]
function template_main()
{

Add after
Code: [Select]
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.




Offline lifeguard81

  • Jr. Member
  • **
  • Posts: 112
Re: Automatic Twitter Embedding
« Reply #1 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
« Last Edit: February 12, 2014, 02:14:46 PM by lifeguard81 »
www.doenwenu.nl
Excuse me for my english. i am from holland :)

Offline jsniezny

  • Newbie
  • *
  • Posts: 5
Re: Automatic Twitter Embedding
« Reply #2 on: March 11, 2014, 07:00:38 AM »
Wow! Thanks guys!

Offline Sakae

  • Full Member
  • ***
  • Posts: 498
  • Gender: Male
    • TigreLOG
Re: Automatic Twitter Embedding
« Reply #3 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.
http://www.tigrelog.com.br
l: simple p: machines

Offline blogmexicano

  • Semi-Newbie
  • *
  • Posts: 30
  • Gender: Male
  • Life is good wth or without you
    • blogmexicano on Facebook
    • @blogmexicano on Twitter
    • Blog Mexicano
Re: Automatic Twitter Embedding
« Reply #4 on: March 16, 2014, 04:14:03 AM »
awesome, thanks
Visita Blog Mexicano entretenimiento y noticias

Offline affnice

  • Semi-Newbie
  • *
  • Posts: 25
    • Coupon Code
Re: Automatic Twitter Embedding
« Reply #5 on: March 24, 2014, 05:49:59 AM »
great tips, but i prefer module  ;D

Offline dimspace

  • Jr. Member
  • **
  • Posts: 343
    • @dimspace on Twitter
    • Velorooms.com
Re: Automatic Twitter Embedding
« Reply #6 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

Offline dimspace

  • Jr. Member
  • **
  • Posts: 343
    • @dimspace on Twitter
    • Velorooms.com
Re: Automatic Twitter Embedding
« Reply #7 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