@ -185,6 +185,13 @@ if (typeof VMM == 'undefined') {
que : [ ]
} ,
webthumb : {
active : false ,
array : [ ] ,
api _loaded : false ,
que : [ ]
} ,
googlemaps : {
active : false ,
map _active : false ,
@ -2631,6 +2638,9 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
if ( VMM . master _config . flickr . active ) {
VMM . ExternalAPI . flickr . pushQue ( ) ;
}
if ( VMM . master _config . webthumb . active ) {
VMM . ExternalAPI . webthumb . pushQue ( ) ;
}
} ,
twitter : {
@ -2909,11 +2919,9 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
get : function ( m ) {
var timer ,
api _key ,
map _vars ,
map _url ,
map ;
map _url ;
map _ vars = VMM . Util . getUrlVars ( m . id ) ;
m . vars = VMM . Util . getUrlVars ( m . id ) ;
if ( VMM . ExternalAPI . keys . google != "" ) {
api _key = VMM . ExternalAPI . keys . google ;
@ -2922,12 +2930,11 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
}
map _url = "http://maps.googleapis.com/maps/api/js?key=" + api _key + "&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady" ;
map = { url : m . id , vars : map _vars , id : m . uid } ;
if ( VMM . master _config . googlemaps . active ) {
VMM . master _config . googlemaps . que . push ( map ) ;
VMM . master _config . googlemaps . que . push ( m ) ;
} else {
VMM . master _config . googlemaps . que . push ( map ) ;
VMM . master _config . googlemaps . que . push ( m ) ;
if ( VMM . master _config . googlemaps . api _loaded ) {
@ -2940,26 +2947,19 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
} ,
create : function ( m ) {
trace ( m . url ) ;
VMM . ExternalAPI . googlemaps . createAPIMap ( m ) ;
if ( m . url [ 0 ] . match ( "msid" ) ) {
//VMM.ExternalAPI.googlemaps.createAPIMap(m);
} else {
//VMM.ExternalAPI.googlemaps.createiFrameMap(m);
}
} ,
createiFrameMap : function ( m ) {
var embed _url = m . url + "&output=embed" ,
var embed _url = m . id + "&output=embed" ,
mc = "" ,
unique _map _id = m . id . toString ( ) + "_gmap" ;
unique _map _id = m . uid . toString ( ) + "_gmap" ;
mc += "<div class='google-map' id='" + unique _map _id + "' style='width=100%;height=100%;'>" ;
mc += "<iframe width='100%' height='100%' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='" + embed _url + "'></iframe>" ;
mc += "</div>" ;
VMM . attachElement ( "#" + m . id , mc ) ;
VMM . attachElement ( "#" + m . u id, mc ) ;
} ,
@ -2968,7 +2968,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
layer ,
map ,
map _options ,
unique _map _id = m . id . toString ( ) + "_gmap" ,
unique _map _id = m . u id. toString ( ) + "_gmap" ,
map _attribution _html = "" ,
location = new google . maps . LatLng ( 41.875696 , - 87.624207 ) ,
latlong ,
@ -3036,19 +3036,19 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
}
if ( type . of ( VMM . Util . getUrlVars ( m . url ) [ "ll" ] ) == "string" ) {
if ( type . of ( VMM . Util . getUrlVars ( m . id ) [ "ll" ] ) == "string" ) {
has _location = true ;
latlong = VMM . Util . getUrlVars ( m . url ) [ "ll" ] . split ( "," ) ;
latlong = VMM . Util . getUrlVars ( m . id ) [ "ll" ] . split ( "," ) ;
location = new google . maps . LatLng ( parseFloat ( latlong [ 0 ] ) , parseFloat ( latlong [ 1 ] ) ) ;
} else if ( type . of ( VMM . Util . getUrlVars ( m . url ) [ "sll" ] ) == "string" ) {
latlong = VMM . Util . getUrlVars ( m . url ) [ "sll" ] . split ( "," ) ;
} else if ( type . of ( VMM . Util . getUrlVars ( m . id ) [ "sll" ] ) == "string" ) {
latlong = VMM . Util . getUrlVars ( m . id ) [ "sll" ] . split ( "," ) ;
location = new google . maps . LatLng ( parseFloat ( latlong [ 0 ] ) , parseFloat ( latlong [ 1 ] ) ) ;
}
if ( type . of ( VMM . Util . getUrlVars ( m . url ) [ "z" ] ) == "string" ) {
if ( type . of ( VMM . Util . getUrlVars ( m . id ) [ "z" ] ) == "string" ) {
has _zoom = true ;
zoom = parseFloat ( VMM . Util . getUrlVars ( m . url ) [ "z" ] ) ;
zoom = parseFloat ( VMM . Util . getUrlVars ( m . id ) [ "z" ] ) ;
}
map _options = {
@ -3067,7 +3067,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
}
}
VMM . attachElement ( "#" + m . id , "<div class='google-map' id='" + unique _map _id + "' style='width=100%;height=100%;'></div>" ) ;
VMM . attachElement ( "#" + m . u id, "<div class='google-map' id='" + unique _map _id + "' style='width=100%;height=100%;'></div>" ) ;
map = new google . maps . Map ( document . getElementById ( unique _map _id ) , map _options ) ;
@ -3081,11 +3081,11 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
}
// DETERMINE IF KML IS POSSIBLE
if ( m . url [ 0 ] . match ( "msid" ) ) {
if ( m . id [ 0 ] . match ( "msid" ) ) {
loadKML ( ) ;
} else {
//loadPlaces();
if ( type . of ( VMM . Util . getUrlVars ( m . url ) [ "q" ] ) == "string" ) {
if ( type . of ( VMM . Util . getUrlVars ( m . id ) [ "q" ] ) == "string" ) {
geocodePlace ( ) ;
}
}
@ -3096,7 +3096,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
var geocoder = new google . maps . Geocoder ( ) ,
address = VMM . Util . getUrlVars ( m . url ) [ "q" ] ,
address = VMM . Util . getUrlVars ( m . id ) [ "q" ] ,
marker ;
if ( address . match ( "loc:" ) ) {
@ -3164,8 +3164,8 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
types : [ 'country' , 'neighborhood' , 'political' , 'locality' , 'geocode' ]
} ;
if ( type . of ( VMM . Util . getUrlVars ( m . url ) [ "q" ] ) == "string" ) {
search _request . query = VMM . Util . getUrlVars ( m . url ) [ "q" ] ;
if ( type . of ( VMM . Util . getUrlVars ( m . id ) [ "q" ] ) == "string" ) {
search _request . query = VMM . Util . getUrlVars ( m . id ) [ "q" ] ;
}
if ( has _location ) {
@ -3215,8 +3215,8 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
}
} else {
trace ( "USING SIMPLE IFRAME MAP EMBED" ) ;
if ( m . url [ 0 ] . match ( "https" ) ) {
m . url = m . url [ 0 ] . replace ( "https" , "http" ) ;
if ( m . id [ 0 ] . match ( "https" ) ) {
m . id = m . url [ 0 ] . replace ( "https" , "http" ) ;
}
VMM . ExternalAPI . googlemaps . createiFrameMap ( m ) ;
}
@ -3259,8 +3259,8 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
places _url = "https://maps.googleapis.com/maps/api/place/textsearch/json?key=" + api _key + "&sensor=false&language=" + m . lang + "&" ;
if ( type . of ( VMM . Util . getUrlVars ( m . url ) [ "q" ] ) == "string" ) {
places _url += "query=" + VMM . Util . getUrlVars ( m . url ) [ "q" ] ;
if ( type . of ( VMM . Util . getUrlVars ( m . id ) [ "q" ] ) == "string" ) {
places _url += "query=" + VMM . Util . getUrlVars ( m . id ) [ "q" ] ;
}
if ( has _location ) {
@ -3341,7 +3341,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
function loadKML ( ) {
var kml _url , kml _layer , infowindow , text ;
kml _url = m . url + "&output=kml" ;
kml _url = m . id + "&output=kml" ;
kml _url = kml _url . replace ( "&output=embed" , "" ) ;
kml _layer = new google . maps . KmlLayer ( kml _url , { preserveViewport : true } ) ;
infowindow = new google . maps . InfoWindow ( ) ;
@ -3605,19 +3605,18 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
googledocs : {
get : function ( m ) {
var doc = { url : m . id , id : m . uid } ;
VMM . master _config . googledocs . que . push ( doc ) ;
VMM . master _config . googledocs . que . push ( m ) ;
VMM . master _config . googledocs . active = true ;
} ,
create : function ( doc ) {
create : function ( m ) {
var mediaElem = "" ;
if ( doc . url . match ( /docs.google.com/i ) ) {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + doc . url + "&embedded=true'></iframe>" ;
if ( m . id . match ( /docs.google.com/i ) ) {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + m . id + "&embedded=true'></iframe>" ;
} else {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + "http://docs.google.com/viewer?url=" + doc . url + "&embedded=true'></iframe>" ;
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + "http://docs.google.com/viewer?url=" + m . id + "&embedded=true'></iframe>" ;
}
VMM . attachElement ( "#" + doc . id , mediaElem ) ;
VMM . attachElement ( "#" + m . u id, mediaElem ) ;
} ,
pushQue : function ( ) {
@ -3633,27 +3632,26 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
flickr : {
get : function ( m ) {
var flick = { mid : m . id , id : m . uid , link : m . link } ;
VMM . master _config . flickr . que . push ( flick ) ;
VMM . master _config . flickr . que . push ( m ) ;
VMM . master _config . flickr . active = true ;
} ,
create : function ( flick , callback ) {
create : function ( m , callback ) {
var api _key ,
callback _timeout = setTimeout ( callback , VMM . master _config . timers . api , flick ) ;
callback _timeout = setTimeout ( callback , VMM . master _config . timers . api , m ) ;
if ( typeof VMM . master _config . Timeline != 'undefined' && VMM . master _config . Timeline . api _keys . flickr != "" ) {
api _key = VMM . master _config . Timeline . api _keys . flickr ;
} else {
api _key = Aes . Ctr . decrypt ( VMM . master _config . api _keys _master . flickr , VMM . master _config . vp , 256 )
}
var the _url = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=" + api _key + "&photo_id=" + flick . m id + "&format=json&jsoncallback=?" ;
var the _url = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=" + api _key + "&photo_id=" + m . id + "&format=json&jsoncallback=?" ;
VMM . getJSON ( the _url , function ( d ) {
var flickr _id = d . sizes . size [ 0 ] . url . split ( "photos\/" ) [ 1 ] . split ( "/" ) [ 1 ] ;
var flickr _large _id = "#" + flick . id ,
flickr _thumb _id = "#" + flick . id + "_thumb" ;
var flickr _large _id = "#" + m . u id,
flickr _thumb _id = "#" + m . u id + "_thumb" ;
//flickr_thumb_id = "flickr_" + uid + "_thumb";
var flickr _img _size ,
@ -3662,15 +3660,15 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
flickr _best _size = "Large" ;
flickr _best _size = VMM . ExternalAPI . flickr . sizes ( VMM . master _config . sizes . api . height ) ;
for ( var i = 0 ; i < d . sizes . size . length ; i ++ ) {
if ( d . sizes . size [ i ] . label == flickr _best _size ) {
flickr _size _found = true ;
flickr _img _size = d . sizes . size [ i ] . source ;
}
}
if ( ! flickr _size _found ) {
flickr _img _size = d . sizes . size [ d . sizes . size . length - 1 ] . source ;
flickr _img _size = d . sizes . size [ d . sizes . size . length - 2 ] . source ;
}
flickr _img _thumb = d . sizes . size [ 0 ] . source ;
@ -3710,7 +3708,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
} else if ( s <= 480 ) {
_size = "Medium 640" ;
} else if ( s <= 600 ) {
_size = "Medium 800 " ;
_size = "Large " ;
} else {
_size = "Large" ;
}
@ -3721,11 +3719,11 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
} ,
instagram : {
get : function ( mid , thumb ) {
get : function ( m , thumb ) {
if ( thumb ) {
return "http://instagr.am/p/" + mid + "/media/?size=t" ;
return "http://instagr.am/p/" + m . id + "/media/?size=t" ;
} else {
return "http://instagr.am/p/" + mid + "/media/?size=" + VMM . ExternalAPI . instagram . sizes ( VMM . master _config . sizes . api . height ) ;
return "http://instagr.am/p/" + m . id + "/media/?size=" + VMM . ExternalAPI . instagram . sizes ( VMM . master _config . sizes . api . height ) ;
}
} ,
@ -3746,15 +3744,14 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
soundcloud : {
get : function ( m ) {
var sound = { mid : m . id , id : m . uid } ;
VMM . master _config . soundcloud . que . push ( sound ) ;
VMM . master _config . soundcloud . que . push ( m ) ;
VMM . master _config . soundcloud . active = true ;
} ,
create : function ( sound , callback ) {
var the _url = "http://soundcloud.com/oembed?url=" + sound . m id + "&format=js&callback=?" ;
create : function ( m , callback ) {
var the _url = "http://soundcloud.com/oembed?url=" + m . id + "&format=js&callback=?" ;
VMM . getJSON ( the _url , function ( d ) {
VMM . attachElement ( "#" + sound . id , d . html ) ;
VMM . attachElement ( "#" + m . u id, d . html ) ;
callback ( ) ;
} ) ;
} ,
@ -3771,20 +3768,19 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
wikipedia : {
get : function ( m ) {
var api _obj = { url : m . id , id : m . uid , lang : m . lang } ;
VMM . master _config . wikipedia . que . push ( api _obj ) ;
VMM . master _config . wikipedia . que . push ( m ) ;
VMM . master _config . wikipedia . active = true ;
} ,
create : function ( api _obj , callback ) {
var the _url = "http://" + api _obj . lang + ".wikipedia.org/w/api.php?action=query&prop=extracts&redirects=&titles=" + api _obj . url + "&exintro=1&format=json&callback=?" ;
callback _timeout = setTimeout ( callback , VMM . master _config . timers . api , api _obj ) ;
create : function ( m , callback ) {
var the _url = "http://" + m . lang + ".wikipedia.org/w/api.php?action=query&prop=extracts&redirects=&titles=" + m . id + "&exintro=1&format=json&callback=?" ;
callback _timeout = setTimeout ( callback , VMM . master _config . timers . api , m ) ;
if ( VMM . Browser . browser == "Explorer" && parseInt ( VMM . Browser . version , 10 ) >= 7 && window . XDomainRequest ) {
var temp _text = "<h4><a href='http://" + VMM . master _config . language . api . wikipedia + ".wikipedia.org/wiki/" + api _obj . url + "' target='_blank'>" + api _obj . url + "</a></h4>" ;
var temp _text = "<h4><a href='http://" + VMM . master _config . language . api . wikipedia + ".wikipedia.org/wiki/" + m . id + "' target='_blank'>" + m . url + "</a></h4>" ;
temp _text += "<span class='wiki-source'>" + VMM . master _config . language . messages . wikipedia + "</span>" ;
temp _text += "<p>Wikipedia entry unable to load using Internet Explorer 8 or below.</p>" ;
VMM . attachElement ( "#" + api _obj . id , temp _text ) ;
VMM . attachElement ( "#" + m . u id, temp _text ) ;
}
VMM . getJSON ( the _url , function ( d ) {
@ -3818,7 +3814,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
if ( wiki _extract . match ( "REDIRECT" ) ) {
} else {
VMM . attachElement ( "#" + api _obj . id , _wiki ) ;
VMM . attachElement ( "#" + m . u id, _wiki ) ;
}
}
//callback();
@ -3828,14 +3824,14 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
trace ( "WIKIPEDIA ERROR: " + textStatus + " " + jqXHR . responseText ) ;
trace ( errorThrown ) ;
VMM . attachElement ( "#" + api _obj . id , VMM . MediaElement . loadingmessage ( "<p>Wikipedia is not responding</p>" ) ) ;
VMM . attachElement ( "#" + m . u id, VMM . MediaElement . loadingmessage ( "<p>Wikipedia is not responding</p>" ) ) ;
// TRY AGAIN?
clearTimeout ( callback _timeout ) ;
if ( VMM . master _config . wikipedia . tries < 4 ) {
trace ( "WIKIPEDIA ATTEMPT " + VMM . master _config . wikipedia . tries ) ;
trace ( api _obj ) ;
trace ( m ) ;
VMM . master _config . wikipedia . tries ++ ;
VMM . ExternalAPI . wikipedia . create ( api _obj , callback ) ;
VMM . ExternalAPI . wikipedia . create ( m , callback ) ;
} else {
callback ( ) ;
}
@ -3865,10 +3861,9 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
youtube : {
get : function ( m ) {
var the _url = "http://gdata.youtube.com/feeds/api/videos/" + m . id + "?v=2&alt=jsonc&callback=?" ,
vid = { mid : m . id , id : m . uid , start : m . start , hd : m . hd } ;
var the _url = "http://gdata.youtube.com/feeds/api/videos/" + m . id + "?v=2&alt=jsonc&callback=?" ;
VMM . master _config . youtube . que . push ( vid ) ;
VMM . master _config . youtube . que . push ( m ) ;
if ( ! VMM . master _config . youtube . active ) {
if ( ! VMM . master _config . youtube . api _loaded ) {
@ -3880,42 +3875,42 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
// THUMBNAIL
VMM . getJSON ( the _url , function ( d ) {
VMM . ExternalAPI . youtube . createThumb ( d , vid )
VMM . ExternalAPI . youtube . createThumb ( d , m )
} ) ;
} ,
create : function ( vid ) {
if ( typeof ( vid . start ) != 'undefined' ) {
create : function ( m ) {
if ( typeof ( m . start ) != 'undefined' ) {
var vidstart = vid . start . toString ( ) ,
var vidstart = m . start . toString ( ) ,
vid _start _minutes = 0 ,
vid _start _seconds = 0 ;
if ( vidstart . match ( 'm' ) ) {
vid _start _minutes = parseInt ( vidstart . split ( "m" ) [ 0 ] , 10 ) ;
vid _start _seconds = parseInt ( vidstart . split ( "m" ) [ 1 ] . split ( "s" ) [ 0 ] , 10 ) ;
vid . start = ( vid _start _minutes * 60 ) + vid _start _seconds ;
m . start = ( vid _start _minutes * 60 ) + vid _start _seconds ;
} else {
vid . start = 0 ;
m . start = 0 ;
}
} else {
vid . start = 0 ;
m . start = 0 ;
}
var p = {
active : false ,
player : { } ,
name : vid . id ,
name : m . u id,
playing : false ,
hd : false
} ;
if ( typeof ( vid . hd ) != 'undefined' ) {
if ( typeof ( m . hd ) != 'undefined' ) {
p . hd = true ;
}
p . player [ vid . id ] = new YT . Player ( vid . id , {
p . player [ m . id ] = new YT . Player ( m . u id, {
height : '390' ,
width : '640' ,
playerVars : {
@ -3923,10 +3918,10 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
color : 'white' ,
showinfo : 0 ,
theme : 'light' ,
start : vid . start ,
start : m . start ,
rel : 0
} ,
videoId : vid . m id,
videoId : m . id ,
events : {
'onReady' : VMM . ExternalAPI . youtube . onPlayerReady ,
'onStateChange' : VMM . ExternalAPI . youtube . onStateChange
@ -3936,12 +3931,12 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
VMM . master _config . youtube . array . push ( p ) ;
} ,
createThumb : function ( d , vid ) {
createThumb : function ( d , m ) {
trace ( "CREATE THUMB" ) ;
trace ( d ) ;
trace ( vid ) ;
trace ( m ) ;
if ( typeof d . data != 'undefined' ) {
var thumb _id = "#" + vid . id + "_thumb" ;
var thumb _id = "#" + m . u id + "_thumb" ;
VMM . attachElement ( thumb _id , "<img src='" + d . data . thumbnail . sqDefault + "'>" ) ;
}
@ -3995,25 +3990,31 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
vimeo : {
get : function ( m ) {
var vid = { mid : m . id , id : m . uid } ;
VMM . master _config . vimeo . que . push ( vid ) ;
VMM . master _config . vimeo . que . push ( m ) ;
VMM . master _config . vimeo . active = true ;
} ,
create : function ( vid , callback ) {
create : function ( m , callback ) {
trace ( "VIMEO CREATE" ) ;
// THUMBNAIL
var the _url = "http://vimeo.com/api/v2/video/" + vid . mid + ".json" ;
VMM . getJSON ( the _url , function ( d ) {
VMM . ExternalAPI . vimeo . createThumb ( d , vid ) ;
var thumb _url = "http://vimeo.com/api/v2/video/" + m . id + ".json" ,
video _url = "http://player.vimeo.com/video/" + m . id + "?title=0&byline=0&portrait=0&color=ffffff" ;
VMM . getJSON ( thumb _url , function ( d ) {
VMM . ExternalAPI . vimeo . createThumb ( d , m ) ;
callback ( ) ;
} ) ;
// VIDEO
VMM . attachElement ( "#" + m . uid , "<iframe autostart='false' frameborder='0' width='100%' height='100%' src='" + video _url + "'></iframe>" ) ;
} ,
createThumb : function ( d , vid ) {
createThumb : function ( d , m ) {
trace ( "VIMEO CREATE THUMB" ) ;
var thumb _id = "#" + vid . id + "_thumb" ;
var thumb _id = "#" + m . u id + "_thumb" ;
VMM . attachElement ( thumb _id , "<img src='" + d [ 0 ] . thumbnail _small + "'>" ) ;
} ,
@ -4022,14 +4023,51 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
VMM . ExternalAPI . vimeo . create ( VMM . master _config . vimeo . que [ 0 ] , VMM . ExternalAPI . vimeo . pushQue ) ;
VMM . master _config . vimeo . que . remove ( 0 ) ;
}
/ *
for ( var i = 0 ; i < VMM . master _config . vimeo . que . length ; i ++ ) {
VMM . ExternalAPI . vimeo . create ( VMM . master _config . vimeo . que [ i ] ) ;
}
VMM . master _config . vimeo . que = [ ] ;
* /
} ,
webthumb : {
get : function ( m , thumb ) {
VMM . master _config . webthumb . que . push ( m ) ;
VMM . master _config . webthumb . active = true ;
} ,
sizes : function ( s ) {
var _size = "" ;
if ( s <= 150 ) {
_size = "t" ;
} else if ( s <= 306 ) {
_size = "m" ;
} else {
_size = "l" ;
}
return _size ;
} ,
create : function ( m ) {
trace ( "WEB THUMB CREATE" ) ;
//http://pagepeeker.com/t/{size}/{url}
//http://api.snapito.com/free/lc?url=
var thumb _url = "http://pagepeeker.com/t/" ;
url = m . id . replace ( "http://" , "" ) ; //.split("/")[0];
// Main Image
VMM . attachElement ( "#" + m . uid , "<a href='" + m . id + "' target='_blank'><img src='" + thumb _url + "x/" + url + "'></a>" ) ;
// Thumb
VMM . attachElement ( "#" + m . uid + "_thumb" , "<a href='" + m . id + "' target='_blank'><img src='" + thumb _url + "t/" + url + "'></a>" ) ;
} ,
pushQue : function ( ) {
for ( var i = 0 ; i < VMM . master _config . webthumb . que . length ; i ++ ) {
VMM . ExternalAPI . webthumb . create ( VMM . master _config . webthumb . que [ i ] ) ;
}
VMM . master _config . webthumb . que = [ ] ;
}
}
} ) . init ( ) ;
@ -4135,7 +4173,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
}
return mediaElem ;
} else if ( m . type == "website" ) {
mediaElem = "<div class='thumbnail thumb-website'></div>" ;
mediaElem = "<div class='thumbnail thumb-website' id='" + uid + "_thumb' ></div>" ;
return mediaElem ;
} else {
mediaElem = "<div class='thumbnail thumb-plaintext'></div>" ;
@ -4177,7 +4215,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
VMM . ExternalAPI . flickr . get ( m ) ;
// INSTAGRAM
} else if ( m . type == "instagram" ) {
mediaElem = "<div class='media-image media-shadow'><a href='" + m . link + "' target='_blank'><img src='" + VMM . ExternalAPI . instagram . get ( m . id ) + "'></a></div>" ;
mediaElem = "<div class='media-image media-shadow'><a href='" + m . link + "' target='_blank'><img src='" + VMM . ExternalAPI . instagram . get ( m ) + "'></a></div>" ;
//VMM.ExternalAPI.instagram.get(m.id, uid);
// GOOGLE DOCS
} else if ( m . type == "googledoc" ) {
@ -4189,7 +4227,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
VMM . ExternalAPI . youtube . get ( m ) ;
// VIMEO
} else if ( m . type == "vimeo" ) {
mediaElem = "<div class='media-shadow'><iframe class=' media-frame video vimeo' autostart='false' frameborder='0' w idth ='100%' height='100%' src='http://player.vimeo.com/video/ " + m . id + "?title=0&byline=0&portrait=0&color=ffffff'></iframe> </div>" ;
mediaElem = "<div class='media-shadow media-frame video vimeo' id='" + m . u id + "'>" + loading _messege + " </div>" ;
VMM . ExternalAPI . vimeo . get ( m ) ;
// DAILYMOTION
} else if ( m . type == "dailymotion" ) {
@ -4237,10 +4275,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
mediaElem = "<div class='plain-text'><div class='container'>" + VMM . Util . properQuotes ( m . id ) + "</div></div>" ;
// WEBSITE
} else if ( m . type == "website" ) {
//mediaElem = "<div class='media-shadow'><iframe class='media-frame website' frameborder='0' autostart='false' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='" + m.id + "'></iframe></div>";
//mediaElem = "<a href='" + m.id + "' target='_blank'>" + "<img src='http://api.snapito.com/free/lc?url=" + m.id + "'></a>";
mediaElem = "<div class='media-shadow website'><a href='" + m . id + "' target='_blank'>" + "<img src='http://api1.thumbalizr.com/?url=" + m . id . replace ( /[\./]$/g , "" ) + "&width=300' class='media-image'></a></div>" ;
mediaElem = "<div class='media-shadow website' id='" + m . uid + "'>" + loading _messege + "</div>" ;
VMM . ExternalAPI . webthumb . get ( m ) ;
//mediaElem = "<div class='media-shadow website'><a href='" + m.id + "' target='_blank'>" + "<img src='http://api1.thumbalizr.com/?url=" + m.id.replace(/[\./]$/g, "") + "&width=300' class='media-image'></a></div>";
// NO MATCH
} else {