formation spip

167
Développement et Intégration sous SPIP Thursday, 25 April, 2013

Upload: strasweb

Post on 21-Jun-2015

601 views

Category:

Education


0 download

DESCRIPTION

Voici quelques notions à connaitre sur le CMS SPIP.

TRANSCRIPT

Page 1: Formation spip

Développement et Intégration sous

SPIP

Thursday, 25 April, 2013

Page 2: Formation spip

Pourquoi SPIP ?

Thursday, 25 April, 2013

Page 3: Formation spip

Pourquoi SPIP ?

•Français

Thursday, 25 April, 2013

Page 4: Formation spip

Pourquoi SPIP ?

•Français

•Multilingue

Thursday, 25 April, 2013

Page 5: Formation spip

Pourquoi SPIP ?

•Français

•Multilingue

•Flexible

Thursday, 25 April, 2013

Page 6: Formation spip

Pourquoi SPIP ?

•Français

•Multilingue

•Flexible

•Gestion des Medias

Thursday, 25 April, 2013

Page 7: Formation spip

Pourquoi SPIP ?

•Français

•Multilingue

•Flexible

•Gestion des Medias

•Performant (cache...)

Thursday, 25 April, 2013

Page 8: Formation spip

Quelques Principes de Base..

Thursday, 25 April, 2013

Page 9: Formation spip

Le dossier Squelettes

vs

Thursday, 25 April, 2013

Page 10: Formation spip

Le dossier squelettes

squelette type de contenu

article.html article

rubrique.html rubrique

sommaire.html page d’accueil

breve.html breve

404.html erreur 404

Thursday, 25 April, 2013

Page 11: Formation spip

Cache

Thursday, 25 April, 2013

Page 12: Formation spip

•Cache = performance

Cache

Thursday, 25 April, 2013

Page 13: Formation spip

•Cache = performance

•Pour des mises à jour:

Cache

Your friend

Thursday, 25 April, 2013

Page 14: Formation spip

•Cache = performance

•Pour des mises à jour:

Cache

Your friend

Thursday, 25 April, 2013

Page 15: Formation spip

•Cache = performance

•Pour des mises à jour:

•Pour le mode

‘construction’

Cache

Your friend

Thursday, 25 April, 2013

Page 16: Formation spip

Les variantes de squelettes

squelette pages impliquées

rubrique=3.html rubrique n˚ 3

rubrique-3.html rubrique n˚ 3 et sous-rubriques

article=3.html articles DANS la rubrique n˚3

article-3.htmlarticles DANS la rubrique n˚3 ET dans ses

sous-rubriques

article.en.html articles dont la langue est Anglais

Thursday, 25 April, 2013

Page 17: Formation spip

Modèles vs squelettes

Thursday, 25 April, 2013

Page 18: Formation spip

Modèles vs squelettes

•Modèles = mini-squelettes pour un objet

Thursday, 25 April, 2013

Page 19: Formation spip

Modèles vs squelettes

•Modèles = mini-squelettes pour un objet

•e.g...

Thursday, 25 April, 2013

Page 20: Formation spip

Modèles vs squelettes

•Modèles = mini-squelettes pour un objet

•e.g...<img1>

Thursday, 25 April, 2013

Page 21: Formation spip

Modèles vs squelettes

•Modèles = mini-squelettes pour un objet

•e.g...<img1>

Spip cherche à afficher l’image n˚1 avec le modèle ‘img.html’. Dans img.html...:

Thursday, 25 April, 2013

Page 22: Formation spip

Modèles vs squelettes

•Modèles = mini-squelettes pour un objet

•e.g...<img1>

Spip cherche à afficher l’image n˚1 avec le modèle ‘img.html’. Dans img.html...:

<img src=”#URL_DOCUMENT” />

Thursday, 25 April, 2013

Page 23: Formation spip

Modèles vs squelettes

Thursday, 25 April, 2013

Page 24: Formation spip

Modèles vs squelettes

<img1|border>

Thursday, 25 April, 2013

Page 25: Formation spip

Modèles vs squelettes

<img1|border>

Mais on peut aussi faire des trucs bien plus spécifiques...

Thursday, 25 April, 2013

Page 26: Formation spip

Modèles vs squelettes

<img1|border>

Mais on peut aussi faire des trucs bien plus spécifiques...

Fait appel à modeles/img_border.html

Thursday, 25 April, 2013

Page 27: Formation spip

Modèles vs squelettes

<img1|border>

Mais on peut aussi faire des trucs bien plus spécifiques...

Fait appel à modeles/img_border.html

