Benutzer-Werkzeuge

Webseiten-Werkzeuge


wikidoku

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

wikidoku [2017/10/11 22:53]
wikidoku [2020/09/19 22:03] (aktuell)
Zeile 1: Zeile 1:
 +====== Wiki Dokumentation ======
  
 +Allfällige hacks und spezielle Einstellungen werden hier (hoffentlich) Dokumentiert.
 +
 +===== plugin:translation =====
 +
 +==== Language selector ====
 +
 +=== Adding the selector to the theme ===
 +
 +The snippet from [[doku>plugin:translation]] was added to the ''dokuwiki'' theme.
 +
 +''///var/www/wiki/lib/tpl/dokuwiki/tpl_header.php//''
 +
 +<code php>
 +        <?php if ($conf['useacl']): ?>
 +            <div id="dokuwiki__usertools">
 +                <h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
 +                <ul>
 +                        <li>
 +                                <?php
 +                                        $translation = plugin_load('helper','translation');
 +                                        if ($translation) echo $translation->showTranslations();
 +                                ?>
 +                        </li>
 +                    <?php
 +                        if (!empty($_SERVER['REMOTE_USER'])) {
 +                            echo '<li class="user">';
 +                            tpl_userinfo(); /* 'Logged in as ...' */
 +                            echo '</li>';
 +                        }
 +                        tpl_toolsevent('usertools', array(
 +                            tpl_action('admin', true, 'li', true),
 +                            tpl_action('profile', true, 'li', true),
 +                            tpl_action('register', true, 'li', true),
 +                            tpl_action('login', true, 'li', true)
 +                        ));
 +                    ?>
 +                </ul>
 +            </div>
 +        <?php endif ?>
 +
 +</code>
 +
 +
 +
 +''style.css'' was changed so that the language selector nicely ligns up left of the ''login'' section.
 +
 +''///var/www/wiki/lib/plugins/translation/style.css//''
 +<code css>
 +.dokuwiki div.plugin_translation {
 +    float: right; 
 +    font-size: 95%;
 +    padding-right: 0.1em;
 +    margin : 0.0em 0 0.3em 0;
 +    text-align: right;
 +}
 +
 +</code>
 +
 +was chaged to:
 +
 +<code css>
 +.dokuwiki div.plugin_translation {
 +    display: inline-block;
 +    font-size: 95%;
 +    padding-right: 0.1em;
 +    margin : 0.0em 0 0.3em 0;
 +    text-align: right;
 +}
 +</code>
 +=== Problems with url rewriting ===
 +
 +When using the language selector to switch in between ''de:'' and ''en:'' url-rewriting would not work properly.\\
 +We where getting of ''en:start'', ''start/?id=de:start'' and ''de:start'', ''start/?id=en:start''\\.
 +
 +We found the problem to be that ''script.js'' expects the base-url to end with ''/'' when url-rewriting is active. In our case However, it ends with ''/start''. (which seems to be intentended, see the the ''wl()'' function in ''common.php'')
 +
 +We implemented the following workaround to fix this:
 +
 +''///var/www/wiki/lib/plugins/translation/script.js//''
 +
 +<code javascript>
 +        // this should hopefully detect rewriting good enough:
 +        var action = $frm.attr('action');
 +        if(action.substr(action.length-1) == '/'){
 +            var link = action + id;
 +        }
 +</code>
 +
 +was replaced with:
 +
 +<code javascript>
 +        // this should hopefully detect rewriting good enough:
 +        var action = $frm.attr('action').replace('/start', '/');
 +        if(action.substr(action.length-1) == '/'){
 +            var link = action + id;
 +        }
 +</code>
 +
 +===== plugin:doodle =====
 +
 +We use a version of the doodle plugin that has been tampered with by the c3voc. Ask andi for details.
 +===== Nicer breadcrumbs =====
 +
 +Since we're using both ''You are here:'' and ''Trace:'' breadcrumbs later are being moved to the right to keeping the breadcrumbs bar one line high.
 +
 +''///var/www/wiki/lib/tpl/dokuwiki/css/design.less//''
 +<code css>
 +/*____________ breadcrumbs ____________*/
 +
 +.dokuwiki div.breadcrumbs {
 +    border-bottom: 1px solid @ini_background;
 +    border-bottom: 1px solid @ini_border;
 +    margin-bottom: .5em;
 +    font-size: 0.875em;
 +    clear: both;
 +
 +    div {
 +        padding: .1em .35em;
 +        }
 +
 +    div:only-child {
 +        border-top: 1px solid @ini_background;
 +        border-bottom: 1px solid @ini_border;
 +    }
 +
 +    div:first-child {
 +        border-top: 1px solid @ini_background;
 +    }
 +
 +    div:last-child {
 +        border-bottom: 1px solid @ini_border;
 +    }
 +
 +    .bcsep {
 +        font-size: 0.75em;
 +    }
 +}
 +
 +#IE8 .dokuwiki div.breadcrumbs div {
 +    border-bottom: 1px solid @ini_border;
 +}
 +</code>
 +
 +Was changed to:
 +
 +<code css>
 +/*____________ breadcrumbs ____________*/
 +
 +.dokuwiki div.breadcrumbs {
 +    border-top: 1px solid @ini_border;
 +/*    border-bottom: 1px solid @ini_background; */
 +    border-bottom: 1px solid @ini_border;
 +    padding: 1px;
 +/* changed by raven, 09-01-16 in order to move trace to the right */
 +    margin-bottom: .5em;
 +    font-size: 0.875em;
 +    clear: both;
 +
 +    div {
 +        padding: .1em .35em;
 +    display: inline-block;
 +/* changed by raven, 09-01-16 in order to move trace to the right */
 +        }
 +
 +    div:only-child {
 +        border-top: 1px solid @ini_background;
 +        border-bottom: 1px solid @ini_border;
 +    }
 +
 +    div:first-child {
 +        border-top: 1px solid @ini_background;
 +    }
 +
 +    div:last-child {
 +/*        border-bottom: 1px solid @ini_border; */
 +        float: right;
 +/* changed by raven, 09-01-16 in order to move trace to the right */
 +    }
 +
 +    .bcsep {
 +        font-size: 0.75em;
 +    }
 +}
 +
 +#IE8 .dokuwiki div.breadcrumbs div {
 +    border-bottom: 1px solid @ini_border;
 +}
 +</code>
 +
 +
 +===== Locked Settings =====
 +
 +The following setting have been locked to prevent accidental messup:
 +
 +''///var/www/wiki/conf/local.protected.php//''
 +
 +<code php>
 +<?php
 +$conf['start'] = 'start';
 +$conf['lang'] = 'de';
 +$conf['useacl'] = 1;
 +$conf['superuser'] = '@admin';
 +$conf['userewrite'] = '1';
 +$conf['plugin']['translation']['translations'] = 'de en';
 +</code>