Benutzer:RolandUnger/Dialoge

Aus Wikivoyage
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Bearbeiten-Dialog [Bearbeiten]

Die Toolbar wird in der Datei EditPage.php erstellt. Und zwar definiert function getEditToolbar() das Array der darzustellenden Symbole einschließlich der Tooltipps. Beispiel:

$toolarray=array(
        array(  'image'=>'button_bold.png',
                'open'  =>   "\'\'\'",
                'close' =>   "\'\'\'",
                'sample'=>   wfMsg('bold_sample'),
                'tip'   =>   wfMsg('bold_tip'),
                'key'   =>   'B'
        ),

Daraus wird dann der spätere Quelltext der Form

$toolbar.="addButton('$image','$tip','$open','$close','$sample');\n";

Die Funktion function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText) ist in wikibits.js definiert.

Auf http://fr.wikipedia.org/wiki/MediaWiki:Monobook.js ist die Ergänzung über ein Javascript beschrieben (siehe: Insertion de nouveaux boutons dans la barre d'outil).

Hochladen von Bildern [Bearbeiten]

Der Aufbau des Dialogs ist in SpecialUpload.php programmiert. Er regelt auch den Einbau der Lizenzauswahl.

Nach

<tr>
        <td align='right'><label for='wpUploadDescription'>{$summary}</label></td>
        <td align='left'>
                <textarea tabindex='3' name='wpUploadDescription' id='wpUploadDescription' rows='6' cols='{$cols}'{$ew}>" . htmlspecialchars( $this->mUploadDescription ) . "</textarea>
        </td>
</tr>

könnten im Prinzip auch die Felder für Autor, Datum und Quelle eingefügt werden.

Statusangaben [Bearbeiten]

$wgDisableCounters = false;

/**
 * Set this to the number of authors that you want to be credited below an
 * article text. Set it to zero to hide the attribution block, and a negative
 * number (like -1) to show all authors. Note that this will require 2-3 extra
 * database hits, which can have a not insignificant impact on performance for
 * large wikis.
 */
$wgMaxCredits = 0;

/** If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
 * Otherwise, link to a separate credits page. */
$wgShowCreditsIfMax = true;

Geänderte bzw. neue MediaWiki-Dateien [Bearbeiten]

Weitere bedeutende MediaWiki-Dateien [Bearbeiten]