Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:dokuwiki_tips

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
becki:linux:dokuwiki_tips [2013-02-26 16:48]
becki
becki:linux:dokuwiki_tips [2016-04-04 12:33] (aktuell)
becki
Zeile 1: Zeile 1:
 ====== Dokuwiki Tips == ====== Dokuwiki Tips ==
- 
-This pages replaces [[becki:​my:​linux:​beckisownwiki]] 
- 
 ===== Updating Dokuwiki == ===== Updating Dokuwiki ==
  
-This manual presumes that you saved a copy of the //original// config files with the extension ''​.org'' ​//before// you made any changes!+<note important>​Consider ​the [[https://www.dokuwiki.org/install:​upgrade|recommended]] approach which overwrites the old installation instead of the manual here!</note>
  
-  * Download and extract newest Dokuwiki version on the server +This manual presumes that you saved a copy of the //​original//​ config files with the extension ''​.sborg''​ //before// you made any changes! 
-  ​Locate all files with the extension ''​.dist''​ (eg ''​conf/​local.php.dist''​) in the new dokuwiki installation and copy their counterparts without the ''​.dist''​ extension (eg ''​conf/​local.php''​) to the new dokuwiki installation + 
-  ​Copy additional Interwiki Shortcut images to ''​lib/​images/​interwiki''​ +  - Download and extract newest Dokuwiki version on the server. Use Stable (direct link, not customized) from http://​download.dokuwiki.org 
-  ​Copy additional smiley images to ''​lib/​images/​smileys''​ +  ​Locate all files with the extension ''​.dist''​ (eg ''​conf/​local.php.dist''​) in the new dokuwiki installation and copy their counterparts without the ''​.dist''​ extension (eg ''​conf/​local.php''​) to the new dokuwiki installation.\\ Note that it might be necessary to treat ''​.htaccess''​ manually! 
-  ​chmod a-rwx install.php +  ​Copy additional Interwiki Shortcut images to ''​lib/​images/​interwiki''​ 
-  ​Set owner and group of ''​newDokuwiki/''​ recursively to ''​root:​root''​ +  ​Copy additional smiley images to ''​lib/​images/​smileys''​ 
-  ​Set owner and group of ''​newDokuwiki/​conf'',​ ''​newDokuwiki/​data''​ and ''​newDokuwiki/​lib''​ recursively to the ID of your webserver eg. ''​apache:​apache''​ +  ​- ''​chmod a-rwx install.php''​. Do not run it! 
-  ​delete unnecessary language translations with ''​bin/​striplangs.php''​ +  ​Set owner and group of ''​newDokuwiki/''​ recursively to ''​root:​root''​ 
-  ​Download and install fresh revisions of previously installed additional plugins from the web +  ​Set owner and group of ''​newDokuwiki/​conf'',​ ''​newDokuwiki/​data''​ and ''​newDokuwiki/​lib''​ recursively to the ID of your webserver eg. ''​apache:​apache''​. [[doku>​install:​permissions|Optionally finetune permissinons]] 
-  ​copy data: <code bash>+  ​delete unnecessary language translations with ''​bin/​striplangs.php''​ 
 +  ​Download and install fresh revisions of previously installed additional plugins from the web 
 +  ​- Make a list of all files with the extension ''​.sborg''​ (eg. ''​old/​conf/​acronyms.conf.sborg''​) in the //old// dokuwiki installation. Then go to the //new// dokuwiki installation and copy the corresponding original files to <​file>​.sborg (eg. ''​cp new/​conf/​acronyms.conf new/​conf/​acronyms.conf.sborg''​)  
 +  - In the //new// dokuwiki installation [[diffupgrade|patch]] <​file>​ with the modifications:​ ''​merge <​file>​ old/<​file>​.sborg old/<​file>''​. Do this for all files on the list where the old changes are still really necessary for the new wiki version. 
 +  - copy data: <code bash>
 cp -a oldDokuwiki/​data/​attic/​* newDokuwiki/​data/​attic cp -a oldDokuwiki/​data/​attic/​* newDokuwiki/​data/​attic
 cp -a oldDokuwiki/​data/​pages/​* newDokuwiki/​data/​pages cp -a oldDokuwiki/​data/​pages/​* newDokuwiki/​data/​pages