Ou même...

Thursday, 25 April, 2013

Page 28: Formation spip

Modèles vs squelettes

<img1|border>

Mais on peut aussi faire des trucs bien plus spécifiques...

Fait appel à modeles/img_border.html

Ou même...

<article1|desc>

Thursday, 25 April, 2013

Page 29: Formation spip

Modèles vs squelettes

<img1|border>

Mais on peut aussi faire des trucs bien plus spécifiques...

Fait appel à modeles/img_border.html

Ou même...

<article1|desc>Et après faire:

Thursday, 25 April, 2013

Page 30: Formation spip

Modèles vs squelettes

<img1|border>

Mais on peut aussi faire des trucs bien plus spécifiques...

Fait appel à modeles/img_border.html

Ou même...

<article1|desc>Et après faire:

<div class=”desc”><p>#DESCRIPTIF</p>

</div>

Thursday, 25 April, 2013

Page 31: Formation spip

Balises et filtres : Des balises universelles

Thursday, 25 April, 2013

Page 32: Formation spip

Balises et filtres : Des balises universelles

•#URL_SITE_SPIP

Thursday, 25 April, 2013

Page 33: Formation spip

Balises et filtres : Des balises universelles

•#URL_SITE_SPIP

•#SLOGAN_SITE_SPIP

Thursday, 25 April, 2013

Page 34: Formation spip

Balises et filtres : Des balises universelles

•#URL_SITE_SPIP

•#SLOGAN_SITE_SPIP

•#DESCRIPTIF_SITE_SPIP

Thursday, 25 April, 2013

Page 35: Formation spip

Balises et filtres : Des balises universelles

•#URL_SITE_SPIP

•#SLOGAN_SITE_SPIP

•#DESCRIPTIF_SITE_SPIP

•#URL_ECRIRE

Thursday, 25 April, 2013

Page 36: Formation spip

Balises et filtres : Des balises universelles

•#URL_SITE_SPIP

•#SLOGAN_SITE_SPIP

•#DESCRIPTIF_SITE_SPIP

•#URL_ECRIRE

•... (voir spip.net)

Thursday, 25 April, 2013

Page 37: Formation spip

Balises et filtres : Des balises pour tous les boucles

Thursday, 25 April, 2013

Page 38: Formation spip

Balises et filtres : Des balises pour tous les boucles

•#TITRE

Thursday, 25 April, 2013

Page 39: Formation spip

Balises et filtres : Des balises pour tous les boucles

•#TITRE

•#DESCRIPTIF

Thursday, 25 April, 2013

Page 40: Formation spip

Balises et filtres : Des balises pour tous les boucles

•#TITRE

•#DESCRIPTIF

•#URL_RUBRIQUE/article/document...

Thursday, 25 April, 2013

Page 41: Formation spip

Balises et filtres : Des balises pour tous les boucles

•#TITRE

•#DESCRIPTIF

•#URL_RUBRIQUE/article/document...

•#SOUSTITRE...

Thursday, 25 April, 2013

Page 42: Formation spip

Balises et filtres : Des balises pour tous les boucles

•#TITRE

•#DESCRIPTIF

•#URL_RUBRIQUE/article/document...

•#SOUSTITRE...

•... (voir spip.net)

Thursday, 25 April, 2013

Page 43: Formation spip

Balises et filtres : Des filtres

Thursday, 25 April, 2013

Page 44: Formation spip

Balises et filtres : Des filtres

