User:Netsu

From MediaWiki.org
Jump to: navigation, search

[edit] Number of pages in category / Pages count in category / Количество страниц в категории

// $name - name of category
$cat_title_obj = Title::makeTitle(NS_CATEGORY, $name);
$cat_obj = Category::newFromTitle($cat_title_obj);
$cat_count = $cat_obj->getPageCount();

[edit] How todo fixed monobook design / Фиксированный посередине дизайн

Open file:

/skins/MonoBook.php

Find:

v1.15

<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload']) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?>
 class="mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>">

v1.16

                $this->html( 'headelement' );
?>

Add after:

<table width="994px" cellpadding="0" cellspacing="0" style='margin-left: auto; margin-right: auto; background: transparent'>
<tr><td valign="top">

Find:

</body></html>
<?php
        wfRestoreWarnings();

Add above:

</td>
</tr>
</table>

Open file:

/skins/monobook/main.css

Find:

#globalWrapper {
        font-size: 127%;
        width: 100%;
        margin: 0;
        padding: 0;
}

Replace with:

#globalWrapper {
        font-size: 127%;
        width: 100%;
        margin: 0;
        padding: 0;
        position: relative;
}

Result:

343.png

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox