From f7ca53e1a41a81555b2b38cdff0d7f4f29c67e6d Mon Sep 17 00:00:00 2001 From: Mister WEB Date: Sat, 3 May 2008 19:00:47 +0200 Subject: [PATCH 1/1] Commit initial de l'existant --- Makefile | 0 README-xorg | 32 ++++++++++++++++++++++ install/NomDuWiki/.htaccess | 8 ++++++ install/NomDuWiki/index.php | 1 + install/NomDuWiki/local/.htaccess | 3 +++ install/NomDuWiki/local/config.php | 5 ++++ install/Site.AuthForm | 19 ++++++++++++++ install/Site.PageActions | 16 +++++++++++ install/Site.PageFootMenu | 25 ++++++++++++++++++ install/newfield.sh | 54 ++++++++++++++++++++++++++++++++++++++ 10 files changed, 163 insertions(+) create mode 100644 Makefile create mode 100644 README-xorg create mode 100644 install/NomDuWiki/.htaccess create mode 100644 install/NomDuWiki/index.php create mode 100644 install/NomDuWiki/local/.htaccess create mode 100644 install/NomDuWiki/local/config.php create mode 100644 install/Site.AuthForm create mode 100644 install/Site.PageActions create mode 100644 install/Site.PageFootMenu create mode 100755 install/newfield.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/README-xorg b/README-xorg new file mode 100644 index 0000000..88be53f --- /dev/null +++ b/README-xorg @@ -0,0 +1,32 @@ +./wikifarm/pmwiki/ => code de pmwiki + ajouts wikifarm +./wikifarm//local/ => conf +./wikifarm//uploads/ => fichiers +./wikifarm//wiki.d/ => pages +./wikifarm/install => fichiers à installer dans ./wikifarm/pmwiki/ + +cd /home/web/wikifarm + +wget http://pmwiki.org/pub/pmwiki/pmwiki-latest.tgz +untar +mv pmwiki-????? => pmwiki + +wget http://pmwiki.org/pub/pmwiki/i18n/i18n-fr.zip +(cd pmwiki && unzip ../i18n-fr.zip) + +wget http://www.pmwiki.org/pmwiki/uploads/Cookbook/gemini.zip +(cd pmwiki/pub/skins/ && unzip ../../../gemini.zip) + +wget http://www.pmwiki.org/pmwiki/uploads/Cookbook/triad.zip +(cd pmwiki/pub/skins/ && unzip ../../../triad.zip) + +wget http://www.pmwiki.org/pmwiki/uploads/Cookbook/monobook.zip +(cd pmwiki/pub/skins/ && unzip ../../../monobook.zip) + +chown -R web:web . +chmod -R go-w . +chmod g+ws */wiki.d */uploads + +cp farmconfig.php farmmap.txt => pmwiki/local +cp -r cookbook (sans tests.php) => main/ +cp install/Site.* pmwiki/wikilib.d/ + diff --git a/install/NomDuWiki/.htaccess b/install/NomDuWiki/.htaccess new file mode 100644 index 0000000..bf4f402 --- /dev/null +++ b/install/NomDuWiki/.htaccess @@ -0,0 +1,8 @@ +RewriteEngine On +RewriteBase /~NomDuWiki/ +RewriteRule ^$ index.php [L] +RewriteRule ^index.php$ index.php [L] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule (.*) index.php?n=$1 [QSA,L] + diff --git a/install/NomDuWiki/index.php b/install/NomDuWiki/index.php new file mode 100644 index 0000000..7b72b2c --- /dev/null +++ b/install/NomDuWiki/index.php @@ -0,0 +1 @@ + diff --git a/install/Site.AuthForm b/install/Site.AuthForm new file mode 100644 index 0000000..7074801 --- /dev/null +++ b/install/Site.AuthForm @@ -0,0 +1,19 @@ +version=pmwiki-2.1.27 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 +author=pascal.corpet.2001 | Pascal CORPET +csum= +host=82.229.193.37 +name=Site.AuthForm +rev=4 +targets= +text=Vous n'avez pas les droits nécessaires.%0a%0a(:if !connected:)%0a(:input form {$FullName}:)%0a(:input submit value='Se Connecter':)%0a(:input hidden name=action value='connect':)%0a(:input hidden name=oldaction value='{$action}':)%0a(:input end:)%0a(:if:) +time=1173544662 +author:1173544662=pascal.corpet.2001 | Pascal CORPET +diff:1173544662:1173544492:=4c4%0a%3c (:input form {$Name}:)%0a---%0a> (:input form {$FullName}:)%0a +host:1173544662=82.229.193.37 +author:1173544492=pascal.corpet.2001 | Pascal CORPET +diff:1173544492:1173312625:=4c4%0a%3c (:input form {$FullName}:)%0a---%0a> (:input form:)%0a +host:1173544492=82.229.193.37 +author:1173312625=pascal.corpet.2001 | Pascal CORPET +diff:1173312625:1173311978:=1,9c1%0a%3c Vous n'avez pas les droits nécessaires.%0a%3c %0a%3c (:if !connected:)%0a%3c (:input form:)%0a%3c (:input submit value='Se Connecter':)%0a%3c (:input hidden name=action value='connect':)%0a%3c (:input hidden name=oldaction value='{$action}':)%0a%3c (:input end:)%0a%3c (:if:)%0a\ No newline at end of file%0a---%0a> Vous n'avez pas les droits nécessaires. %3cform action="" style="padding:5px">%3cinput type="submit" value="Se connecter"/>%3cinput type="hidden" value="connect" name="action"/>%3cinput type="hidden" name="oldaction" value=""/>%3c/form>%0a\ No newline at end of file%0a +host:1173312625=82.229.193.37 diff --git a/install/Site.PageActions b/install/Site.PageActions new file mode 100644 index 0000000..ca2ec6e --- /dev/null +++ b/install/Site.PageActions @@ -0,0 +1,16 @@ +version=pmwiki-2.1.27 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 +author=pascal.corpet.2001 | Pascal CORPET +csum= +host=82.229.193.37 +name=Site.PageActions +rev=25 +targets=Site.PageActions,Site.GroupAttributes,Site.Admin +text=* %25item class=browse accesskey='$[ak_view]'%25[[{$FullName} | $[View] ]]%0a(:if auth edit:)%0a* %25item rel=nofollow class=edit accesskey='$[ak_edit]'%25 [[{*$Name}?action=edit | $[Edit] ]]%0a(:ifend:)%0a(:if !authid:)%0a*[[{*$Name}?action=connect | $[Connecter] ]]%0a(:ifend:)%0a* %25item rel=nofollow class=diff accesskey='$[ak_history]'%25[[{*$Name}?action=diff | $[History] ]]%0a*%25newwin%25[[{*$Name}?action=source | $[Source] ]]%0a(:if auth upload:)%0a* %25item rel=nofollow class=upload accesskey='$[ak_attach]'%25[[{$FullName}?action=upload | $[Attach] ]]%0a(:if:)%0a(:if auth admin:)%0a* [[{*$Name}?action=attr| $[Attributes] ]]%0a* [[{*$Group}.GroupAttributes?action=admin | $[Group Attributes] ]]%0a* [[Site.Admin?action=admin | Admin]]%0a(:ifend:) +time=1174123478 +author:1174123478=pascal.corpet.2001 | Pascal CORPET +diff:1174123478:1172795241:=3,11c3%0a%3c * %25item rel=nofollow class=edit accesskey='$[ak_edit]'%25 [[{*$Name}?action=edit | $[Edit] ]]%0a%3c (:ifend:)%0a%3c (:if !authid:)%0a%3c *[[{*$Name}?action=connect | $[Connecter] ]]%0a%3c (:ifend:)%0a%3c * %25item rel=nofollow class=diff accesskey='$[ak_history]'%25[[{*$Name}?action=diff | $[History] ]]%0a%3c *%25newwin%25[[{*$Name}?action=source | $[Source] ]]%0a%3c (:if auth upload:)%0a%3c * %25item rel=nofollow class=upload accesskey='$[ak_attach]'%25[[{$FullName}?action=upload | $[Attach] ]]%0a---%0a> * %25item rel=nofollow class=edit accesskey='$[ak_edit]'%25[[{$FullName}?action=edit | $[Edit] ]]%0a13,17c5,9%0a%3c (:if auth admin:)%0a%3c * [[{*$Name}?action=attr| $[Attributes] ]]%0a%3c * [[{*$Group}.GroupAttributes?action=admin | $[Group Attributes] ]]%0a%3c * [[Site.Admin?action=admin | Admin]]%0a%3c (:ifend:)%0a\ No newline at end of file%0a---%0a> * %25item rel=nofollow class=diff accesskey='$[ak_history]'%25[[{$FullName}?action=diff | $[History] ]]%0a> (:if auth upload:)%0a> * %25item rel=nofollow class=upload accesskey='$[ak_attach]'%25[[{$FullName}?action=upload | $[Attach] ]]%0a> (:if:)%0a> * %25item rel=nofollow class=print accesskey='$[ak_print]'%25[[{$FullName}?action=print | $[Print] ]]%0a\ No newline at end of file%0a +host:1174123478=82.229.193.37 +author:1172795241= +diff:1172795241:1142198002:=2d1%0a%3c (:if auth edit:)%0a4d2%0a%3c (:if:)%0a +host:1172795241=82.229.193.37 diff --git a/install/Site.PageFootMenu b/install/Site.PageFootMenu new file mode 100644 index 0000000..5f8736d --- /dev/null +++ b/install/Site.PageFootMenu @@ -0,0 +1,25 @@ +version=pmwiki-2.1.27 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 +author=pascal.corpet.2001 | Pascal CORPET +csum= +host=82.229.193.37 +name=Site.PageFootMenu +rev=10 +targets=Site.PageFootMenu,Site.GroupAttributes,Site.Admin +text=* %25item class=browse accesskey='$[ak_view]'%25[[{$FullName} | $[View] ]]%0a(:if auth edit:)%0a* %25item rel=nofollow class=edit accesskey='$[ak_edit]'%25 [[{*$Name}?action=edit | $[Edit] ]]%0a(:ifend:)%0a(:if !authid:)%0a*[[{*$Name}?action=connect | $[Connecter] ]]%0a(:ifend:)%0a* %25item rel=nofollow class=diff accesskey='$[ak_history]'%25[[{*$Name}?action=diff | $[History] ]]%0a*%25newwin%25[[{*$Name}?action=source | $[Source] ]]%0a(:if auth upload:)%0a* %25item rel=nofollow class=upload accesskey='$[ak_attach]'%25[[{$FullName}?action=upload | $[Attach] ]]%0a(:if:)%0a(:if auth admin:)%0a* [[{*$Name}?action=attr| $[Attributes] ]]%0a* [[{*$Group}.GroupAttributes?action=admin | $[Group Attributes] ]]%0a* [[Site.Admin?action=admin | Admin]]%0a(:ifend:)%0a[[%3c%3c]]%0a->''Dernière modification le {*$LastModified}'' +time=1174140767 +author:1174140767=pascal.corpet.2001 | Pascal CORPET +diff:1174140767:1172781227:=1d0%0a%3c * %25item class=browse accesskey='$[ak_view]'%25[[{$FullName} | $[View] ]]%0a3c2%0a%3c * %25item rel=nofollow class=edit accesskey='$[ak_edit]'%25 [[{*$Name}?action=edit | $[Edit] ]]%0a---%0a> *[[{*$Name}?action=edit | $[Edit] ]]%0a8c7%0a%3c * %25item rel=nofollow class=diff accesskey='$[ak_history]'%25[[{*$Name}?action=diff | $[History] ]]%0a---%0a> *[[{*$Name}?action=diff | $[History] ]]%0a10,12c9,11%0a%3c (:if auth upload:)%0a%3c * %25item rel=nofollow class=upload accesskey='$[ak_attach]'%25[[{$FullName}?action=upload | $[Attach] ]]%0a%3c (:if:)%0a---%0a> *[[{*$Name}?action=upload | $[Attach File] ]]%0a> * [[Site.Search?q=link={*$FullName} | $[Backlinks] ]]%0a> *[[Site.Search?q={*$Group}/ | $[List Group] ]]%0a14,16c13,14%0a%3c * [[{*$Name}?action=attr| $[Attributes] ]]%0a%3c * [[{*$Group}.GroupAttributes?action=admin | $[Group Attributes] ]]%0a%3c * [[Site.Admin?action=admin | Admin]]%0a---%0a> *[[{*$Name}?action=attr| $[Attributes] ]]%0a> *[[{*$Group}.GroupAttributes| $[Group Attributes] ]]%0a +host:1174140767=82.229.193.37 +author:1172781227= +diff:1172781227:1172781127:=4c4%0a%3c (:if !authid:)%0a---%0a> (:if !auth edit:)%0a +host:1172781227=82.229.193.37 +author:1172781127= +diff:1172781127:1172781108:=17c17%0a%3c ->''Dernière modification le {*$LastModified}''%0a\ No newline at end of file%0a---%0a> ->''$[Page last modified on] {*$LastModified}''%0a\ No newline at end of file%0a +host:1172781127=82.229.193.37 +author:1172781108= +diff:1172781108:1172780715:=4,6d3%0a%3c (:if !auth edit:)%0a%3c *[[{*$Name}?action=connect | $[Connecter] ]]%0a%3c (:ifend:)%0a +host:1172781108=82.229.193.37 +author:1172780715= +diff:1172780715:1115303640:=1d0%0a%3c (:if auth edit:)%0a3d1%0a%3c (:ifend:)%0a +host:1172780715=82.229.193.37 diff --git a/install/newfield.sh b/install/newfield.sh new file mode 100755 index 0000000..9c0d308 --- /dev/null +++ b/install/newfield.sh @@ -0,0 +1,54 @@ +#! /bin/sh +FarmDir=/home/web/wikifarm/ +InstallDir=/home/web/wikifarm/install/ +DefaultUrl=http://wikifarm.m4x.org/ + +# Nom du wiki en paramètre ou en read +if [ $# -lt 1 ]; then + echo "Nom du nouveau champs wiki (doit pouvoir être un nom de dossier) :" + read NomDuWiki +else + NomDuWiki=$1 +fi + +FieldDir=${FarmDir}${NomDuWiki} + +# Vérification de l'existance du champs +if [ -d $FieldDir ]; then + echo "Ce champs existe déjà." + exit +fi + +#Récupération de l'url +echo "Url du wiki ($DefaultUrl~$NomDuWiki/):" +read FieldUrl +if [ -z "$FieldUrl" ]; then + FieldUrl=$DefaultUrl~$NomDuWiki + FieldUrlFolder=/~$NomDuWiki/ +else + if [ "$FieldUrl" = "ok" ]; then + echo "url invalide ok" + exit + fi + if [ $(echo $FieldUrl | sed -e "s,^http://[^/]*/.*$,ok,") != "ok" ]; then + echo "url invalide" + exit + fi + # suprression du / final dans l'url + FieldUrl=$(echo $FieldUrl | sed -e "s,/$,,") + FieldUrlFolder=$(echo $FieldUrl | sed -e "s,^http://[^/]*\(/.*\)$,\\1/,") +fi + +echo "Création du champs wiki $NomDuWiki" +echo " dossier : $FieldDir" +echo " url : $FieldUrl" +echo " url relatif : $FieldUrlFolder" +#copie des fichiers +cp -Ra ${InstallDir}NomDuWiki $FieldDir +#application des dossiers et url spécifiques au champs +sed -e "s,^RewriteBase .*$,RewriteBase $FieldUrlFolder," ${InstallDir}NomDuWiki/.htaccess > $FieldDir/.htaccess +sed -e "s,^.*ScriptUrl.*$, \$ScriptUrl = '$FieldUrl';," ${InstallDir}NomDuWiki/local/config.php > ${FieldDir}/local/config.php +#création des dossiers et fichiers attribués à l'utilisateur www-data +#wget --quiet ${FieldUrl}/Site/Admin?createconf=1 -O /dev/null +#wget --quiet ${FieldUrl}/Site/Admin?createconf=1 -O /dev/null + -- 2.1.4