[(#DESCRIPTIF)]

Thursday, 25 April, 2013

Page 45: Formation spip

Balises et filtres : Des filtres

[(#DESCRIPTIF)]

[(#DESCRIPTIF|couper{150})]

Thursday, 25 April, 2013

Page 46: Formation spip

Balises et filtres : Des filtres

[(#DESCRIPTIF)]

[(#DESCRIPTIF|couper{150})]

[(#DESCRIPTIF|textebrut)]

Thursday, 25 April, 2013

Page 47: Formation spip

Balises et filtres : Des filtres

[(#DESCRIPTIF)]

[(#DESCRIPTIF|couper{150})]

[(#DESCRIPTIF|textebrut)]

[(#TITRE|=={‘Hello’}|?{'hello',' '})]

Thursday, 25 April, 2013

Page 48: Formation spip

Balises et filtres : Des filtres

[(#DESCRIPTIF)]

[(#DESCRIPTIF|couper{150})]

[(#DESCRIPTIF|textebrut)]

[(#TITRE|=={‘Hello’}|?{'hello',' '})]

<a href=”#” [class=”(#TITRE|=={‘Hello’}|?{'hello',' '})”]>

Thursday, 25 April, 2013

Page 49: Formation spip

Inclure

Thursday, 25 April, 2013

Page 50: Formation spip

Inclure

<INCLURE{fond=header}> = <?php include(‘header.html’) ?>

Thursday, 25 April, 2013

Page 51: Formation spip

Inclure

<INCLURE{fond=header}> = <?php include(‘header.html’) ?>

mais INCLURE va aussi prendre en charge des balises SPIP etc, et on peut l’inclure dans des fichiers squelettes (html) sans problème pour appeler d’autres squelettes

Thursday, 25 April, 2013

Page 52: Formation spip

Boucles en SPIP

Thursday, 25 April, 2013

Page 53: Formation spip

Boucles en SPIP

•Les boucles permettent d’accèder aux informations des articles, documents, rubriques, breves, images...

Thursday, 25 April, 2013

Page 54: Formation spip

Boucles en SPIP

•Les boucles permettent d’accèder aux informations des articles, documents, rubriques, breves, images...

•On peut les utiliser pour créer une liste des articles ou bien pour selectionner un seul article.

Thursday, 25 April, 2013

Page 55: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 56: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES)>

Thursday, 25 April, 2013

Page 57: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES)>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 58: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES)>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 59: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 60: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique=4}>

Thursday, 25 April, 2013

Page 61: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique=4}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 62: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique=4}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 63: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 64: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}>

Thursday, 25 April, 2013

Page 65: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 66: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 67: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 68: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang=en}>

Thursday, 25 April, 2013

Page 69: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang=en}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 70: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang=en}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 71: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 72: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang=en}>

Thursday, 25 April, 2013

Page 73: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang=en}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 74: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang=en}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 75: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 76: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}>

Thursday, 25 April, 2013

Page 77: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 78: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 79: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 80: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par titre}>

Thursday, 25 April, 2013

Page 81: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par titre}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 82: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par titre}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 83: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 84: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}>

Thursday, 25 April, 2013

Page 85: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 86: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 87: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 88: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}{inverse}>

Thursday, 25 April, 2013

Page 89: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}{inverse}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 90: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}{inverse}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 91: Formation spip

Le boucle ARTICLES

Thursday, 25 April, 2013

Page 92: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}{inverse}>

Thursday, 25 April, 2013

Page 93: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}{inverse}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 94: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}{inverse}>

<h1>#TITRE</h1>

[(#LOGO_ARTICLE)]

Thursday, 25 April, 2013

Page 95: Formation spip

Le boucle ARTICLES

<BOUCLE_myboucle(ARTICLES){id_rubrique}{lang}{par date}{inverse}>

<h1>#TITRE</h1>

[(#LOGO_ARTICLE)]

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 96: Formation spip

Le boucle RUBRIQUES

Thursday, 25 April, 2013

Page 97: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES)>

Thursday, 25 April, 2013

Page 98: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES)>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 99: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES)>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 100: Formation spip

Le boucle RUBRIQUES

Thursday, 25 April, 2013

Page 101: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){id_rubrique}>

Thursday, 25 April, 2013

Page 102: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){id_rubrique}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 103: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){id_rubrique}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 104: Formation spip

Le boucle RUBRIQUES

Thursday, 25 April, 2013

Page 105: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){racine}>

Thursday, 25 April, 2013

Page 106: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){racine}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 107: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){racine}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 108: Formation spip

Le boucle RUBRIQUES

Thursday, 25 April, 2013

Page 109: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){racine}{lang}{par date}{inverse} >

Thursday, 25 April, 2013

Page 110: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){racine}{lang}{par date}{inverse} >

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 111: Formation spip

Le boucle RUBRIQUES

<BOUCLE_myboucle(RUBRIQUES){racine}{lang}{par date}{inverse} >

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 112: Formation spip

Le Boucle DOCUMENTS

Thursday, 25 April, 2013

Page 113: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

Thursday, 25 April, 2013

Page 114: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<h1>#TITRE</h1>

Thursday, 25 April, 2013

Page 115: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<h1>#TITRE</h1>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 116: Formation spip

Le Boucle DOCUMENTS

Thursday, 25 April, 2013

Page 117: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

Thursday, 25 April, 2013

Page 118: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<a href=”#URL_DOCUMENT”>#TITRE</a>

Thursday, 25 April, 2013

Page 119: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<a href=”#URL_DOCUMENT”>#TITRE</a>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 120: Formation spip

Le Boucle DOCUMENTS

