Changeset 47711 in spip-zone


Ignore:
Timestamp:
May 12, 2011, 12:10:37 PM (10 years ago)
Author:
fil@…
Message:

ne pas remplacer le lien si le modele est vide (url en fait sans oembed, comme par exemple un album flickr http://www.flickr.com/photos/fil-rezo-net/sets/72157626552589407/with/5701234106/ )

Location:
_plugins_/oembed
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/oembed/modeles/oembed_video.html

    r47709 r47711  
    11[<div class="oembed oembed_video">
    22        (#ENV{data}|table_valeur{html}|sinon{#ENV{url}})
     3
     4<br style="clear:both;" />
    35</div>]
  • _plugins_/oembed/oembed.html

    r47450 r47711  
    11[(#CACHE{0})][(#HTTP_HEADER{Content-type: [(#ENV{format,json}|=={json}|?{application/json,text/xml})][; charset=(#CHARSET)]})][(#SET{id_article,#ENV**{url}|urls_decoder_url|table_valeur{1}|table_valeur{id_article}})][(#SET{type,#ENV**{url}|urls_decoder_url|table_valeur{1}|table_valeur{type}})
    22][(#INCLURE{fond=inclure/oembed_#GET{type}.#ENV{format,json},id_article=#GET{id_article},maxwidth,maxheight})]
     3
     4
     5QUOIIIQ OIQUS
     6
  • _plugins_/oembed/oembed_pipelines.php

    r47709 r47711  
    8787                if ($url = extraire_attribut($lien, 'href') AND oembed_verifier_provider($url)) {
    8888                        $fond = recuperer_fond('modeles/oembed',array('url'=>$url));
    89                         $texte = str_replace($lien, $fond, $texte);
     89                        if ($fond = trim($fond))
     90                                $texte = str_replace($lien, $fond, $texte);
    9091                }
    9192        }
Note: See TracChangeset for help on using the changeset viewer.