Documentation du code de SPIP et de ses plugins

Sites

atomrss.php

Table of Contents

Constants

_SYNDICATION_DEREFERENCER_URL  = $options['dereferencer_url']
si true, les URLs de type feedburner sont déréférencées
_SYNDICATION_MAX_ITEMS  = $options['max_items']
nombre maximum d'items à analyser

Functions

syndic_atomrss_dist()  : array<string|int, mixed>|string
Analyse d'une URL au format Atom/RSS
syndic_atomrss_raw_data_to_array_dist()  : array<string|int, mixed>
analyser_backend()  : array<string|int, mixed>|string
Analyse un texte de backend
my_strtotime()  : int
Strtotime même avec le format W3C !
creer_tag()  : mixed
ajouter_tags()  : mixed
cdata_echappe()  : mixed
cdata_echappe_retour()  : mixed
enclosure2microformat()  : string
Convertir les médias fournis par un flux RSS (podcasts) en liens conformes aux microformats

Constants

_SYNDICATION_DEREFERENCER_URL

si true, les URLs de type feedburner sont déréférencées

depuis SPIP 5.0, utiliser l’option "dereferencer_url"

public mixed _SYNDICATION_DEREFERENCER_URL = $options['dereferencer_url']

_SYNDICATION_MAX_ITEMS

nombre maximum d'items à analyser

depuis SPIP 5.0, utiliser le paramètre "spip.sites.max_items" ou l’option "max_items"

public mixed _SYNDICATION_MAX_ITEMS = $options['max_items']

Functions

syndic_atomrss_dist()

Analyse d'une URL au format Atom/RSS

syndic_atomrss_dist(string $url_syndic) : array<string|int, mixed>|string
Parameters
$url_syndic : string
Return values
array<string|int, mixed>|string

syndic_atomrss_raw_data_to_array_dist()

syndic_atomrss_raw_data_to_array_dist(string $raw_data, string $raw_format) : array<string|int, mixed>
Parameters
$raw_data : string
$raw_format : string
Return values
array<string|int, mixed>

analyser_backend()

Analyse un texte de backend

analyser_backend(string $rss[, string|array{url_syndic: string, controler_dates: bool, dereferencer_url: bool, max_items: int} $options = [] ]) : array<string|int, mixed>|string
Parameters
$rss : string

Texte du fichier de backend

$options : string|array{url_syndic: string, controler_dates: bool, dereferencer_url: bool, max_items: int} = []

Si array:

  • url_syndic : URL du site d'où à été extrait le texte
  • controler_dates : si true, les dates sont controlées
  • dereferencer_url : si true, les URLs de type feedburner sont déréférencées
  • max_items : nombre maximum d'items à analyser

Si string (deprecated url_syndic): depuis SPIP 5.0, utiliser array['url_syndic' => $url_syndic]

Return values
array<string|int, mixed>|string
  • array : tableau des items lus,
  • string : texte d'erreur

my_strtotime()

Strtotime même avec le format W3C !

my_strtotime(string $la_date[, mixed $lang = null ]) : int

Car hélàs, strtotime ne le reconnait pas tout seul !

Parameters
$la_date : string

Date à parser

$lang : mixed = null
Tags
link

Format datetime du W3C

Return values
int

Timestamp

creer_tag()

creer_tag(mixed $mot, mixed $type, mixed $url) : mixed
Parameters
$mot : mixed
$type : mixed
$url : mixed

ajouter_tags()

ajouter_tags(mixed $matches, mixed $item) : mixed
Parameters
$matches : mixed
$item : mixed

cdata_echappe()

cdata_echappe(mixed &$rss, mixed &$echappe_cdata) : mixed
Parameters
$rss : mixed
$echappe_cdata : mixed

cdata_echappe_retour()

cdata_echappe_retour(mixed &$x, mixed &$echappe_cdata[, mixed $filtrer_entites = true ]) : mixed
Parameters
$x : mixed
$echappe_cdata : mixed
$filtrer_entites : mixed = true

enclosure2microformat()

Convertir les médias fournis par un flux RSS (podcasts) en liens conformes aux microformats

enclosure2microformat(string $e) : string

Passe un <enclosure url="fichier" length="5588242" type="audio/mpeg"/> au format microformat <a rel="enclosure" href="fichier" ...>fichier</a>.

Peut recevoir un <link ou un <media:content parfois.

Attention : length="zz" devient title="zz", pour rester conforme.

Parameters
$e : string

Tag RSS <enclosure>

Tags
filtre
see
microformat2enclosure()

Pour l'inverse

Return values
string

Tag HTML <a> avec microformat.


        
On this page

Search results