Thursday, 25 April, 2013

Page 121: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

Thursday, 25 April, 2013

Page 122: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<a href=”#URL_DOCUMENT”>#LOGO_DOCUMENT</a>

Thursday, 25 April, 2013

Page 123: Formation spip

Le Boucle DOCUMENTS

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<a href=”#URL_DOCUMENT”>#LOGO_DOCUMENT</a>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 124: Formation spip

Contexte, contexte, contexte...

Thursday, 25 April, 2013

Page 125: Formation spip

Contexte, contexte, contexte...

•Chaque page sur SPIP a un ‘contexte’.

Thursday, 25 April, 2013

Page 126: Formation spip

Contexte, contexte, contexte...

•Chaque page sur SPIP a un ‘contexte’.

•Les boucles prennent le contexte du boucle supérieur, ou sinon de la page...

Thursday, 25 April, 2013

Page 127: Formation spip

Demo Context

Thursday, 25 April, 2013

Page 128: Formation spip

Demo Context

Thursday, 25 April, 2013

Page 129: Formation spip

Demo Context

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<a href=”#URL_DOCUMENT”>#TITRE</a>

</BOUCLE_myboucle>

Thursday, 25 April, 2013

Page 130: Formation spip

Demo Context

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<a href=”#URL_DOCUMENT”>#TITRE</a>

</BOUCLE_myboucle>

contexte ici est id_article=3

Thursday, 25 April, 2013

Page 131: Formation spip

Demo Context

<BOUCLE_myboucle(DOCUMENTS){id_article}>

<a href=”#URL_DOCUMENT”>#TITRE</a>

</BOUCLE_myboucle>

contexte ici est id_article=3

contexte ici est le id_document

Thursday, 25 April, 2013

Page 132: Formation spip

Demo Context

Thursday, 25 April, 2013

Page 133: Formation spip

Demo Contextcontexte ici est le id_article

Thursday, 25 April, 2013

Page 134: Formation spip

Demo Context<html> contexte ici est le id_article

Thursday, 25 April, 2013

Page 135: Formation spip

Demo Context<html>

#TITRE

contexte ici est le id_article

Thursday, 25 April, 2013

Page 136: Formation spip

Demo Context<html>

#TITRE = rien

contexte ici est le id_article

Thursday, 25 April, 2013

Page 137: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

= rien

contexte ici est le id_article

Thursday, 25 April, 2013

Page 138: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

= rien

contexte ici est le id_article

Thursday, 25 April, 2013

Page 139: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

= rien

contexte ici est le id_article

= titre de l’article 3

Thursday, 25 April, 2013

Page 140: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

= rien

contexte ici est le id_article

= titre de l’article 3

contexte ici est le id_article (à cause du boucle ARTICLES)

Thursday, 25 April, 2013

Page 141: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

<BOUCLE_myboucle(DOCUMENTS){id_article}>

= rien

contexte ici est le id_article

= titre de l’article 3

contexte ici est le id_article (à cause du boucle ARTICLES)

Thursday, 25 April, 2013

Page 142: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

<BOUCLE_myboucle(DOCUMENTS){id_article}>

#TITRE

= rien

contexte ici est le id_article

= titre de l’article 3

contexte ici est le id_article (à cause du boucle ARTICLES)

Thursday, 25 April, 2013

Page 143: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

<BOUCLE_myboucle(DOCUMENTS){id_article}>

#TITRE

= rien

contexte ici est le id_article

= titre de l’article 3

contexte ici est le id_article (à cause du boucle ARTICLES)

= titre du document

Thursday, 25 April, 2013

Page 144: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

<BOUCLE_myboucle(DOCUMENTS){id_article}>

#TITRE

= rien

contexte ici est le id_article

= titre de l’article 3

contexte ici est le id_article (à cause du boucle ARTICLES)

contexte ici est le id_document (à cause du boucle DOCUMENT)= titre du document

Thursday, 25 April, 2013

Page 145: Formation spip

Demo Context<html>

#TITRE

<BOUCLE_1(ARTICLE){id_article}>

#TITRE

<BOUCLE_myboucle(DOCUMENTS){id_article}>

#TITRE

</BOUCLE_myboucle>

</BOUCLE_1>

</html>

= rien

contexte ici est le id_article

= titre de l’article 3

contexte ici est le id_article (à cause du boucle ARTICLES)

contexte ici est le id_document (à cause du boucle DOCUMENT)= titre du document

Thursday, 25 April, 2013

Page 146: Formation spip

Demo Context= rien ??#TITRE

