01.12.2012 Views

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

command line level. To do this, switch to <strong>the</strong> directory mediawiki/maintenance<br />

and enter <strong>the</strong> following:<br />

php rebuildall.php<br />

Execution of <strong>the</strong> script can take several hours, depending on <strong>the</strong> database<br />

size. Since a few special pages depend on <strong>the</strong> data, it is worth<br />

<strong>the</strong> effort for reasons of consistency, because o<strong>the</strong>rwise only incomplete<br />

data will be generated.<br />

8.3<br />

Design Questions<br />

If you wish to utilize MediaWiki as a component of your homepage,<br />

it is a good idea to adapt <strong>the</strong> design of <strong>the</strong> wiki to your own site.<br />

Even as an independent site, you may want to lend your wiki a personal<br />

touch. There are two approaches you can use to change its appearance:<br />

You can design <strong>the</strong> skin by altering <strong>the</strong> CSS files in <strong>the</strong> directory<br />

mediawiki/skins/common. Changes to <strong>the</strong> page structure, on<br />

<strong>the</strong> o<strong>the</strong>r hand, are done via <strong>the</strong> templates in <strong>the</strong> directory mediawiki/skins.<br />

The template system has only been in use since MediaWiki<br />

version 1.3. Template-based layout, however, is <strong>the</strong> model<br />

for future versions and considerably easier to adapt. In addition, <strong>the</strong><br />

skin, which is intended to enable one's own settings, is based on a<br />

template model. Thus we will concentrate on template-assisted design<br />

below. It is of note, however, that <strong>the</strong> skins Standard, Nostalgia<br />

and CologneBlue use a different system.<br />

Let us first have a look at <strong>the</strong> template MonoBook.php in mediawiki/skins.<br />

The crucial area begins as of <strong>the</strong> line<br />

class MonoBookTemplate extends QuickTemplate<br />

The schematic construction is depicted in Tab. 8.3.<br />

Area <strong>Function</strong><br />

Determines <strong>the</strong> page title and <strong>the</strong><br />

stylesheet to be employed.<br />

The entire content to be displayed is<br />

located here.<br />

Areas in which <strong>the</strong> article is displayed.<br />

Article display.<br />

All navigation bars and toolboxes are<br />

located here.<br />

Skins<br />

Template<br />

structure<br />

Tab. 8.3<br />

8.3 Design Questions �<br />

�<br />

�<br />

125

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!