From b1b3c24c28967c7218074ee4bba7d387d5181d20 Mon Sep 17 00:00:00 2001 From: Damien Bobillot Date: Sat, 3 May 2008 20:08:36 +0200 Subject: [PATCH] Fichiers specifiques X.org --- .gitignore | 1 + install/cookbook/autocreate.php | 18 ++ install/cookbook/chat.php | 124 ++++++++++++ install/cookbook/faq.php | 102 ++++++++++ install/cookbook/farmadmin.php | 14 ++ install/cookbook/fieldadmin.php | 109 ++++++++++ install/cookbook/geoloc.php | 44 ++++ install/cookbook/skinchange.php | 38 ++++ install/cookbook/xorgauth.php | 321 ++++++++++++++++++++++++++++++ install/local/farmconfig.php | 114 +++++++++++ install/local/farmmap.txt | 1 + install/{ => wikilib.d}/Site.AuthForm | 0 install/{ => wikilib.d}/Site.PageActions | 0 install/{ => wikilib.d}/Site.PageFootMenu | 0 14 files changed, 886 insertions(+) create mode 100644 .gitignore create mode 100644 install/cookbook/autocreate.php create mode 100644 install/cookbook/chat.php create mode 100644 install/cookbook/faq.php create mode 100644 install/cookbook/farmadmin.php create mode 100644 install/cookbook/fieldadmin.php create mode 100644 install/cookbook/geoloc.php create mode 100644 install/cookbook/skinchange.php create mode 100644 install/cookbook/xorgauth.php create mode 100644 install/local/farmconfig.php create mode 100644 install/local/farmmap.txt rename install/{ => wikilib.d}/Site.AuthForm (100%) rename install/{ => wikilib.d}/Site.PageActions (100%) rename install/{ => wikilib.d}/Site.PageFootMenu (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31279aa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pmwiki diff --git a/install/cookbook/autocreate.php b/install/cookbook/autocreate.php new file mode 100644 index 0000000..428928b --- /dev/null +++ b/install/cookbook/autocreate.php @@ -0,0 +1,18 @@ +exists($pagename_)) { + $WikiDir->write($pagename_, array('text' => $text)); + if ($redirect != '') { + $redirect = $pagename_; + } + Redirect($pagename_); + } +} + +?> diff --git a/install/cookbook/chat.php b/install/cookbook/chat.php new file mode 100644 index 0000000..2eab8c4 --- /dev/null +++ b/install/cookbook/chat.php @@ -0,0 +1,124 @@ +'); +Markup('chatNext','inline','/\\(:chatNext:\\)/','
'); +Markup('chatTalk','inline','/\\(:chatTalk (\\w+) (\\w+):\\)/e',"ChatTalk('$1', '$2')"); + +function CreateChat($size = 10) { + $idchat = substr(md5(rand()),0,4); + if (!$size) { $size = 10; } + return + '(:chatBegin '.$idchat.':)'."\n". + '(:chatEnd '.$idchat.':)'."\n\n". + '(:if auth edit:)(:chatTalk '.$idchat.' '.$size.':)(:if:)'; +} + +function ChatTalk($idchat, $size = 10) { + return Keep( + '
+ + + + +
+ '); +} + +function HandleChat() { + global $pagename, $CurrentTime, $Author; + Lock(2); + if (isset($_REQUEST['postchat']) && $_REQUEST['postchat'] && + ($page = RetrieveAuthPage($pagename, 'edit', true))) { + $postchat = stripmagic($_REQUEST['postchat']); + $idchat = stripmagic($_REQUEST['chatId']); + $size = stripmagic($_REQUEST['size']); + + $origine = array('(:chatNext:)'); + $destination = array(''); + $chatsyntax = RetrieveAuthPage('Site.ChatSyntax', 'read', false); + if ($chatsyntax) { + $chatsyntax = explode("\n",$chatsyntax['text']); + foreach($chatsyntax as $s) if (preg_match('/^(.*) => (.*)$/', trim($s), $matches)) { + $origine[] = $matches[1]; + $destination[] = $matches[2]; + } + } + + $newchat = $CurrentTime.' [[~'.$Author.']] : '.str_replace($origine, $destination, $postchat); + + $talkpos = strpos($page['text'], '(:chatTalk '.$idchat.' '); + $beginpos = strpos($page['text'], '(:chatBegin '.$idchat.':)'); + $endpos = strpos($page['text'], '(:chatEnd '.$idchat.':)'); + + $beginpos += strlen('(:chatBegin '.$idchat.':)'); + $lignes = explode('(:chatNext:)',substr($page['text'], $beginpos, $endpos - $beginpos)); + + if ($talkpos > $beginpos) { + $afac = count($lignes) - $size - 1; + $lignes[] = $newchat; + for ($i = 0; $i < $afac; $i++) { + unset($lignes[$i]); + } + } else { + $nouvelleslignes = array($newchat); + for ($i = 0; $i < count($lignes) && $i < $size - 1; $i++) { + $nouvelleslignes[] = $lignes[$i]; + } + $lignes = $nouvelleslignes; + } + $chatcontent = implode('(:chatNext:)', $lignes); + $page['text'] = substr($page['text'],0,$beginpos).$chatcontent.substr($page['text'],$endpos); + WritePage($pagename,$page); + Lock(0); + Redirect($pagename); + } + Lock(0); + return ""; +} +function afac() { + global $pagename, $Author, $CurrentTime; + if (isset($_REQUEST['postchat']) && $_REQUEST['postchat']) { + Lock(2); + $page = RetrieveAuthPage($pagename, 'edit', false); + if (!$page) { + Lock(0); + return ""; + } + + + + + $poschat = strpos($page['text'],'(:beginchat:)'); + $finchat = strpos($page['text'],'(:chat'); + if ($poschat === false) { + $poschat = $finchat; + $page['text'] = substr($page['text'],0,$poschat).'(:beginchat:)'.substr($page['text'],$poschat); + $finchat += strlen('(:beginchat:)'); + } + $poschat += strlen('(:beginchat:)'); + + $avantchat = substr($page['text'],0,$poschat); + $chatcontent = substr($page['text'], $poschat, $finchat - $poschat); + $aprechat = substr($page['text'],$finchat); + + $lignes = explode("\n\n",$chatcontent); + $page['text'] = $avantchat.implode("\n\n", $lignes)."\n\n".$CurrentTime.' [[~'.$Author.']] : '.$newchat.$aprechat; + WritePage($pagename,$page); + Lock(0); + Redirect($pagename); + return ""; + } + $page = RetrieveAuthPage($pagename, 'edit', false); + if (!$page) { + return ''; + } + return '
'; +} + +?> diff --git a/install/cookbook/faq.php b/install/cookbook/faq.php new file mode 100644 index 0000000..7c8ded5 --- /dev/null +++ b/install/cookbook/faq.php @@ -0,0 +1,102 @@ +Poser une nouvelle question : +
+ + + + +
'); +} + +function newFAQAnswer($idfaq, $numquestion, $numanswer) { + $idfaqanswer = 'faqAnswer-'.$idfaq.'-'.$numquestion.'-'.$numanswer; + return Keep('
+ + +
'); +} + +function HandleFAQ() { + global $pagename, $CurrentTime, $Author; + Lock(2); + if (isset($_REQUEST['question']) && $_REQUEST['question'] && + ($page = RetrieveAuthPage($pagename, 'edit', true))) { + $idfaq = stripmagic($_REQUEST['faqId']); + $question = stripmagic($_REQUEST['question']); + $numquestion = stripmagic($_REQUEST['numQuestion']); + $titre = $question; + if (strlen($titre) > 30) { + $titre = substr($question, 0, 50).'...'; + $question = $titre."\n".$question; + } + $page['text'] = preg_replace( + ',(\(:faqList '.$idfaq.':\)),', + "\n".'*[[{$FullName}#faq'.$idfaq.'-'.$numquestion.' | '.$titre.']]$1', + $page['text']); + $page['text'] = preg_replace( + ',(\(:if auth edit:\)\(:faqNewQuestion '.$idfaq.') '.$numquestion.':\),', + '!![[#faq'.$idfaq.'-'.$numquestion.']]Q : '.$question.'\\\\\\\\'."\n". + '[-\'\'question posée le '.$CurrentTime.($Author?(' par [[~ '.$Author.' ]]\'\'-]'):'')."\n". + '(:if auth edit:)(:faqNewAnswer '.$idfaq.' '.$numquestion.' 1:)(:if:)'."\n". + '$1 '.($numquestion + 1).':)', + $page['text']); + WritePage($pagename,$page); + Redirect($pagename); + } + Lock(0); + return ""; +} + +function HandleFAQAnswer() { + global $pagename, $CurrentTime, $Author; + Lock(2); + if (isset($_REQUEST['answer']) && $_REQUEST['answer'] && + ($page = RetrieveAuthPage($pagename, 'edit', true))) { + $idfaq = stripmagic($_REQUEST['faqId']); + $answer = str_replace("\n", "\n->", stripmagic($_REQUEST['answer'])); + $numanswer = stripmagic($_REQUEST['numAnswer']); + $numquestion = stripmagic($_REQUEST['numQuestion']); + $page['text'] = preg_replace( + ',(\(:if auth edit:\)\(:faqNewAnswer '.$idfaq.' '.$numquestion.') '.$numanswer.':\),', + '->[[#faq'.$idfaq.'-'.$numquestion.'-'.$numanswer.']]R : '.$answer."\n". + '->[-\'\'réponse le '.$CurrentTime.($Author?(' par [[~ '.$Author.' ]]\'\'-]'):'')."\n". + '$1 '.($numanswer + 1).':)', + $page['text']); + WritePage($pagename,$page); + Redirect($pagename); + } + Lock(0); + return ""; +} + +?> diff --git a/install/cookbook/farmadmin.php b/install/cookbook/farmadmin.php new file mode 100644 index 0000000..e723539 --- /dev/null +++ b/install/cookbook/farmadmin.php @@ -0,0 +1,14 @@ + diff --git a/install/cookbook/fieldadmin.php b/install/cookbook/fieldadmin.php new file mode 100644 index 0000000..cdf3e3a --- /dev/null +++ b/install/cookbook/fieldadmin.php @@ -0,0 +1,109 @@ +'); +} + +function FieldAdmin() { + + if (isset($_REQUEST['createconf']) && !($f = @fopen('local/webconfig.php','r'))) { + $f = @fopen('local/webconfig.php','w'); + global $WikiTitle, $FarmD, $Skin, $PageLogoUrl, $DefaultPasswords; + WriteAdminConfig($f, $WikiTitle, $Skin, $PageLogoUrl, $DefaultPasswords['read'], $DefaultPasswords['edit']); + fclose($f); + mkdirp('uploads'); + } + + RetrieveAuthPage('Site.Admin', 'admin', true); + + if (isset($_REQUEST['admin'])) { + $f = @fopen('local/webconfig.php','w'); + if (!$f) { + $f = @fopen('local/webconfig.php','r'); + if ($f) { + fclose($f); + $error = 'Il faut que le fichier local/webconfig.php soit accessible en écriture par l\'utilisateur www-data. Il faut régler le problème puis actualiser cette page.'; + } else { + $error = 'Il faut passer le dossier local/ en 2777 puis actualiser cette page et enfin repasser le dossier en 755.'; + } + return 'Impossible d\'écrire la nouvelle configuration. '.$error; + } + WriteAdminConfig($f, + stripmagic($_REQUEST['wikititle']), + stripmagic($_REQUEST['skin']), + stripmagic($_REQUEST['logo']), + stripmagic($_REQUEST['passwdread']), + stripmagic($_REQUEST['passwdedit'])); + fclose($f); + redirect('Site.Admin?modified=ok'); + } + + global $WikiTitle, $FarmD; + $pagehtml = ''; + $pagehtml .= '

Administration du wiki '.$WikiTitle.'

'; + if (isset($_REQUEST['modified'])) { + $pagehtml .= 'Configuration modifiée'; + } + $pagehtml .= '
'; + $pagehtml .= '
'; + return $pagehtml; +} + +if (file_exists("$LocalDir/webconfig.php")) { + include_once("$LocalDir/webconfig.php"); +} + +?> diff --git a/install/cookbook/geoloc.php b/install/cookbook/geoloc.php new file mode 100644 index 0000000..e0cff44 --- /dev/null +++ b/install/cookbook/geoloc.php @@ -0,0 +1,44 @@ + + + + + + + +'; +} + +?> diff --git a/install/cookbook/skinchange.php b/install/cookbook/skinchange.php new file mode 100644 index 0000000..86a281d --- /dev/null +++ b/install/cookbook/skinchange.php @@ -0,0 +1,38 @@ + 'pmwiki', + 'myskin' => 'myskin', + 'classic' => 'myclassicskin'); + + If a URL requests a skin that isn't in this array, then PmWiki + defaults to the skin already defined by $Skin. + + By default, the setskin cookie that is created will expire after + one year. You can set it to expire at the end of the browser + session by setting $SkinCookieExpires=0; +*/ + +SDV($SkinCookie, $CookiePrefix.'setskin'); +SDV($SkinCookieExpires, $Now+60*60*24*365); + +if (isset($_COOKIE[$SkinCookie])) $sk = $_COOKIE[$SkinCookie]; +if (isset($_GET['setskin'])) { + $sk = $_GET['setskin']; + setcookie($SkinCookie, $sk, $SkinCookieExpires, '/'); +} +if (isset($_GET['skin'])) $sk = $_GET['skin']; +if (@$PageSkinList[$sk]) $Skin = $PageSkinList[$sk]; diff --git a/install/cookbook/xorgauth.php b/install/cookbook/xorgauth.php new file mode 100644 index 0000000..4c32ee6 --- /dev/null +++ b/install/cookbook/xorgauth.php @@ -0,0 +1,321 @@ +'; +$HTMLHeaderFmt['xorgcustomauth'] = ''; + +Markup('[[~|','<[[~','/\\[\\[~(.*?)\|(.*?)\\]\\]/e',"Keep('$2')"); + +Markup('xorgpage','inline','/\\(:xorgpage\\s*(.*?):\\)/e', "Keep('')"); +Markup('xnetpage','inline','/\\(:xnetpage\\s*(.*?):\\)/e', "XnetPage('$1')"); +function XnetPage($page) { + global $XnetWikiGroup; + if (!$XnetWikiGroup) return; + return Keep(''); +} + +// Récupère les droits au niveau du dossier (Group PmWiki) +function XorgAuthGetGroupAuth($pagename,$since) { + global $GroupPasswords; + if (!isset($GroupPasswords)) { + $GroupPasswords = array(); + } + $group = substr($pagename, 0, strpos($pagename, '.')); + if (!isset($GroupPasswords[$group])) { + $GroupPasswords[$group] = ReadPage($group.'.GroupAttributes', $since); + } + return $GroupPasswords[$group]; +} + +// essaie de se connecter via xorg +function XorgAuthConnectPlatal() { + $privkey = '6e9c9fa9bac23541fe67697c4eff5be6'; + global $XnetWikiGroup; + $returl = 'http://'.$_SERVER['SERVER_NAME'].str_replace('action=connect', '', $_SERVER['REQUEST_URI']); + if (isset($_REQUEST['oldaction'])) { + $returl .= '&action='.$_REQUEST['oldaction']; + } + @session_destroy(); + session_start(); + $challenge = md5(rand()); + $_SESSION['challenge'] = $challenge; + $_SESSION['authsite'] = $XnetWikiGroup; + $url = "https://www.polytechnique.org/auth-groupex.php"; + $url .= "?session=".session_id(); + $url .= "&challenge=".$challenge; + $url .= "&pass=".md5($challenge.$privkey); + $returl .= "&challenge=".$challenge; + $url .= "&url=".urlencode($returl); + if ($XnetWikiGroup) { + $url .= "&group=".$XnetWikiGroup; + } + header('Location: '.$url); + exit(); +} + + + // comes back from auth + @session_start(); + if (isset($_GET['auth']) && !$_SESSION['xorgauth'] && $_SESSION['challenge']) { + $tohash = '1'.$_SESSION['challenge'].'6e9c9fa9bac23541fe67697c4eff5be6'; + $fields = explode(',','forlife,nom,prenom,promo,grpauth'); + foreach ($fields as $f) if (isset($_GET[$f])) { + $tohash .= $_GET[$f]; + } + $tohash .= '1'; + if ($_GET['auth'] == md5($tohash)) { + $_SESSION['xorgauth'] = 1; + foreach ($fields as $f) if (isset($_GET[$f])) { + $_SESSION[$f] = $_GET[$f]; + } + } else { + $_SESSION['xorgauth'] = 0; + } + } + if (isset($_SESSION['forlife']) && $_SESSION['forlife']) { + $AuthId = $_SESSION['forlife']; + $Author = $_SESSION['forlife'].' | '.$_SESSION['prenom'].' '.$_SESSION['nom']; + } +$Conditions['connected'] = 'isset($_SESSION["xorgauth"])'; + +function XorgAuthTestPassword($password) { + if (!$password) { + return true; + } + $parts = explode(' ',$password); + foreach ($parts as $pass) { + if ($pass == 'all' || $pass == 'public') { + return true; + } + if ($pass == 'x' && $_SESSION['xorgauth']) { + return true; + } + if ($_SESSION['grpauth'] && $pass == $_SESSION['grpauth']) { + return true; + } + if ($_SESSION['forlife'] && $pass == $_SESSION['forlife']) { + return true; + } + if ($_SESSION['promo'] && $pass == $_SESSION['promo']) { + return true; + } + } + return false; +} + +function XorgAuthIsSiteAdmin() { + global $DefaultPasswords; + return XorgAuthTestPassword($DefaultPasswords['admin']); +} + +// fonction d'authentification : appellée avant tout accès à une page +function XorgAuth($pagename, $level, $authprompt, $since) { + global $XnetWikiGroup; + if (isset($_SESSION['authsite']) && $XnetWikiGroup != $_SESSION['authsite']) { + XorgAuthConnectPlatal(); + return false; + } + $group = substr($pagename, 0, strpos($pagename, '.')); + $page = ReadPage($pagename, $since); + if (!$page) { return false; } + if (XorgAuthIsSiteAdmin()) { return $page; } + global $AuthCascade, $DefaultPasswords, $GroupPasswords; + $password = ""; + do + { + if (isset($page["passwd".$level])) { + $password = $page["passwd".$level]; + } + if (!$password) { + $gpAuth = XorgAuthGetGroupAuth($pagename,$since); + if (isset($gpAuth["passwd".$level])) { + $password = $gpAuth["passwd".$level]; + } + } + if (!$password) { + if (isset($DefaultPasswords[$level])) { + $password = $DefaultPasswords[$level]; + } + } + } while (!$password && isset($AuthCascade[$level]) && $level = $AuthCascade[$level]); + if (XorgAuthTestPassword($password)) { + return $page; + } + if (!$authprompt) { + return false; +} + global $AuthPromptFmt, $PageStartFmt, $PageEndFmt; + $postvars = ''; + foreach($_POST as $k=>$v) { + if ($k == 'authpw' || $k == 'authid') continue; + $v = str_replace('$', '$', + htmlspecialchars(stripmagic($v), ENT_COMPAT)); + $postvars .= "\n"; + } + $FmtV['action'] = $_REQUEST['action']; + SDV($AuthPromptFmt, array(&$PageStartFmt, "page:Site.AuthForm", &$PageEndFmt)); + PrintFmt($pagename,$AuthPromptFmt); + exit; +} +$XorgAuthLevels = array('read' => 'lecture','edit' => 'modification','attr' => 'administration'); + +function XorgAuthUsers() { + global $XnetWikiGroup; + if ($XnetWikiGroup) { + return array('public' => 'tout le monde','x' => 'les X', 'membre' => 'membres du groupe', 'admin' => 'admins du groupe'); + } else { + return array('public' => 'tout le monde','x' => 'les X', 'admin' => 'admins X.org'); + } +} + +function XorgAuthPermissions($pagename) { + global $XnetWikiGroup,$DefaultPasswords,$XorgAuthLevels; + $XorgAuthUsers = XorgAuthUsers(); + $group = substr($pagename, 0, strpos($pagename, '.')); + if ($pagename != $group.'.GroupAttributes') + $groupAttr = XorgAuthGetGroupAuth($pagename, 0); + $page = ReadPage($pagename, 0); + $attrshtml = ''; + foreach ($XorgAuthLevels as $level => $action) { + $html = $action.' : '; + if ($attrshtml) { + $attrshtml .= ' - '; + } + + $attrshtml .= $html; + } + return '
'.$attrshtml.'
'; +} + +function XorgAuthHandleAttr($pagename, $auth = 'attr') { + $page = RetrieveAuthPage($pagename, $auth, true); + global $PageAttrFmt, $PageStartFmt, $PageEndFmt; + SDV($PageAttrFmt,"
+

$[{\$FullName} Attributes]

+

".XorgAuthPermissions($pagename)."

"); + SDV($HandleAttrFmt,array(&$PageStartFmt,&$PageAttrFmt,&$PageEndFmt)); + PrintFmt($pagename,$HandleAttrFmt); +} + +function XorgAuthHandlePostAttr($pagename, $auth = 'attr') { + global $XorgAuthLevels, $HandleActions; + Lock(2); + $page = RetrieveAuthPage($pagename, $auth, true); + if (!$page) { Abort("?unable to read $pagename"); } + foreach($XorgAuthLevels as $attr=>$p) { + $v = stripmagic(@$_REQUEST['passwd'.$attr]); + if ($v=='') unset($page['passwd'.$attr]); + else if ($v != '...') $page['passwd'.$attr] = $v; + } + WritePage($pagename,$page); + Lock(0); + Redirect($pagename); +} + +function XorgAuthGroupAttributes() { + global $XnetWikiGroup,$DefaultPasswords,$XorgAuthLevels; + $XorgAuthUsers = XorgAuthUsers(); + global $pagename, $WikiDir; + if (substr($pagename, strpos($pagename, '.') + 1) != 'GroupAttributes') { + return ""; + } + if (!XorgAuth($pagename, 'attr', true,0)) { + return ""; + } + if (isset($_REQUEST['page']) && isset($_REQUEST['user']) && isset($_REQUEST['attr'])) { + Lock(2); + $page = RetrieveAuthPage(stripmagic(@$_REQUEST['page']), 'attr', true); + if ($page && isset($XorgAuthLevels[stripmagic(@$_REQUEST['attr'])]) && (isset($XorgAuthUsers[stripmagic(@$_REQUEST['user'])]) || !$_REQUEST['user'])) { + $page['passwd'.stripmagic(@$_REQUEST['attr'])] = stripmagic(@$_REQUEST['user']); + if ($_REQUEST['user'] == "") { + unset($page['passwd'.stripmagic(@$_REQUEST['attr'])]); + } + WritePage(stripmagic(@$_REQUEST['page']),$page); + } + Lock(0); + } + $html = ''; + $html .= ''; + foreach ($XorgAuthLevels as $level => $action) { + $html .= ''; + } + $html .= ''; + $group = substr($pagename, 0, strpos($pagename, '.')); + $pages = $WikiDir->ls($group.'.*'); + $groupAttr = XorgAuthGetGroupAuth($pagename, 0); + foreach($pages as $p) if ($p != $pagename) { + $html .= ''; + $page = ReadPage($p, 0); + $html .= ''; + foreach ($XorgAuthLevels as $level => $action) { + $html .= ''; + } + $html .= ''; + } + $html .= '
'.$action.'
'.substr($p,strpos($p,'.')+1).'
'; + return '

Edition des droits du dossier

'.XorgAuthPermissions($pagename).'

Edition des droits des pages du dossier

'.$html; +} +?> diff --git a/install/local/farmconfig.php b/install/local/farmconfig.php new file mode 100644 index 0000000..68e5f47 --- /dev/null +++ b/install/local/farmconfig.php @@ -0,0 +1,114 @@ +'admin','read'=>'public','edit'=>'admin','attr'=>'admin'); +$DefaultPasswords['upload'] = ''; +$AuthCascade['upload'] = 'edit'; + +include_once("$FarmD/cookbook/xorgauth.php"); +include_once("$FarmD/cookbook/geoloc.php"); +include_once("$FarmD/cookbook/chat.php"); +include_once("$FarmD/cookbook/faq.php"); +include_once("$FarmD/cookbook/fieldadmin.php"); + + +##---------------Francisation ------------------------------------ + +XLPage('fr','PmWikiFr.XLPage'); // Lrs chanes de PmWiki +#XLPage('fr','PmWikiFr.XLPageCookbook'); // S'il y a des modules +$XLLangs = array('fr','en'); + +##-- Chanes et noms de pages/groupes ---------------------------- + +$DefaultGroup = 'Accueil'; # Groupe par défaut +$DefaultName = 'Accueil'; # Page de démarrage groupe - défaut 'HomePage' - +$TimeFmt = "%d/%m/%Y %H:%M"; # Format date/heure 17/02/2004 00:14 +$AuthorGroup='Profils'; # Nom du groupe des auteurs, défaut 'Profiles' +$AuthorRequiredFmt = 'Saisir votre nom ou identifiant'; #quand auteur requis + +##--Gestion des pages -------------------------------------------- + +$DefaultPageTextFmt = 'La page $Name n\'existe pas'; + +$PageNotFound = 'PmWikiFr.PageNonTrouvée'; #Renvoi quand page inexistante + +## Expression utilisée pour indiquer qu'une page doit tre effacée +$DeleteKeyPattern = "^\\s*effacer\\s*$"; +$PageRedirectFmt = '

redirigé depuis $FullName

'; + + ## Définition des pages des derniers chargements (n'existe pas encore) + # $RecentUploads = array(... + + + ##-- Styles prédéfinis -------------------------------------------- + + $WikiStyle['noir']['color'] = 'black'; + $WikiStyle['blanc']['color'] = 'white'; + $WikiStyle['rouge']['color'] = 'red'; + $WikiStyle['vert']['color'] = 'green'; + $WikiStyle['bleu']['color'] = 'blue'; + $WikiStyle['jaune']['color'] = 'yellow'; + $WikiStyle['gris']['color'] = 'gray'; + $WikiStyle['argent']['color'] = 'silver'; + $WikiStyle['marron']['color'] = 'maroon'; + $WikiStyle['pourpre']['color'] = 'purple'; + $WikiStyle['bleufoncé']['color'] = 'navy'; + + ##-- Groupes et pages à exclure des recherches ----------------------- + + $SearchPatterns['default'][] = '!\\.RechercheWiki$!'; + $SearchPatterns['default'][] = '!\\.Attributes$!'; + $SearchPatterns['default'][] = '!\\.(All)?Recent(Changes|Uploads)$!'; + $SearchPatterns['default'][] = '!\\.Group(Print)?Header$!'; + $SearchPatterns['default'][] = '!\\.Présentation$!'; + $SearchPatterns['default'][] = '!\\.Menu$!'; + $SearchPatterns['default'][] = '!\\.Index!'; + + $SearchPatterns['tousgroupes'] = $SearchPatterns['default']; + + $SearchPatterns['default'][] = '!^PmWiki\\.!'; # Exclusion groupe PmWiki + $SearchPatterns['default'][] = '!^Main\\.!'; + + ## Le groupe PmWiki est exclu des recherches et des listes de pages + ## car la traduction en Français est complète mais il est toujours + ## possible d'accéder aux pages de ce groupe directement. + ## Pour permettre la recherche dans tous les groupes, on peut voir + ## ci-dessus que le tableau 'tousgroupes' a été créé. + ## On peut alors faire des recherches ou listes comme suit: + ## (:pagelist group=PmWiki list=tousgroupes:) + ## ou en ajoutant dans le texte d'une recherche 'list=tousgroupes' + + ## Exclusions complémentaire pour un Index des pages de + ## *documentation* du Wiki + $SearchPatterns['dict'] = $SearchPatterns['default']; + $SearchPatterns['dict'][] = '!^PmWikiFr\\.!'; # Exclusion groupe PmWikiFr + + ##-- Modules --------------------------------------------------- + + #-- Si le module RefCount est chargé -------------------------- + $PageRefCountFmt = "

Références croisées

"; # Titre + $RefCountTimeFmt = "%d-%b-%Y %H:%M"; # Format date + + ##-- Chanes pour le rapport par courrier - Pour les Administrateurs + $MailPostsMessage = "Modifications récentes du wiki:\n + ($ScriptUrl/$DefaultGroup/ToutesLesModifs)\n\n\$MailPostsList\n"; + $MailPostsSubject = "$WikiTitle : modifications récentes du wiki"; + #$MailPostsTimeFmt = $TimeFmt; + $MailPostsItemFmt = ' * $FullName . . . $PostTime par $Author'; + + ##-- Si le module approveurl est chargé ------------------------- + $ApprovedUrlPagesFmt = array('$DefaultGroup.LiensApprouvés'); + + ##-- Documentation --------------------------------------------- + + ## Liste des pages où sont définies les variables + ## (pour l'établissement de liens automatiques) + $VarPagesFmt = array('PmWikiFr.Variables','PmWikiFr.VariablesDeBase', + 'PmWikiFr.VariablesDeMiseEnPage','PmWikiFr.VariablesDeLiens', + 'PmWikiFr.VariablesDdition','PmWikiFr.VariablesDeTéléchargement', + 'PmWikiFr.AutresVariables','PmWikiFr.EnvoiDeCourriel'); +?> diff --git a/install/local/farmmap.txt b/install/local/farmmap.txt new file mode 100644 index 0000000..d7b9c4c --- /dev/null +++ b/install/local/farmmap.txt @@ -0,0 +1 @@ +MainWiki http://wikifarm.m4x.org/ diff --git a/install/Site.AuthForm b/install/wikilib.d/Site.AuthForm similarity index 100% rename from install/Site.AuthForm rename to install/wikilib.d/Site.AuthForm diff --git a/install/Site.PageActions b/install/wikilib.d/Site.PageActions similarity index 100% rename from install/Site.PageActions rename to install/wikilib.d/Site.PageActions diff --git a/install/Site.PageFootMenu b/install/wikilib.d/Site.PageFootMenu similarity index 100% rename from install/Site.PageFootMenu rename to install/wikilib.d/Site.PageFootMenu -- 2.1.4