Thursday, 25 April, 2013

Page 147: Formation spip

Souvent on met alors un boucle MAIN autour de la page entière pour peupler les balises #TITRE etc. avec les bonnes informations.

Demo Context= rien ??#TITRE

Thursday, 25 April, 2013

Page 148: Formation spip

Thursday, 25 April, 2013

Page 149: Formation spip

Multilinguisme

Thursday, 25 April, 2013

Page 150: Formation spip

Multilinguisme

•Les squelettes sont multilingues :

Thursday, 25 April, 2013

Page 151: Formation spip

Multilinguisme

•Les squelettes sont multilingues :<:intro:>

Thursday, 25 April, 2013

Page 152: Formation spip

Multilinguisme

•Les squelettes sont multilingues :<:intro:>

<:auteur:>

Thursday, 25 April, 2013

Page 153: Formation spip

Multilinguisme

•Les squelettes sont multilingues :<:intro:>

<:auteur:>

SPIP va chercher la traduction du mot entre parenthèse dans les fichiers lang en squelettes/lang/public_fr.php, public_en.php etc etc.

Thursday, 25 April, 2013

Page 154: Formation spip

Multilinguisme

•Les squelettes sont multilingues :<:intro:>

<:auteur:>

SPIP va chercher la traduction du mot entre parenthèse dans les fichiers lang en squelettes/lang/public_fr.php, public_en.php etc etc.

• Les articles ont des traductions associées:

Thursday, 25 April, 2013

Page 155: Formation spip

Multilinguisme

•Les squelettes sont multilingues :<:intro:>

<:auteur:>

SPIP va chercher la traduction du mot entre parenthèse dans les fichiers lang en squelettes/lang/public_fr.php, public_en.php etc etc.

• Les articles ont des traductions associées:<BOUCLE_trads(ARTICLES){id_article}{traductions}>

Thursday, 25 April, 2013

Page 156: Formation spip

Multilinguisme

•Les squelettes sont multilingues :<:intro:>

<:auteur:>

SPIP va chercher la traduction du mot entre parenthèse dans les fichiers lang en squelettes/lang/public_fr.php, public_en.php etc etc.

• Les articles ont des traductions associées:<BOUCLE_trads(ARTICLES){id_article}{traductions}>

<li><a href=”#URL_ARTICLE”><:cette-article-en:> : #LANG</a></li>

Thursday, 25 April, 2013

Page 157: Formation spip

Multilinguisme

•Les squelettes sont multilingues :<:intro:>

<:auteur:>

SPIP va chercher la traduction du mot entre parenthèse dans les fichiers lang en squelettes/lang/public_fr.php, public_en.php etc etc.

• Les articles ont des traductions associées:<BOUCLE_trads(ARTICLES){id_article}{traductions}>

<li><a href=”#URL_ARTICLE”><:cette-article-en:> : #LANG</a></li>

</BOUCLE_trads>

Thursday, 25 April, 2013

Page 158: Formation spip

Multilinguisme

Thursday, 25 April, 2013

Page 159: Formation spip

Multilinguisme

•Detection automatique de la langue de l’utilisateur:

Thursday, 25 April, 2013

Page 160: Formation spip

Multilinguisme

•Detection automatique de la langue de l’utilisateur:

•Plugin: Langue Préférée

Thursday, 25 April, 2013

Page 161: Formation spip

Multilinguisme

•Detection automatique de la langue de l’utilisateur:

•Plugin: Langue Préférée

•Redirection vers la bonne rubrique

Thursday, 25 April, 2013

Page 162: Formation spip

Gestion des médias

Thursday, 25 April, 2013

Page 163: Formation spip

Gestion des médias

•Médiathèque

Thursday, 25 April, 2013

Page 164: Formation spip

Gestion des médias

•Médiathèque

• Associer des images à des articles (boucle DOCUMENTS)

Thursday, 25 April, 2013

Page 165: Formation spip

Gestion des médias

•Médiathèque

• Associer des images à des articles (boucle DOCUMENTS)

• Traitment automatique des images:

Thursday, 25 April, 2013

Page 166: Formation spip

Gestion des médias

•Médiathèque

• Associer des images à des articles (boucle DOCUMENTS)

• Traitment automatique des images:

• image_reduire, image_reduire_par, image_recadre, image_nb, image_sepia (avec ou sans parametres, image_masque...

Thursday, 25 April, 2013

Page 167: Formation spip

Merci !Fichier pour l’exo:

http://strasweb.fr/~membres/mark/site-prairie.zip

Thursday, 25 April, 2013