@ -2824,9 +2824,14 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
var id = tweet . mid . toString ( ) ,
error _obj = { twitterid : tweet . mid } ,
the _url = "http://api.twitter.com/1/statuses/show.json?id=" + tweet . mid + "&include_entities=true&callback=?" ,
twitter _timeout = setTimeout ( VMM . ExternalAPI . twitter . errorTimeOut , VMM . master _config . timers . api , tweet ) ,
callback _timeout = setTimeout ( callback , VMM . master _config . timers . api , tweet ) ;
the _url = "http://api.twitter.com/1/statuses/show.json?id=" + tweet . mid + "&include_entities=true&callback=?" ;
//twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOut, VMM.master_config.timers.api, tweet),
//callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
VMM . ExternalAPI . twitter . getOEmbed ( tweet , callback ) ;
/ *
// Disabled thanks to twitter's new api
VMM . getJSON ( the _url , function ( d ) {
var id = d . id _str ,
@ -2871,6 +2876,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
callback ( ) ;
} ) ;
* /
} ,
errorTimeOut : function ( tweet ) {
@ -2899,12 +2905,48 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
VMM . master _config . twitter . que . remove ( 0 ) ;
}
} ,
getOEmbed : function ( tweet , callback ) {
var the _url = "http://api.twitter.com/1/statuses/oembed.json?id=" + tweet . mid + "&omit_script=true&include_entities=true&callback=?" ;
VMM . getJSON ( the _url , function ( d ) {
var twit = "" ,
tuser = "" ;
// TWEET CONTENT
twit += d . html . split ( "<\/p>\—" ) [ 0 ] + "</p></blockquote>" ;
tuser = d . author _url . split ( "twitter.com\/" ) [ 1 ] ;
// TWEET AUTHOR
twit += "<div class='vcard author'>" ;
twit += "<a class='screen-name url' href='" + d . author _url + "' target='_blank'>" ;
twit += "<span class='avatar'></span>" ;
twit += "<span class='fn'>" + d . author _name + "</span>" ;
twit += "<span class='nickname'>@" + tuser + "<span class='thumbnail-inline'></span></span>" ;
twit += "</a>" ;
twit += "</div>" ;
VMM . attachElement ( "#" + tweet . id . toString ( ) , twit ) ;
VMM . attachElement ( "#text_thumb_" + tweet . id . toString ( ) , d . html ) ;
VMM . attachElement ( "#marker_content_" + tweet . id . toString ( ) , d . html ) ;
} )
. error ( function ( jqXHR , textStatus , errorThrown ) {
trace ( "TWITTER error" ) ;
trace ( "TWITTER ERROR: " + textStatus + " " + jqXHR . responseText ) ;
VMM . attachElement ( "#" + tweet . id , VMM . MediaElement . loadingmessage ( "ERROR LOADING TWEET " + tweet . mid ) ) ;
} )
. success ( function ( d ) {
callback ( ) ;
} ) ;
} ,
getHTML : function ( id ) {
//var the_url = document.location.protocol + "//api.twitter.com/1/statuses/oembed.json?id=" + id+ "&callback=?";
var the _url = "http://api.twitter.com/1/statuses/oembed.json?id=" + id + "&callback=?" ;
var the _url = "http://api.twitter.com/1/statuses/oembed.json?id=" + id + "&omit_script=true&include_entities=true& callback=?" ;
VMM . getJSON ( the _url , VMM . ExternalAPI . twitter . onJSONLoaded ) ;
} ,
@ -3095,7 +3137,13 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
api _key = Aes . Ctr . decrypt ( VMM . ExternalAPI . keys _master . google , VMM . ExternalAPI . keys _master . vp , 256 ) ;
}
map _url = "http://maps.googleapis.com/maps/api/js?key=" + api _key + "&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady" ;
/ *
Investigating a google map api change on the latest release that causes custom map types to stop working
http : //stackoverflow.com/questions/13486271/google-map-markermanager-cannot-call-method-substr-of-undefined
soulution is to use api ver 3.9
* /
map _url = "http://maps.googleapis.com/maps/api/js?key=" + api _key + "&v=3.9&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady" ;
if ( VMM . master _config . googlemaps . active ) {
VMM . master _config . googlemaps . que . push ( m ) ;
@ -3581,7 +3629,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
"stamen" : "Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://creativecommons.org/licenses/by-sa/3.0'>CC BY SA</a>." ,
"apple" : "Map data © 2012 Apple, Imagery © 2012 Apple"
} ,
map _providers : {
"toner" : {
"url" : "http://{S}tile.stamen.com/toner/{Z}/{X}/{Y}.png" ,
@ -4840,6 +4888,7 @@ if(typeof VMM != 'undefined' && typeof VMM.DragSlider == 'undefined') {
function onDragMove ( e ) {
dragMove ( e . data . element , e ) ;
}
function dragStart ( elem , delem , e ) {
@ -7354,28 +7403,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
} ;
function ie7Build ( ) {
trace ( "IE7 or lower" ) ;
for ( var i = 0 ; i < _dates . length ; i ++ ) {
trace ( _dates [ i ] ) ;
/ *
var st = VMM . Date . prettyDate ( data . startdate ) ;
var en = VMM . Date . prettyDate ( data . enddate ) ;
var tag = "" ;
if ( data . tag != null && data . tag != "" ) {
tag = VMM . createElement ( "span" , data . tag , "slide-tag" ) ;
}
if ( st != en ) {
c . text += VMM . createElement ( "h2" , st + " — " + en + tag , "date" ) ;
} else {
c . text += VMM . createElement ( "h2" , st + tag , "date" ) ;
}
* /
}
} ;
function updateSize ( ) {
trace ( "UPDATE SIZE" ) ;
config . width = VMM . Lib . width ( $timeline ) ;