Fiche n° 4 Installer le plugin sedna sous SPIP
Transcription
Fiche n° 4 Installer le plugin sedna sous SPIP
[email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Fiche n° 4 Installer le plugin sedna sous SPIP Objectif : Utiliser un "plugin" (application toute faite prête à l'emploi) de spip spécialement consacré à la lecture et à la gestion de fil rss Bibliographie La "contrib" sur le mode d'emploi en ligne de spip http://www.spip-contrib.net/Sedna-agregateur Créer un sous-répertoire "plugins" sous c:\wamp\www\spip Fiche n° 4 : Installer Sedna sous Spip 1 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Télécharger le plugin depuis la page de la contrib : http://www.spip-contrib.net/Sednaagregateur Il est en fait sous la "spip-zone" http://files.spip.org/spip-zone/ Extraire le fichier zip http://files.spip.org/spip-zone/sedna.zip vers c:\wamp\www\spip Retourner au back-office de votre site via http://localhost/spip/ecrire S'est normalement ajoutée à la zone "Configuration" la commande "gestion des plugins" Fiche n° 4 : Installer Sedna sous Spip 2 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Activer le plugin Et désormais, vous avez un agrégateur en ligne : http://localhost/spip/spip.php?page=sedna Fiche n° 4 : Installer Sedna sous Spip 3 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Applications : http://www.servicedoc.info/sedna/ Fiche n° 4 : Installer Sedna sous Spip 4 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Variantes Sur la page http://www.servicedoc.info/spip.php?page=syndication Deux versions de l'outil de syndication sont proposées à l'affichage et une troisième spéciale pour mobile est donnée en lien Code de la page de syndication #CACHE{600} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="#LANG_DIR" lang="#LANG"> <head> <title>[(#NOM_SITE_SPIP|textebrut)]</title> <meta http-equiv="Content-Type" content="text/html; charset=#CHARSET" /> [<meta name="description" content="(#DESCRIPTIF_SITE_SPIP|couper{150}|attribut_html)" />] <meta name="generator" content="SPIP" /> [<link rel="shortcut icon" href="(#CHEMIN{#NOM_SITE_SPIP.ico})" />] <!-- Lien vers le backend pour navigateurs eclaires --> Fiche n° 4 : Installer Sedna sous Spip 5 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ <link rel="alternate" type="application/rss+xml" title="<:syndiquer_site:>" href="#URL_PAGE{backend}" /> </head> <h1>Syndication</h1> Les 100 derniers articles syndiqués via RSS... beaucoup plus joli via l'outil <a href="#URL_SITE_SPIP/sedna/">Sedna</a> fourni avec Spip<br> Notez aussi qu'il existe une version très simplifiée de cette page, idéale pour <a href="http://www.servicedoc.info/spip.php? page=syndication_mobile">lire sur un téléphone mobile : http://www.servicedoc.info/spip.php? page=syndication_mobile</a> <!-- sites syndiques --> <B_syndication> <table bgcolor="white"><tr><td> <BOUCLE_syndication(SYNDIC_ARTICLES){par date} {inverse} {0,100}> <?php $new_date='[(#DATE|affdate)]'; if ($new_date!=$brev_date){ ?> <div class="date">[(#DATE|nom_jour)] [(#DATE|affdate)]</div> <?php $brev_date=$new_date; }?> <ul><li><a title="extrait : [(#DESCRIPTIF| textebrut|entites_html)]" href="#URL_ARTICLE" target="_blank">[(#TITRE|supprimer_numero)]</a> <B_auteurs3><span class="auteurs">, par <BOUCLE_auteurs3(AUTEURS){id_article}{", "}><a href="#URL_AUTEUR" title="écrire à #NOM">#NOM</a></BOUCLE_auteurs3>, sur </span><a class="site" title="[voir le site : (#NOM_SITE) sur #URL_SITE]" href="#URL_SITE">#NOM_SITE</a> | <a class="site" title="[voir les autres articles syndiqués via Sedna de (#NOM_SITE) sur les 100 derniers jours]" href="/sedna/?id_syndic=#ID_SYNDIC&age=365">sedna</a>, <font size="1">#DATE</font>. </li></ul> </BOUCLE_syndication> </td></tr></table> </B_syndication> </body> </html> Fiche n° 4 : Installer Sedna sous Spip 6 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Un gadget possible : la syndication "marquee" (défilement en mode "ticker"): (voir tout en bas de la page http://www.servicedoc.info/spip.php?page=syndication Code [(#REM) Informations sur http://www.cent20.net/spip.php? article117 ] <marquee width="100%" height="250px" direction="UP" behavior="scroll" scrollamount="1" scrolldelay="1" onmouseover="this.stop();" onmouseout="this.start();"> défile vers le haut et arrête toi chaque fois que la souris te passe dessus <small> <BOUCLE_syndication(SYNDIC_ARTICLES){par date}{inverse} {0,50}> Va chercher les 50 derniers articles syndiqués <?php $new_date='[(#DATE|affdate)]'; if ($new_date!=$brev_date){ ?> <div class="date">[(#DATE|nom_jour)] [(#DATE|affdate)]</div> Affiche la date du jour (une seule fois si c'est la même que la news précédente <?php $brev_date=$new_date; }?> -> <a title="extrait : [(#DESCRIPTIF| textebrut|entites_html)]" href="#URL_ARTICLE" target="_blank">[(#TITRE|supprimer_numero)]</a> <B_auteurs3><span class="auteurs">, par <BOUCLE_auteurs3(AUTEURS){id_article}{", "}><a href="#URL_AUTEUR" title="écrire à #NOM">#NOM</a></BOUCLE_auteurs3> affiche les auteurs, sur </span><a class="site" title="[voir le site : (#NOM_SITE) sur #URL_SITE]" href="#URL_SITE" target="_blank">#NOM_SITE</a> | <a class="site" title="[voir les autres articles syndiqués via Sedna de (#NOM_SITE) sur les 100 derniers jours]" href="/sedna/?id_syndic=#ID_SYNDIC&age=365" target="_blank">sedna</a> propose un lien vers la source soit directement, soit via mon sedna, <font size="1">#DATE</font>. <br /> </BOUCLE_syndication> </small> </marquee> Fiche n° 4 : Installer Sedna sous Spip 7 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Code de la page de syndication mobile (la même que la précédente, mais très simplifié pour tenir sur un téléphone portable) #CACHE{300} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd"> <html dir="#LANG_DIR" lang="#LANG"> <head> <title>[(#NOM_SITE_SPIP|textebrut)]</title> </head> <body id="syndication"> <div> Les 100 derniers articles syndiqués via RSS... beaucoup plus joli via <a href="#URL_SITE_SPIP/sedna/">Sedna</a> </div> <!-- sites syndiques --> <B_syndication> <div class="syndic"> <div class="caps"> <BOUCLE_syndication(SYNDIC_ARTICLES){par date} {inverse} {0,100}> <?php $new_date='[(#DATE|affdate)]'; if ($new_date!=$brev_date){ ?> <div class="date">[(#DATE|nom_jour)] [(#DATE|affdate)]</div> <?php $brev_date=$new_date; }?> - <a title="extrait : [(#DESCRIPTIF| textebrut|entites_html)]" href="#URL_ARTICLE" target="_blank">[(#TITRE|supprimer_numero)]</a> <B_auteurs3><span class="auteurs">, par <BOUCLE_auteurs3(AUTEURS){id_article}{", "}><a href="#URL_AUTEUR" title="écrire à #NOM">#NOM</a></BOUCLE_auteurs3>, sur </span><a class="site" title="[voir le site : (#NOM_SITE) sur #URL_SITE]" href="#URL_SITE">#NOM_SITE</a> | <a class="site" title="[voir les autres articles syndiqués via Sedna de (#NOM_SITE) sur les 100 derniers jours]" href="/sedna/?id_syndic=#ID_SYNDIC&age=365">sedna</a>, <font size="1">#DATE</font>. <br> </BOUCLE_syndication> </div> </div> </B_syndication> </body> </html> Fiche n° 4 : Installer Sedna sous Spip 8 Octobre 2009 [email protected] Formation ABDS 636 Créer et diffuser les fils RSS www.servicedoc.info/rss/ Application : http://www.servicedoc.info/spip.php?page=syndication_mobile Fiche n° 4 : Installer Sedna sous Spip 9 Octobre 2009