Changeset 81391 in spip-zone


Ignore:
Timestamp:
Mar 15, 2014, 1:47:22 PM (5 years ago)
Author:
cedric@…
Message:

Integration de oEmbed twitter, en nettoyant le <script> que nous envoie twitter mais qui est un mouchard en puissance
(suppression de oeproxy qui se basait sur l'api v1 JSON qui ne fonctionne plus)

Location:
_plugins_/oembed
Files:
2 deleted
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • _plugins_/oembed/css/oembed.css

    r79146 r81391  
    11/* Oembed twitter */
    22.oe-quote-block {padding-right: 80px;position: relative;}
    3 .twitter.oe-quote-block {margin-bottom:0;}
     3.oembed_twitter .oembed-source {display: none;}
     4
    45.storify .oe-quote-text {margin-bottom:0;}
    56.oe-descriptif {font-style: italic;}
  • _plugins_/oembed/inc/oembed.php

    r81314 r81391  
    5454                'http://meetup.ps/*'             =>   'http://api.meetup.com/oembed',
    5555                'http://*.wordpress.com/*'       =>   'http://public-api.wordpress.com/oembed/1.0/',
    56                 'http://*.blogs.cnn.com/*'         =>   'http://public-api.wordpress.com/oembed/1.0/',
     56                'http://*.blogs.cnn.com/*'       =>   'http://public-api.wordpress.com/oembed/1.0/',
     57                'http://twitter.com/*/status/*'  =>   'https://api.twitter.com/1/statuses/oembed.json',
    5758                'http://techcrunch.com/*'        =>   'http://public-api.wordpress.com/oembed/1.0/',
    5859                'http://wp.me/*'                 =>   'http://public-api.wordpress.com/oembed/1.0/',
     
    6162                'http://www.collegehumor.com/video/*'=>'http://www.collegehumor.com/oembed.json',
    6263
    63 
    64                 #'https://twitter.com/*/status/*' =>   '?action=oeproxy_twitter',
    65                 #'http://twitter.com/*/status/*' =>   '?action=oeproxy_twitter',
    66                 #'https://twitter.com/*/statuses/*' =>   '?action=oeproxy_twitter',
    67                 #'http://twitter.com/*/statuses/*' =>   '?action=oeproxy_twitter',
    6864
    6965                #'http://yfrog.ru|com.tr|it|fr|co.il|co.uk|com.pl|pl|eu|us)/*'         =>   'http://yfrog.com/api/oembed',
  • _plugins_/oembed/modeles/oembed.html

    r81314 r81391  
    22[(#SET{data,#ENV**{url}|oembed_recuperer_data{#ENV{maxwidth,0},#ENV{maxheight,0}}})
    33][(#GET{data}|oui)
    4 <div class='spip_documents spip_documents_center ressource oembed[ oembed_(#GET{data}|table_valeur{type})]'>
     4<div class='spip_documents spip_documents_center ressource oembed[ oembed_(#GET{data}|table_valeur{type})][ oembed_(#GET{data}|table_valeur{provider_name}|strtolower|replace{'\W','_'})]'>
    55        [(#INCLURE{fond=modeles/oembed_[(#GET{data}|table_valeur{type,link})],data=#GET{data},url,align})]
    66        [<div class="spip_doc_titre oembed-source">(#ENV*{lien}|echappe_retour)</div>]
  • _plugins_/oembed/oembed/input/posttraite_twitter.php

    r81390 r81391  
    88if (!defined('_ECRIRE_INC_VERSION')) return;
    99
    10 function oembed_input_posttraite_soundcloud_rich_dist($data){
     10function oembed_input_posttraite_twitter_dist($data){
    1111
    12         $data['media'] = 'sound';
    13         $data['html'] = preg_replace(",width=['\"][0-9]+['\"],i",'width="100%"',$data['html']);
    14 
    15         if (!isset($data['thumbnail_url'])){
    16                 $data['thumbnail_url'] = find_in_path("oembed/input/vignettes/soundcloud.png");
    17         }
     12        $data['html'] = trim(preg_replace(",<script[^>]*></script>,i",'',$data['html']));
    1813
    1914        return $data;
  • _plugins_/oembed/paquet.xml

    r81325 r81391  
    22        prefix="oembed"
    33        categorie="multimedia"
    4         version="1.0.11"
    5         etat="test"
     4        version="1.1.0"
     5        etat="stable"
    66        compatibilite="[3.0.0;3.0.*]"
    77        logo="prive/themes/spip/images/oembed-32.png"
Note: See TracChangeset for help on using the changeset viewer.