Book Image

MediaWiki Skins Design

Book Image

MediaWiki Skins Design

Overview of this book

Table of Contents (16 chapters)
MediaWiki Skins Design
Credits
About the Author
About the Reviewer
Preface

Functions For <body>


The body of your wiki can be split in two distinct areas: First is the content area, which contains the majority of the page's content, including that page's editable content within MediaWiki. Second is the interface area, which includes menu links, your wiki's logo, and the footer.

Within <body>

Two JavaScript events, "inserted if" and "when required"' and a unique class for the page are inserted in to the <body> tag of each page in MediaWiki. A typical page's<body> tag looks similar to the following code. Note the absence of the JavaScript events:

<body class="mediawiki ns-0 ltr page-Main_Page">

The JavaScript events provide for double-clicking events, and the page load event. They are required on the page being generated by the PHP template:

<?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload' ]) { ?>onload="<?php...