tips:pageaccueil
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
tips:pageaccueil [2014-12-11 14:41] – removed 81.80.99.75 | tips:pageaccueil [2015-04-17 18:13] (current) – old revision restored (2014-11-07 14:18) Aleksandr | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Page d' | ||
+ | Permet de créer facilement des nouvelles pages dans des catégories voulues - Allows you to easily create new pages into | ||
+ | appropriate categories | ||
+ | |||
+ | author: | ||
+ | |||
+ | |||
+ | ===== Objet / Object ===== | ||
+ | |||
+ | Permet de créer une page d' | ||
+ | Permet aussi de créer une nouvelle catégorie.\\ | ||
+ | La liste des catégories est aussi affichée sur la droite. | ||
+ | |||
+ | |||
+ | //Creates a home page that lists categories of wiki to create a new page in the category chosen. | ||
+ | Also allows to Create a new category.\\ | ||
+ | |||
+ | The list of categories is also displayed on the right.// | ||
+ | |||
+ | ===== Exemple / Sample ===== | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | |||
+ | ===== Plugin ===== | ||
+ | |||
+ | Copier le code ci-dessous dans le contenu de la page start. | ||
+ | |||
+ | //Copy the code below into the contents of the home page.// | ||
+ | |||
+ | ===== Code ===== | ||
+ | |||
+ | <code php> | ||
+ | ~~NOCACHE~~ | ||
+ | <php> | ||
+ | require_once(DOKU_INC.' | ||
+ | global $conf; | ||
+ | global $ID; | ||
+ | $dir = $conf[' | ||
+ | $ns = cleanID($ns); | ||
+ | #fixme use appropriate function | ||
+ | if(empty($ns)){ | ||
+ | $ns = dirname(str_replace(':','/', | ||
+ | if($ns == ' | ||
+ | } | ||
+ | $ns = utf8_encodeFN(str_replace(':','/', | ||
+ | | ||
+ | | ||
+ | |||
+ | echo '< | ||
+ | |||
+ | $data = array(); | ||
+ | search($data, | ||
+ | echo html_buildlist($data,' | ||
+ | |||
+ | echo '& | ||
+ | |||
+ | |||
+ | function search2(& | ||
+ | $n=0; | ||
+ | $dirs = array(); | ||
+ | $files | ||
+ | |||
+ | //read in directories and files | ||
+ | $dh = @opendir($base.'/' | ||
+ | if(!$dh) return; | ||
+ | while(($file = readdir($dh)) !== false){ | ||
+ | if(preg_match('/ | ||
+ | if(is_dir($base.'/' | ||
+ | $dirs[] = $dir.'/' | ||
+ | | ||
+ | |||
+ | $tony = $tony.' | ||
+ | $n=$n+1; | ||
+ | continue; | ||
+ | } | ||
+ | $files[] = $dir.'/' | ||
+ | | ||
+ | } | ||
+ | closedir($dh); | ||
+ | sort($files); | ||
+ | sort($dirs); | ||
+ | |||
+ | return $tony; | ||
+ | |||
+ | } | ||
+ | |||
+ | echo '< | ||
+ | echo 'var liste = new Array();</ | ||
+ | $tony=search2($data, | ||
+ | echo '< | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | <body onload=""> | ||
+ | <form class=" | ||
+ | |||
+ | |||
+ | < | ||
+ | .ap {font-family: | ||
+ | .b {font-family: | ||
+ | .tony {font-family: | ||
+ | TD {font-family: | ||
+ | .TD2 {font-family: | ||
+ | .tony2 {font-family: | ||
+ | .tony3 {font-family: | ||
+ | .tony3_2 {font-family: | ||
+ | .c {font-family: | ||
+ | input {font-family: | ||
+ | textarea {font-family: | ||
+ | select {font-family: | ||
+ | A: | ||
+ | A: | ||
+ | A: | ||
+ | </ | ||
+ | < | ||
+ | <span id=k2000></ | ||
+ | & | ||
+ | & | ||
+ | </ | ||
+ | |||
+ | |||
+ | < | ||
+ | & | ||
+ | < | ||
+ | <br> | ||
+ | <br> | ||
+ | <div id=maliste></ | ||
+ | |||
+ | < | ||
+ | TD {background: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | function code(an) | ||
+ | { | ||
+ | liste.sort() | ||
+ | a='' | ||
+ | a=a+'< | ||
+ | a=a+'< | ||
+ | a=a+'< | ||
+ | a=a+' | ||
+ | for(var i=0; | ||
+ | { | ||
+ | if(liste[i]!=' | ||
+ | { | ||
+ | a=a+'< | ||
+ | if((i==0 && | ||
+ | {a=a+' | ||
+ | | ||
+ | a=a+'>' | ||
+ | } | ||
+ | } | ||
+ | |||
+ | a=a+'</ | ||
+ | a=a+'< | ||
+ | a=a+'& | ||
+ | a=a+'< | ||
+ | a=a+'< | ||
+ | a=a+'& | ||
+ | a=a+'</ | ||
+ | |||
+ | document.getElementById(' | ||
+ | |||
+ | if(an !='' | ||
+ | {document.getElementById(' | ||
+ | |||
+ | } | ||
+ | |||
+ | code('' | ||
+ | document.getElementById(' | ||
+ | function aj() | ||
+ | {if(document.tony.ajout.value=='' | ||
+ | var an=liste.length | ||
+ | |||
+ | var chaine=document.tony.ajout.value | ||
+ | var chaine1= chaine.substring(0, | ||
+ | var chaine2= chaine.substring(1) | ||
+ | chaine= chaine1.toUpperCase()+ chaine2.toLowerCase() | ||
+ | document.tony.ajout.value=chaine | ||
+ | |||
+ | liste[an]=document.tony.ajout.value | ||
+ | document.tony.ajout.value="" | ||
+ | code(liste[an]) | ||
+ | } | ||
+ | |||
+ | function Remplacer(a) | ||
+ | { | ||
+ | var a, tmp; | ||
+ | tmp = ""; | ||
+ | |||
+ | for(var i = 0; i < a.length; i++) | ||
+ | {tmp = tmp + a.charAt(i); | ||
+ | if (a.charAt(i) == ":" | ||
+ | } | ||
+ | a = tmp; | ||
+ | |||
+ | return a; | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | <input type=" | ||
+ | <input type=" | ||
+ | <input type=" | ||
+ | |||
+ | < | ||
+ | |||
+ | function lance() | ||
+ | {if(document.tony.taixt.value=='' | ||
+ | {alert(' | ||
+ | return false;} | ||
+ | document.tony.taixt.value=Remplacer(document.tony.taixt.value) | ||
+ | document.getElementById(' | ||
+ | document.tony.id.value=document.getElementById(' | ||
+ | document.tony.submit() | ||
+ | |||
+ | } | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | k2000text | ||
+ | k2000pos = 0; | ||
+ | k2000increment = 1; | ||
+ | |||
+ | k2000text=' | ||
+ | |||
+ | function k2000effet() | ||
+ | { | ||
+ | |||
+ | k2000aff = "" | ||
+ | for(k2000a=0; | ||
+ | { | ||
+ | k2000lettre = k2000text.charAt(k2000a); | ||
+ | if(k2000a == k2000pos || k2000a == (k2000pos+k2000increment)) | ||
+ | k2000aff += "< | ||
+ | else | ||
+ | k2000aff += "< | ||
+ | } | ||
+ | document.getElementById(" | ||
+ | if(k2000pos == k2000text.length) | ||
+ | k2000increment = -1; | ||
+ | if(k2000pos == 0 && k2000increment== -1) | ||
+ | k2000increment = 1; | ||
+ | k2000pos = k2000pos+k2000increment; | ||
+ | timer = setTimeout(" | ||
+ | } | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | k2000effet() | ||
+ | </ | ||
+ | |||
+ | <br> | ||
+ | & | ||
+ | & | ||
+ | |||
+ | |||
+ | < | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <note tip> | ||
+ | {{: | ||
+ | {{: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Discussion ===== | ||
+ | |||
+ | |||
+ | Cela ne fonctionne pas si je copie cela dans la page se terminant par " | ||
+ | |||
+ | >** L' | ||
+ | Tu as quoi comme erreur? ** | ||
+ | ** J'ai activé le php et la html dans la console d' | ||
+ | |||
+ | |||
+ | |||
+ | >> |
tips/pageaccueil.txt · Last modified: 2015-04-17 18:13 by Aleksandr