Rispondi al commento

user warning: Table 'c109agcalcio.d6_wysiwyg' doesn't exist query: SELECT * FROM d6_wysiwyg in /var/www/sites/all/modules/wysiwyg/wysiwyg.module on line 538.

Calciomercato in DIRETTA Pazienza all'Udinese

in

ROMA - Si chiude oggi alle 19 la finestra invernale del calciomercato. Segui gli ultimi colpi in tempo reale!




.tweet{font-family:Verdana;font-size:12px;color:#333}
.tweet .tweet_list{list-style-type:none;background-color:#fdfdfd;margin:0;padding:0}
.tweet .tweet_list li{padding:.5em;width:auto;height:auto;}
.tweet .tweet_list li a{color:#005998;display:inline;float:none;line-height:auto}
.tweet .tweet_list .tweet_even{background-color:#f3f3f3}
.tweet .tweet_list li small{font-size:10px;font-weight:700;display:block;float:left;width:40px;color:#333;font-weight:bold;margin:0;padding:0;padding-top:2px}
.tweet_text{color:#333;font-weight:normal}

(function($j) {

$j.fn.tweet = function(o){
var s = $j.extend({
username: null, // [string or array] required unless using the 'query' option; one or more twitter screen names
list: null, // [string] optional name of list belonging to username
favorites: false, // [boolean] display the user's favorites instead of his tweets
query: null, // [string] optional search query
avatar_size: null, // [integer] height and width of avatar if displayed (48px max)
count: 3, // [integer] how many tweets to display?
fetch: null, // [integer] how many tweets to fetch via the API (set this higher than 'count' if using the 'filter' option)
page: 1, // [integer] which page of results to fetch (if count != fetch, you'll get unexpected results)
retweets: true, // [boolean] whether to fetch (official) retweets (not supported in all display modes)
intro_text: null, // [string] do you want text BEFORE your your tweets?
outro_text: null, // [string] do you want text AFTER your tweets?
join_text: null, // [string] optional text in between date and tweet, try setting to "auto"
auto_join_text_default: "i said,", // [string] auto text for non verb: "i said" bullocks
auto_join_text_ed: "i", // [string] auto text for past tense: "i" surfed
auto_join_text_ing: "i am", // [string] auto tense for present tense: "i was" surfing
auto_join_text_reply: "i replied to", // [string] auto tense for replies: "i replied to" @someone "with"
auto_join_text_url: "i was looking at", // [string] auto tense for urls: "i was looking at" http:...
loading_text: null, // [string] optional loading text, displayed while tweets load
refresh_interval: null , // [integer] optional number of seconds after which to reload tweets
twitter_url: "twitter.com", // [string] custom twitter url, if any (apigee, etc.)
twitter_api_url: "api.twitter.com", // [string] custom twitter api url, if any (apigee, etc.)
twitter_search_url: "search.twitter.com", // [string] custom twitter search url, if any (apigee, etc.)
template: "{avatar}{time}{join}{text}", // [string or function] template used to construct each tweet

  • - see code for available vars
    comparator: function(tweet1, tweet2) { // [function] comparator used to sort tweets (see Array.sort)
    return tweet2["tweet_time"] - tweet1["tweet_time"];
    },
    filter: function(tweet) { // [function] whether or not to include a particular tweet (be sure to also set 'fetch')
    return true;
    }
    }, o);
  • $j.fn.extend({
    linkUrl: function() {
    var returning = [];
    // See http://daringfireball.net/2010/07/improved_regex_for_matching_urls
    var regexp = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()]+|\(([^\s()]+|(\([^\s()]+\)))*\))+(?:\(([^\s()]+|(\([^\s()]+\)))*\)|[^\s`!()\[\]{};:'".,?´ªìîëí]))/gi;
    this.each(function() {
    returning.push(this.replace(regexp,
    function(match) {
    var url = (/^[a-z]+:/i).test(match) ? match : "http://"+match;
    return ""+match+"";
    }));
    });
    return $j(returning);
    },
    linkUser: function() {
    var returning = [];
    var regexp = /[\@]+(\w+)/gi;
    this.each(function() {
    returning.push(this.replace(regexp,"@$1"));
    });
    return $j(returning);
    },
    linkHash: function() {
    var returning = [];
    // Support various latin1 (\u00**) and arabic (\u06**) alphanumeric chars
    var regexp = /(?:^| )[\#]+([\w\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0600-\u06ff]+)/gi;
    var usercond = (s.username && s.username.length == 1) ? '&from='+s.username.join("%2BOR%2B") : '';
    this.each(function() {
    returning.push(this.replace(regexp, ' #$1'));
    });
    return $j(returning);
    },
    capAwesome: function() {
    var returning = [];
    this.each(function() {
    returning.push(this.replace(/\b(awesome)\b/gi, '$1'));
    });
    return $j(returning);
    },
    capEpic: function() {
    var returning = [];
    this.each(function() {
    returning.push(this.replace(/\b(epic)\b/gi, '$1'));
    });
    return $j(returning);
    },
    makeHeart: function() {
    var returning = [];
    this.each(function() {
    returning.push(this.replace(/(<)+[3]/gi, "♥"));
    });
    return $j(returning);
    }
    });

    function parse_date(date_str) {
    // The non-search twitter APIs return inconsistently-formatted dates, which Date.parse
    // cannot handle in IE. We therefore perform the following transformation:
    // "Wed Apr 29 08:53:31 +0000 2009" => "Wed, Apr 29 2009 08:53:31 +0000"
    return Date.parse(date_str.replace(/^([a-z]{3})( [a-z]{3} \d\d?)(.*)( \d{4})$/i, '$1,$2$4$3'));
    }

    function relative_time(date) {
    var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
    var delta = parseInt((relative_to.getTime() - date) / 1000, 10);
    var r = '';
    if (delta < 60) {
    r = delta + ' secondi fa';
    } else if(delta < 120) {
    r = 'un minuto fa';
    } else if(delta < (45*60)) {
    r = (parseInt(delta / 60, 10)).toString() + ' minuti fa';
    } else if(delta < (2*60*60)) {
    r = 'un\'ora fa';
    } else if(delta < (24*60*60)) {
    r = '' + (parseInt(delta / 3600, 10)).toString() + ' ore fa';
    } else if(delta < (48*60*60)) {
    r = 'un giorno fa';
    } else {
    r = (parseInt(delta / 86400, 10)).toString() + ' giorni fa';
    }
    return '' + r;
    }

    function build_url() {
    var proto = ('https:' == document.location.protocol ? 'https:' : 'http:');
    var count = (s.fetch === null) ? s.count : s.fetch;
    if (s.list) {
    return proto+"//"+s.twitter_api_url+"/1/"+s.username[0]+"/lists/"+s.list+"/statuses.json?page="+s.page+"&per_page="+count+"&callback=?";
    } else if (s.favorites) {
    return proto+"//"+s.twitter_api_url+"/favorites/"+s.username[0]+".json?page="+s.page+"&count="+s.count+"&callback=?";
    } else if (s.query === null && s.username.length == 1) {
    return proto+'//'+s.twitter_api_url+'/1/statuses/user_timeline.json?screen_name='+s.username[0]+'&count='+count+(s.retweets ? '&include_rts=1' : '')+'&page='+s.page+'&callback=?';
    } else {
    var query = (s.query || 'from:'+s.username.join(' OR from:'));
    return proto+'//'+s.twitter_search_url+'/search.json?&q='+encodeURIComponent(query)+'&rpp='+count+'&page='+s.page+'&callback=?';
    }
    }

    return this.each(function(i, widget){
    var list = $j('

      ').appendTo(widget);
      var intro = ''+s.intro_text+'';
      var outro = ''+s.outro_text+'';
      var loading = $j(''+s.loading_text+'');

    if(s.username && typeof(s.username) == "string"){
    s.username = [s.username];
    }

    var expand_template = function(info) {
    if (typeof s.template === "string") {
    var result = s.template;
    for(var key in info) {
    var val = info[key];
    result = result.replace(new RegExp('{'+key+'}','g'), val === null ? '' : val);
    }
    return result;
    } else return s.template(info);
    };

    if (s.loading_text) $j(widget).append(loading);
    $j(widget).bind("load", function(){
    $j.getJSON(build_url(), function(data){
    if (s.loading_text) loading.remove();
    if (s.intro_text) list.before(intro);
    list.empty();

    var tweets = $j.map(data.results || data, function(item){
    var join_text = s.join_text;

    // auto join text based on verb tense and content
    if (s.join_text == "auto") {
    if (item.text.match(/^(@([A-Za-z0-9-_]+)) .*/i)) {
    join_text = s.auto_join_text_reply;
    } else if (item.text.match(/(^\w+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+) .*/i)) {
    join_text = s.auto_join_text_url;
    } else if (item.text.match(/^((\w+ed)|just) .*/im)) {
    join_text = s.auto_join_text_ed;
    } else if (item.text.match(/^(\w*ing) .*/i)) {
    join_text = s.auto_join_text_ing;
    } else {
    join_text = s.auto_join_text_default;
    }
    }

    // Basic building blocks for constructing tweet

  • using a template
    var screen_name = item.from_user || item.user.screen_name;
    var source = item.source;
    var user_url = "http://"+s.twitter_url+"/"+screen_name;
    var avatar_size = s.avatar_size;
    var avatar_url = item.profile_image_url || item.user.profile_image_url;
    var tweet_url = "http://"+s.twitter_url+"/"+screen_name+"/status/"+item.id_str;
    var retweet = (typeof(item.retweeted_status) != 'undefined');
    var retweeted_screen_name = retweet ? item.retweeted_status.user.screen_name : null;
    var tweet_time = parse_date(item.created_at);
    var tweet_relative_time = relative_time(tweet_time+7200);
    var tweet_raw_text = retweet ? ('RT @'+retweeted_screen_name+' '+item.retweeted_status.text) : item.text; // avoid '...' in long retweets
    var tweet_text = $j([tweet_raw_text]).linkUrl().linkUser().linkHash()[0];
  • // Default spans, and pre-formatted blocks for common layouts
    var user = ''+screen_name+'';
    var join = ((s.join_text) ? (' '+join_text+' ') : ' ');
    var avatar = (avatar_size ?
    ('') : '');
    var rtime = ''+tweet_relative_time+'';
    var dtmp = new Date(tweet_time+3600*1000);
    var date = dtmp.getUTCDate()+"/"+(dtmp.getUTCMonth()+1)+"/"+dtmp.getUTCFullYear();
    var timeofday = dtmp.getUTCHours()+":"+(dtmp.getUTCMinutes()0?" #"+h:"";
    $("#tweets").tweet({
    query: "from:"+u+h,
    count: 100,
    template: "{timeofday} {text}",
    loading_text: "Caricamento tweets..."
    });
    });

     

    Vuoi commentare o votare questo articolo? Registrati subito!

    Rispondi

    • Indirizzi web o e-mail vengono trasformati in link automaticamente
    • Elementi HTML permessi: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b> <br>
    • Linee e paragrafi vanno a capo automaticamente.

    Maggiori informazioni sulle opzioni di formattazione.

    Copyright © 2008/2009 Kines S.r.l. - C.F. e P.IVA: 02970240160