Plugins généralité

http://www.dokuwiki.org/fr:plugins
Les plugins et templates sont en général créés par d'autres utilisateurs et complète le Dokuwiki ou lui donne un visage complètement différent. Cela permet de modifier votre wiki aux besoins qui vous sont nécessaires. Et si vous avez des bonnes connaissances en php de créer de nouvelles fonctions qui peuvent être ajouté au wiki.
Afin de simplifier l'usage j'ai ajouter de exemples de code à inserer au moment de l'édition des textes.

Installation et update

Les plugins sont des répertoires comprimés contenant un certain nombre de fichiers . Il faut décomprimer le fichiers zip de chaque plugin et recopier le répertoire qui en résulte dans le répertoir ../lib/plugin/ de votre instalation au moyen de votre logiciel ftp.

Pour un update il faut simplement effacer le repertoire du plugin installé au préalable et d'installer le nouveau plugin ensuite. Attention: Pour plus de précaution je recommande plutôt de sauvergarde l'ancien plugin sur votre disque en local au cas ou le nouveau ne fonctionnerait pas comme vous le souhaité.

Info

Plugin ne fonctionne pas !

Après avoir installer un plugin n'oublier surtout pas d'actualiser la page. Sans quoi vous risquez de vous demander pourquoi le plugin ne fonctionne pas. Ceci est parfois aussi nécessaire lors de certaines modifications dans l'édition des textes. Par exemple la flèche de la table des matières a tendance à se volatilisé assez fréquemment lors de l'édition.

Plugins

Source:http://wiki.splitbrain.org/plugin:gallery

Pour ceux qui on ce plugin une petite astuce; vous pouvez aussi charge une galerie complet sur votre site sans passer par le chargement individuel de chaque page. Il suffit de repérétoir de base où sont les imgages et d'y placer le répertoire où vous avez préparé vos images.

L'option “lightbox” est un scripte qui doit être activé dans l'administrateur. Cela permet de passer d'une image à l'autre et de l'agrandir.

Astuce de cache

Lorsque vous changer d'image manuellement dans le répertoire le cache doit être vider (ctrl F5). Mais il y a plus simple pour l'adminstarteur changer porvisoirement le nombre d'image par ligne et afficher la galerie.

Code:

{{gallery>namespace}}
{{gallery>namespace?150x150}}

Exemple:

photo

Move pluging

http://www.isection.co.uk/doku.php

Ceci est un plugin d'administration qui permet de déplacer ou renommer une page.

Styler

Style (nouveau bloc avec attributs), pour le changement de couleurs des boxes il faut modifier style.css dans le repertoire styler du plugin
http://iar.spb.ru/projects/dokuwiki/styler

To place on the right
the floating block with
a background and border.

Le code
<style float-right box background>
To place on the right the floating block 
with a background and border.
</style>
  
<quote> - the expanded quotations
<epigraph> - epigraps
<verse> - formatting of verses
<style> - generic style blocks

Attributs utilisable avec les blocs

  • left - text align to left;
  • right - text align to right;
  • center - center text;
  • justify - justify text;
  • float-left - To create the floating block to the left of the text;
  • float-right - To create the floating block to the right of the text;
  • box - To draw a framework around of the block;
  • background - To fill in a background with solid color.

Des options de couleurs ont été ajouté et ne figure pas dans le plugin d'origine. Il suffit de rajouter les fonds de couleurs dans les fichiers css et php.

