====== Modifications (hacks) apportées à DokuWiki ====== ===== Swisslinux.org's templates ===== lib/tpl/swisslinux/ |-> * (modified file from the default dokuwiki's template) inc/ |-> template.php ===== RSS feed ===== Commented : (to remove Dokuwiki's rss feed which are already added by our own template)\ /* $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml', 'title'=>'Recent Changes', 'href'=>DOKU_BASE.'feed.php'); $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml', 'title'=>'Current Namespace', 'href'=>DOKU_BASE.'feed.php?mode=list&ns='.$INFO['namespace']);*/ ===== Configuration ===== conf/ |-> local.php **Modified** conf/ |-> interwiki.conf as following 10c10,11 < wp http://en.wikipedia.org/wiki/ --- > wp http://fr.wikipedia.org/wiki/ > wpen http://en.wikipedia.org/wiki/ It permits compatibility for all entries preceding the change (all ''wp>'' stay valid) and allows to link **to** the english version (with ''wpen>'') ** Added ** conf/ |-> interwiki.local.conf Which contains some new interwiki links, to bugtrackers... (Could maybe be done for the both above too...) and to Swisslinux stuff : # Common FLOSS Bugtrackers bugs.debian http://bugs.debian.org/ bugs.kde http://bugs.kde.org/show_bug.cgi?id= sl.f http://forum.swisslinux.org/viewtopic.php?id= sl.p http://press.swisslinux.org/ === Symbolic links === lib/images/interwiki |-> bugs.debian.gif TO bug.gif |-> bugs.kde.gif TO bug.gif |-> wpen.gif TO wp.gif |-> wpfr.gif TO wp.gif |-> sl.f.png TO /home/g-swisslinux/www/static.swisslinux.org/images/favicon.png |-> sl.p.png TO /home/g-swisslinux/www/static.swisslinux.org/images/favicon.png This allows stuff like (take a look on source for ideas...): [[sl.p>4-ubuntu-millesime-2007|Ubuntu, millésime 2007 ?]] and [[sl.f>1645|Participez aux projets de Swisslinux.org !]] ===== Language files ===== To reduce the length of the menu entries we modified : inc/lang/fr_sl/ (fr_swisslinux) |-> lang.php (sl translation for shorter menu links) inc/lang/it/ |-> lang.php inc/lang/de/ |-> lang.php ===== Language switcher ==== In inc/init.php line 48 : /** Swisslinux.org language switcher **/ require_once('/home/g-swisslinux/www/static.swisslinux.org/inc/templates/default/sl_l10n_getlang.inc.php'); $conf['lang'] = sl_getlang(); //load the language files [...] ===== CSS ===== To get a monospace font in code box, we modified lib/style/styles.css by adding : .code { font-family: "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; } ===== Plugins ===== lib/plugins/note/ |-> style.css (remove not valid proprietary css style) lib/plugins/discussion/ |-> action.php (reuse of punbb avatars) |-> style.css (changed __background_alt__ for __background__) lib/plugins/discussion/conf |-> default.php (toogled ccoment (?)) Voici le bout de code (censuré) ajouté au fichier action.php pour utiliser les avatars de punbb : $title = ($user ? $user : obfuscate($mail)); // $user and not $name (...) // use punbb avatar image $connect=mysql_connect("localhost", "xx", "xx") or die(mysql_error()); mysql_select_db("xx") or die(mysql_error()); $mysql_result = mysql_query("SELECT id FROM xx WHERE username='".$user."' ;") ; //get punbb user id $punbb = mysql_fetch_array ($mysql_result); $src = "http://forum.swisslinux.org/img/avatars/".$punbb[id].".png"; (...) echo ''.$user.'' // $user and not $name ===== Languages note ===== To get a new "note" in the note plugin : syntax.php line 46 added : 'notelang' => array('langues','sprachen','languages','lingue') style.css added .notelang { border: 1px solid #b89b1a; background-color: #e9ddaf; background-image: url(images/lang.png); } ===== Symlinks created ===== ./ |-> inc_sl --> static.swisslinux.org/inc/ |-> images --> static.swisslinux.org/images/ |-> css --> static.swisslinux.org/css/