Zeile 22: Zeile 23:
 cp -a oldDokuwiki/​data/​meta/​* ​ newDokuwiki/​data/​meta cp -a oldDokuwiki/​data/​meta/​* ​ newDokuwiki/​data/​meta
 </​code>​ </​code>​
-  ​* Make a list of all files with the extension ​''​.sborg'' ​(eg. ''​old/​conf/​acronyms.conf.sborg''​) in the //old// dokuwiki installation. Then go to the //new// dokuwiki installation ​and copy the corresponding original files to <​file>​.org (eg. ''​cp new/​conf/​acronyms.conf new/​conf/​acronyms.conf.org''​)  +  ​- Restore the content ​of the namespaces ​''​wiki''​ and ''​playground'' ​from the newDokuwiki 
-  * In the //new// dokuwiki installation [[diffupgrade|patch]] <​file>​ with the modifications:​ ''​merge <​file>​ old/<​file>​.org old/<​file>''​. Do this for all files on the list where the old changes are still really necessary for the new wiki version. +  ​Update index with ''​bin/​indexer.php''​. See [[doku>​cli#​indexerphp]] 
-  ​Update index with ''​bin/​indexer.php''​. See [[doku>​cli#​indexerphp]]+ 
 +Note: After update to 2014-09-29d "​Hrun"​ the toolbar icons were missing in the edit page. Try: 
 +  - [[doku>​faq:​toolbar]] 
 +  - Admin -> Configuration Settings -> cssdatauri from 0 to 500.
  
 See also [[diffupgrade]] & http://​www.dokuwiki.org/​install:​diffupgrade See also [[diffupgrade]] & http://​www.dokuwiki.org/​install:​diffupgrade
  
-FIXME Move content from [[becki:​my:​linux:​beckisownwiki]] to here!+===== Add an Interwiki Shortcut ==
  
-===== Updating Dokuwiki with git ==+  - Add URL in ''​dokuwiki/​conf/​interwiki.conf''​ 
 +  - Add the interwiki icon at ''​dokuwiki/​lib/​images/​interwiki''​. Possible formats: .gif and .png, but not .ico (Tested with version 2007-06-26b) 
 +  - Delete the cache: ''​rm -rf dokuwiki/​data/​cache/​*''​ 
 +  - Reload the page in browser 
 + 
 +See also http://​www.dokuwiki.org/​interwiki 
 + 
 +===== Enable Linebreaks == 
 + 
 +Install [[doku>​plugin:​xbr]] plugin and set ''​renderer_xhtml''​ to ''​xbr''​ in Configuration Settings 
 + 
 +===== URL Rewriting == 
 + 
 +Uncomment 
 +  LoadModule rewrite_module lib/​httpd/​modules/​mod_rewrite.so 
 +in ''/​etc/​apache/​httpd.conf''​ 
 + 
 +Make sure that .htaccess file is respected with 
 +<code apache>​ 
 +<​Directory /​path/​to/​dokuwiki>​ 
 +  AllowOverride All 
 +</​Directory>​ 
 +</​code>​ 
 +or 
 +<code apache>​ 
 +<​Directory /​var/​www/​htdocs>​ 
 +  AllowOverride All 
 +</​Directory>​ 
 +</​code>​ 
 +in ''/​etc/​apache/​httpd.conf''​ 
 + 
 +Uncomment everything beginning with ''#​Rewrite...''​ in ''/​var/​www/​htdocs/​dokuwiki/​.htaccess'',​ but **not** the line ''#​RewriteBase /​dokuwiki''​. 
 + 
 +Enable rewriting in admin config menu by setting it to type 1 
 + 
 +See also: [[doku>​wiki:​rewrite]] 
 + 
 +===== How the Search Index works == 
 + 
 +This section is just informative for interested people. Indexing works automatically,​ no configuration has to be done. 
 + 
 +The search index is saved in ''​dokuwiki/​data/​index/''​. 
 + 
 +  * The file ''​page.idx''​ lists the filenames of all indexed files. One file per line. 
 +  * w<​len>​.idx lists all occurring words with a length of <​len>​. One word per line. Eg. ''​w14.idx''​ lists all words with a length of 14 caracters. 
 +  * i<​len>​.idx lists how often all words of <len> characters occur in which pages. Pages are addressed by their line number in ''​page.idx'',​ counting starts with 0. One word per line. The line number of the entrys in i<​len>​.idx corresponds to the line number in w<​len>​.idx,​ i.e. the entry in line 9 in i<​len>​.idx refers to the word in line 9 in w<​len>​.idx. 
 +  * ''​pageword.idx''​ lists where to find all occurring words of the wiki in the  w<​len>​.idx files for every page. One page per line. The line number corresponds to the line number in ''​page.idx''​. FIXME What is this file used for? 
 + 
 +Example: 
 + 
 +  * ''​w14.idx''​ contains the word ''​developerworks''​ in line 9 
 +  * ''​i14.idx''​ contains the line ''​2*1:​5*2:​9*1''​ in line 9. This means the page #2 has 1 occurrence of the word ''​developerworks'',​ page #5 has 2 and  page #9 hast 1. 
 +  * ''​page.idx''​ contains the word ''​pending''​ in line 5, this is the filename of page #5. Hence the page with the filename ''​pending''​ has 2 occurrences of the word ''​developerworks''​. 
 + 
 +===== Attic == 
 +==== Updating Dokuwiki with git ==
  
 <note warning>​This is still experimental!</​note>​ <note warning>​This is still experimental!</​note>​
Zeile 62: Zeile 121:
 You could also directly work on branch ''​stable''​ instead of creating ''​mysettings''​. But this seems not to be idiomatic git usage. You could also directly work on branch ''​stable''​ instead of creating ''​mysettings''​. But this seems not to be idiomatic git usage.
  
-===== Add an Interwiki Shortcut ​==+==== monospaced in blue ==
  
-  - Add URL in ''​dokuwiki/conf/interwiki.conf''​ +lib/tpl/default/design.css --- 2007-01-06 17:16
-  - Add the interwiki icon at ''​dokuwiki/lib/​images/​interwiki''​Possible formats: .gif and .png, but not .ico (Tested with version 2007-06-26b) +
-  ​Delete the cache: ''​rm ​-rf dokuwiki/​data/​cache/​*''​ +
-  ​Reload the page in browser+
  
-See also http://www.dokuwiki.org/interwiki+diff design.css.org design.css 
 +<​code>​ 
 +465a466 
 +>   ​color:​ darkblue; 
 +</code>
  
-===== Linebreak Plugin ​==+==== Update Manual ​==
  
-FIXME Still necessary?+Infos from [[doku>​wiki:​install:​upgrade]]
  
-Just install the [[doku>​plugin:linebreak|linebreak plugin]]No additional config is necessary.+General Update strategy 
 +  * Install new version near old 
 +  * Take over modifikations:​  
 +    * If old configfile.dist == new configfile.dist just copy configfile 
 +    * If old configfile.dist != new configfile.dist get differencs between old configfile.dist and old configfile with ''​diff -u configfile.diff configfile > diffs'';​ cp new configfile.dist to configfile; patch new configfile with ''​patch configfile diffs''​ 
 +  * Take over data
  
-===== URL Rewriting ==+Update in detail:  
 +  * Make a backup of whole dokuwiki dir eg. with admin tool from provider  
 +  * Optional: Remove unnecessary data: 
 +    * ''​~/​www/​dokuwiki/​data > rm -r attic/​*''​ 
 +    * ''​~/​www/​dokuwiki/​data > rm -r cache/​*''​ 
 +    * ''​~/​www/​dokuwiki/​data > rm -r meta/​*''​ :?: be careful with comment plugin :?: 
 +    * ''​~/​www/​dokuwiki/​data > rm changes.log ; touch changes.log''​ 
 +  * Download from http://​www.splitbrain.org/​projects/​dokuwiki on the server with wget and unpack it 
 +  * Delete all dirs but en/ es/ & de/ in inc/lang 
 +  * Take over config files in dokuwiki/​conf 
 +    * cp acl.auth.php from old to new 
 +    * cp local.php from old to new 
 +    * patch diffs form old smilies.conf.org and old smilies.conf to new smilies.conf 
 +    * cp icon_ok.png & icon_no.png in lib/​smilies 
 +    * Enable rewriting by editing dokuwiki/​.htacces file, see below 
 +  * Take over data: mv pages/* and media/* 
 +  * ''​mv dokuwiki/ dokuwiki.old''​ 
 +  * ''​mv dokuwiki-<​version>​ dokuwiki''​ 
 +  * Check access permissions :!: 
 +  * delete tgz file 
 +  * copy plugins: 
 +    * ~/www > cp -a dokuwiki.old/​lib/​plugins/​linebreak/​ dokuwiki/​lib/​plugins/​ 
 +  * patch ''​lib/​tpl/​default/​print.css''​ and ''​lib/​tpl/​default/​design.css''​
  
-Uncomment +==== Update Log ==
-  LoadModule rewrite_module lib/​httpd/​modules/​mod_rewrite.so +
-in ''/​etc/​apache/​httpd.conf''​+
  
-Make sure that .htaccess file is respected with +  * 2006-04-24(?​) --- Update ​to 2006-03-09 
-<code apache>​ +  ​* 2007-01-26 --- Update to 2006-11-06
-<​Directory /path/to/​dokuwiki>​ +
-  ​AllowOverride All +
-</​Directory>​ +
-</​code>​ +
-or +
-<code apache>​ +
-<​Directory /​var/​www/​htdocs>​ +
-  AllowOverride All +
-</​Directory>​ +
-</​code>​ +
-in ''/​etc/​apache/​httpd.conf''​+
  
-Uncomment everything beginning with ''#​Rewrite...''​ in ''/​var/​www/​htdocs/​dokuwiki/​.htaccess'',​ but **not** the line ''#​RewriteBase /​dokuwiki''​.+==== Config Log ==
  
-Enable rewriting in admin config menu by setting it to type 1+Always conserve the original file before any changes! Eg. ''​cp print.css print.css.org''​
  
-See also: [[doku>​wiki:​rewrite]]+=== Bash Syntax Highlighting ==
  
-===== monospaced in blue ==+Comments wasn't recognized as comments. Removed ''​inc/​geshi/​bash.php''​ of version 2006-11-06 with that of old version 2006-03-09 
 + 
 +=== URL Rewriting == 
 + 
 +Uncomment everithing beginning with ''#​Rewrite...''​ in ''​~/​www/​dokuwiki/​.htaccess''​. But **not** the line ''#​RewriteBase /​dokuwiki''​. See [[dokuwiki>​wiki:​rewrite]] 
 + 
 + 
 +=== Normal text left, not justified == 
 + 
 +lib/​tpl/​default/​print.css line 65 --- 2006-08-18 
 + 
 +diff print.css.org print.css 
 +<​code>​ 
 +65c65 
 +<   ​text-align:​ justify; 
 +--- 
 +>   ​text-align:​ left; 
 +</​code>​ 
 + 
 +=== monospaced in blue ==
  
 lib/​tpl/​default/​design.css --- 2007-01-06 17:16 lib/​tpl/​default/​design.css --- 2007-01-06 17:16
Zeile 113: Zeile 206:
 </​code>​ </​code>​
  
-===== How the Search Index works ==+==== To Do =====
  
-This section is just informative for interested peopleIndexing works automatically,​ no configuration has to be done.+  * Remove languanges from discussion plugin 
 +  * Install [[http://​www.wikidesign.ch/​en/​plugin/​discussion/​start|Discussion Plugin]] 
 +  * Read & do http://​wiki.splitbrain.org/​wiki:​security 
 +  * http://​wiki.splitbrain.org/​wiki:​tips:​hide-inaccessible-items-in-indexes
  
-The search index is saved in ''​dokuwiki/​data/​index/''​.+==== Old ====== 
 +=== Installation and Upgrade == 
 +== Installation ===== 
 +At date? version 2005-07-13 installed
  
-  * The file ''​page.idx''​ lists the filenames of all indexed files. One file per line. +== Upgrade to 2005-09-22 ===== 
-  * w<​len>​.idx lists all occurring words with a length of <​len>​. One word per line. Eg. ''​w14.idx''​ lists all words with a length of 14 caracters. +At 2005-09-29 20:53 
-  * i<len>.idx lists how often all words of <len> characters occur in which pages. Pages are addressed by their line number in ''​page.idx'',​ counting starts with 0. One word per line. The line number of the entrys in i<​len>​.idx corresponds to the line number in w<​len>​.idx,​ i.e. the entry in line 9 in i<​len>​.idx refers to the word in line 9 in w<​len>​.idx. +Infos from [[doku>wiki:install]] - upgrading
-  * ''​pageword.idx''​ lists where to find all occurring words of the wiki in the  w<len>.idx files for every page. One page per line. The line number corresponds to the line number in ''​page.idx''​. FIXME What is this file used for?+
  
-Example:+At the server: 
 +wget http://​www.splitbrain.org/​Programming/​PHP/​DokuWiki/​dokuwiki-2005-09-22.tgz 
 +tar -xzf dokuwiki-2005-09-22.tgz 
 +mv dokuwiki dokuwiki.2.bak 
 +mv dokuwiki-2005-09-22 dokuwiki 
 +dokuwiki/​data > touch changes.log 
 +cp -r dokuwiki.2.bak/​data/​pages/​* dokuwiki/​data/​pages/​ 
 +cp -r dokuwiki.2.bak/​data/​media/​* dokuwiki/​data/​media/​ 
 +%%dokuwiki.2.bak/​conf > cp -v acl.auth.php local.php users.auth.php ~/​www.think-deep.com/​dokuwiki/​conf/​%%
  
-  * ''​w14.idx'' ​contains the word ''​developerworks'' ​in line 9 +In inc/lang all dirs but en/ es/ & de/ deleted 
-  ​* ​''​i14.idx'' ​contains the line ''​2*1:5*2:9*1''​ in line 9. This means the page #2 has 1 occurrence of the word ''​developerworks''​, page #5 has 2 and  page #9 hast 1. + 
-  ​''​page.idx'' ​contains the word ''​pending'' ​in line 5, this is the filename of page #5. Hence the page with the filename ​''​pending'' ​has 2 occurrences of the word ''​developerworks''​.+=== Changes at the Sourcecode ====== 
 + 
 +== Enabling Line Breaks ===== 
 +FIXME This is not done yet! 
 + 
 + 
 +== inc/​parser/​handler.php ==== 
 +The following code in function process($calls) of class Doku_Handler_Block 
 +<code php> 
 +if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ​) { 
 +//... 
 +}else{ 
 +    //if this is just a single eol make a space from it 
 +    $this->​calls[] = array('cdata',​array("​ "), $call[2]);​ 
 +
 +</​code>​ 
 +replaced with: 
 +<code php> 
 +if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ​) { 
 +//... 
 +}else{ 
 +    $dobreak= true; // debugging 
 +    if ($dobreak && isset($calls[$key-1]) 
 +            && ($calls[$key-1][0] != 'eol') 
 +            &&​ ($calls[$key-1][0] != 'linebreak') ){ 
 +        $this->​calls[] = array('linebreak',array(), $call[2]);​ 
 +    } else { 
 +        $this->​calls[] = array('cdata',​array("​ "), $call[2]); 
 +    } 
 +
 +</​code>​ 
 +deduced from [[doku>​wiki:​discussion:​nonewline]] 
 + 
 + 
 +== inc/​lang/​en/​edit.txt ==== 
 +All Line breaks removed from that file because those breaks would also be displayed when edition a wiki page 
 + 
 + 
 +== lib/​tpl/​default/​design.css ==== 
 +In order to get line breaks also in indented areas: 
 +Source: http://​wiki.splitbrain.org/​wiki:​tips:​prewithwrap 
 +<code css> 
 +/code block by code tag */ 
 +pre.code { 
 +  /* ..*/ 
 +  /* becki added  sourcehttp://​wiki.splitbrain.org/​wiki:​tips:​prewithwrap */ 
 +  white-space:​ pre-wrap; ​      /* css-3 */ 
 +  white-space:​ -moz-pre-wrap; ​ /* Mozilla, since 1999 */ 
 +  white-space:​ -pre-wrap; ​     /* Opera 4-6 */ 
 +  white-space:​ -o-pre-wrap; ​   /* Opera 7 */ 
 +  word-wrap: break-word; ​      /* Internet Explorer ​5.5+ *
 +
 +</​code>​ 
 + 
 +=== Changes at Configuration Files ====== 
 + 
 +== .htaccess ==== 
 +Commented in for nice URL's: 
 +<​code>​ 
 +RewriteEngine on 
 +RewriteRule ^_media/(.*)              lib/​exe/​fetch.php?​media=$ ​[QSA,​L] 
 +RewriteRule ^_detail/​(.*) ​            ​lib/​exe/​detail.php?​media=$1 ​ [QSA,L] 
 +RewriteRule ^$                        doku.php ​ [L] 
 +RewriteCond %{REQUEST_FILENAME} ​      !-f 
 +RewriteCond %{REQUEST_FILENAME} ​      !-d 
 +RewriteRule (.*)                      doku.php?​id=$1 ​ [QSA,L] 
 +RewriteRule ^index.php$ ​              ​doku.php 
 +</​code>​ 
 + 
 +== conf/​local.php ==== 
 +<code php> 
 +$conf['title']       = '​Beckis Own Wiki'; ​ //what to show in the title 
 +$conf['useacl']      = 1;      //Use Access Control Lists to restrict access? 
 +$conf['openregister']= 1;      //Should users to be allowed to register? 
 +$conf['​autopasswd'​] ​ = 0;      //​autogenerate passwords and email them to user 
 +$conf['superuser']   ​= ​'admin'
 +$conf['htmlok']      = 1; 
 +</​code>​ 
 + 
 +2006-02-06 10:24 : 
 +<code php> 
 +$conf['dformat']     ​= ​'Y-m-d H:i'; //​dateformat accepted by PHPs date() function 
 +$conf['signature']   ​= ​' ​--- [[@MAIL@|@USER@]] @DATE@'; //signature see wiki:config for details 
 +</​code>​ 
 + 
 +2006-03-02 for nice URL's: 
 +<code php> 
 +$conf['userewrite'​] ​ = 1;  //this makes nice URLs: 0:off 1:.htaccess 2:​internal 
 +</​code>​ 
 + 
 +== conf/​interwiki.conf ==== 
 +Shortcut for Php manual: 
 +  # becki added 
 +  phpman ​   http://​de.php.net/​manual/​en/​{NAME}.php
  
 +== lib/​images/​interwiki/​ ====
 +Icon for shortcut for Php manual:
 +favicon from php.net fetched, converted to gif with convert & uploaded
becki/linux/dokuwiki_tips.1361897287.txt.gz · Zuletzt geändert: 2013-02-26 16:48 von becki

Impressum - Datenschutzerklärung