style.css
div.styler-backblack { background-color: #000000; color: #FFFFFF;}
div.styler-backwhite { background-color: #FFFFFF }
div.styler-backgr1 { background-color: #FBABAB }
div.styler-backgr2 { background-color: #EBABAB }
div.styler-backgr3 { background-color: #DBABAB }
syntax.php
foreach(array('left', 'right', 'center', 'justify', 'box', 'float-left', 'float-right', 'background','backblack','backwhite','backgr1','backgr2','backgr3') as $v)

Text dans la boîte

exemples supplémentaires

IFRame

http://wiki.splitbrain.org/plugin:iframe

Simple:

{{url>http://www.somesite.com/somepage.html}}

New Complete:
{{url>someurl width,height noscroll noborder alignment|alternate-text}}

width height :values in px, em, pt or %.
alignement : left right
|comment

Exemple de Iframe1
{{url>http://www.armuco.ch 600px, 800px, noborder, left }}

Iframe exemple

iframe1

ifram2 avec blogger fonctionne

ifram3 avec google page

ifram4 avec tweeter page

ifram5 avec tweeter page

Box Plugin

http://www.dokuwiki.org/plugin:box http://wiki.splitbrain.org/plugin:boxes

the box contents

a caption


a title

The box contents

Note


the box contents

a caption


The box plugins comes with the following classes already defined:

round — box will have rounded corners

blue — blue colour scheme

red — red colour scheme

green — green colour scheme

orange — orange colour scheme

left — float the box left within the wiki page

right — float the box right within the wiki page

% = largeur utilisé
<box 80% round orange|a title> the box contents</box>
<box 50% left blue>the box contents</box|a caption>

Box samples

<box 50% left blue>the box contents</box|a caption>
<box 50% right red>the box contents</box|a caption>
<box 50% left green>the box contents</box|a caption>
<box 50% right orange>the box contents</box|a caption>
<box 80% round orange|Titre> the box contents</box|Note>
the box contents 1
the box contents 1
the box contents 1


text text
text text
text text

Titre image

the box contents 2 Lien intern


text text
text text
text text

the box contents 3


text text
text text
text text

the box contents 4

a caption


text text
text text
text text

Titre

the box contents

Note


text text

Titre

the box contents

Note


text text

Titre image

the box contents 2 Lien intern


Note plugin

http://wiki.splitbrain.org/plugin:note

Attribut: (sans), important, warning and tip.

N'oublier rien !!

Attention au problème !!

Ceci est est important !

Petit conseil.

BBcode

http://wiki.splitbrain.org/plugin:bbcode

smaller text
attribute: numeric value (px, em, %, …)
or keywords like small colored text
attribute: color name, #fff[fff] or rgb(255,255,255)

[size=90%]smaller text[/size]               attribute: numeric value (px, em, %, ...) or keywords like small
[color=red]colored text[/color]             attribute: color name, #fff[fff] or rgb(255,255,255)

[list][*]item 1[*]item 2[*]item 3[/list]
[list=1][*]item 1[*]item 2[*]item 3[/list]  attribute: 1, a, A, i or I

[b]bold text[/b]
[i]italic text[/i]
[u]underline[/u]

[code]<?php echo $text;[/code]
[quote="Esther"]DokuWiki is great![/quote]
  • item 1
  • item 2
  • item 3
  1. item 1
  2. item 2
  3. item 3
  1. item 1
  2. item 2
  3. item 3
  1. item 1
  2. item 2
  3. item 3
  1. item 1
  2. item 2
  3. item 3
  1. item 1
  2. item 2
  3. item 3

bold text italic text underline

<?php echo $text;

Esther:

DokuWiki is great!

Uparrow

http://www.chimeric.de/projects/dokuwiki/plugin/uparrow Ajoute un bouton pour monter en haut de la page sur la droite.

Code:
~~UP~~

Google map

Plugin n'est plus fonctionnel
Le plus simple, utiliser l'insertion html. et le lien de sur la page de googlemap pour intégrer au site.

<html>
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=fr&amp;ie=UTF8&amp;ll=47.0603,6.896839&amp;spn=0.049349,0.088921&amp;z=13&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?hl=fr&amp;ie=UTF8&amp;ll=47.0603,6.896839&amp;spn=0.049349,0.088921&amp;z=13&amp;source=embed" style="color:#0000FF;text-align:left">Agrandir le plan</a></small>
</html>

Tag

Tags
{{tag>[list of tags]}} placer tag

    *
      {{topic>tag1 -tag2}} – Lists all pages tagged with tag1 but not with tag2.
    *
      {{topic>tag1 +tag2}} – Lists all pages tagged with tag1 and tag2.
    *
      {{topic>tag1 tag2}} – Lists all pages tagged with either tag1 or tag2 or both.

exemple: extag1

Page list

Affiche les tags d'un fichier

<pagelist&tags>
  * [[plugin:blog]]
  * [[plugin:discussion]]
  * [[plugin:clearfloat]]
  * [[plugin:lastfm]]
</pagelist>

exemple: expageliste

Utiliser les catégories pour gèrer le RSS 2.0

LOGO RSS
Il faut combiner 3 plugins pour pouvoir gèrer correctent le RSS. Cela permet aussi une gestion classic des pages dans le wiki.

Tag plugin

place une etiquette de catégorie ( 1 ou plusieur catégorie) à mettre au bas de la page

Il faut absolument (Page liste plugin) pour que le plugin fonctionne.

{{tag>Feed Playground}} catégorie sa place au bas de chaque page

{{topic>support}}  Liste de la catégorie, à placer dans la page ou doit figurer la liste de cette catégorie. (ici page support)

Page liste plugin

Affiche info de la page

http://www.wikidesign.ch/en/plugin/pagelist/start

Exemple:
<pagelist table>
  * [[..:support:faq|Support page]]
  * [[..:Linux:linux|Linux page]]
</pagelist>
Support page   JSTO ,
Linux page      

Feed plugin

Crée un lien vers une page dynamic RSS 2.0

http://www.wikidesign.ch/en/plugin/feed/start

Five different feed types:

  * {{blogfeed>blog|Blog Entries}}
  * {{commentsfeed>playground|Individual Comments}}
  * {{threadsfeed>blog|Discussion Threads}}
  * {{editorfeed>*?esther|Edits by Esther}}
  * {{topicfeed>*?cloud|Tagged «Cloud»}}
  * {{tasksfeed>*|Tasksfeed}} 

Type de lien RSS utilisable avec mon site

Derniers arcticle de J.STO:
{{editorfeed>*?btx59azt|Edits by J.STO}}

Alticles selon catégorie référencé:
* {{topicfeed>*?support|Tagged «support»}}
* {{topicfeed>*?news|Tagged «news»}}

Editor ⇐ Lien vers la page des derniers articles.

Edits by J.STO ⇐ Lien RSS 2.0 à utiliser avec un programme adapté au RSS.

Il est aussi possible de récupérer la liste des fichiers depuis 
un lien RSS pour la placer dans le wiki en  utilsant un balise rss eten copiant l'adresse d'un lien RSS. (on reconnait un tel lien car il est mal affiché dans un navigateur internet et qu'il possède un logo orange.

{{rss>http://www.armuco.ch/dwiki/lib/plugins/feed/feed.php?plugin=editor&fn=getEditor&ns=&user=btx59azt&title=Editor}}

Include plugin

http://www.wikidesign.ch/en/plugin/include/start

{{page>en:plugin:include:start#syntax}}

{{page>[id]#[section]&[flags]}}
{{section>[id]#[section]&[flags]}}

Flag

 Setting 	 Default 	 Alternative
firstseconly 	fullpage 	includes the whole page 	firstseconly 	includes only the first section of a wiki page
showfooter 	footer 	shows a footer below the page with info about the included page 	nofooter 	hides the page info footer


Video plugin

Plugin pour divers media pas encore tout testé Format supporté: flash , midi, mp3, mpeg, real,realvideo video: avi movie (quicktime) : mov

{{video>http://www.yourpage.com/yourmovie.avi [width,height]|Alternate text}}
{{flash>http://www.yoursite.com/yourflash.swf [width,height]|Alternate text}}

http://wiki.splitbrain.org/plugin:video

Meta Tags et search engines

Typography

http://piekarnia.edl.pl/proj/typography

<typo fs:1.8em; ff:Iwona, Georgia, serif; ls:-2px; ws:-0.1em;>Programming today is <color #F0276E>a race between software engineers</color> striving to build bigger and better idiot-proof programs, <color #F0276E>and the Universe</color> trying to produce bigger and better idiots.</typo> <typo fs:1.8em; fv:smallcaps; lh:10px; ff:Iwona, Georgia, serif;>So far, the Universe is winning.</typo>

<typo ff:Coma separated, font famliy names, can contain spaces;>Text</typo> 	
font variant 	<typo fv:smallcaps;>Text</typo> only “smallcaps” value allowed
font size 	<typo fs:20px;>Text</typo> 	values below zero not allowed
line height 	<typo lh:20px;>Text</typo> 	values below zero not allowed
letter spacing 	<typo ls:20px;>Text</typo> 	values below zero allowed
spacing between word 	<typo ws:20px;>Text</typo> 
  • 'serif' (e.g., Times)
  • 'sans-serif' (e.g., Helvetica)
  • 'cursive' (e.g., Zapf-Chancery)
  • 'fantasy' (e.g., Western)
  • 'monospace' (e.g., Courier)

<typo ff:serif; fs:25px;>Text serif </typo>

<typo ff:Morpheus, fantasy; fs:25px;>Text fantasy western </typo>

<typo fs:1.8em; ff:Iwona, Georgia, serif; ls:-2px; ws:-0.1em;>Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots.</typo> <typo fs:1.8em; fv:smallcaps; lh:10px; ff:Iwona, Georgia, serif;>So far, the Universe is winning.</typo>

Image Map

Class

Permet d'utiliser des class prédefinie dans l'édition pour un bloc div. Ces classe personnaliser doivent être prédéfinie dans un fichier css. Rien ne se passera si la class n'est pas définie.

Proposition : inclure un fichier css dans main pour toute les classes spécial. style extraclass.css

Utilisation:
<class myStyleClass>This is my content.</class>

Modif pour main.php

http://www.dokuwiki.org/plugin:class

http://www.dokuwiki.org/plugin:class

Tabble des matières TOC

~~NOTOC~~ : cette  balise standard désactive la table
~~TOC~~ : cette nouvelle balise place la tabe à l'endrit désiré.
(à gauche)

http://www.dokuwiki.org/plugin:toc

TPL Switcher

Les noms des templates sont ceux placer dans le répertoire tpl. Bug: une fois actif il est plus possible de changer les templates dans admin.

// create a single button to change to default template
{{tplSwitcher>default|Default}}

// create a select field to choose a template from
{{tplSwitcher>default|Default||original|Original}}

// in addition to either of the syntax above, you can have some text in front
{{tplSwitcher>default|Default%<optional_text>}}

// NEW: Switch the layout when clicking another page
{{tplSwitcher>Page>thePageYouWant%templateName}}