Jump to content

Layout customization

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by 221.219.197.213 (talk) at 04:59, 11 April 2005. It may differ significantly from the current version.

Customizing the page layout

This is largely dependant on which skin you're using, how its constructed and which version of mediawiki you have. See Explaining Skins for a brief explanation of Skins.

Questions

How do I customise the Quickbar/Navigation bar?

When using the older table formatted Skin pages, the left hand Quickbar is displayed by the Skin::quickBar function.

When using the newer PHPTal formatted pages, the navigation, search and toolbar blocks are laid out in the template spec file (/templates/xhtml_slim.pt under 1.3 /skins/MonoBook.php under 1.4). Under 1.4 you can add items to the navigation block by manipulating the $wgNavigationLinks array which is defined in /includes/DefaultSettings.php. Any changes should be made in /LocalSettings.php Under 1.3 you can only add items by changing the xhtml_slim.pt file

See Quickbar for more details about editing the Quickbar/Navigation bar ---

How do I customize the logo in the top left corner?

The logo is a portlet block without a pBody section. It is identified by the p-logo id. The background image is specified by the wgLogo variable, which is defined in /includes/DefaultSettings.php. Redefine this in /LocalSettings.php to change the image. However the size of the p-logo will need to be big enough for the logo if it is not to be clipped. This is set in the stylesheet, under the p-logo style, the default setting is:

.
#p-logo {
    z-index: 3;
    position:absolute; /*needed to use z-index */
    top: 0;
    left: 0;
    height: 155px;
    width: 12em;
    overflow: visible;
}

but note that a tag is on top of the logo so if you are trying to reduce the size of the logo's portlet you will also need to change the #p-logo a and #p-logo a:hover rules. The default setting for these is:

 #p-logo a,
 #p-logo a:hover {
    display: block;
    height: 155px;
    width: 12.2em;
    background-repeat: no-repeat;
    background-position: 35% 50% !important;
    text-decoration: none;
 }

This simple customisation will re-define the size of all of them at once...

 #p-logo,
 #p-logo a,
 #p-logo a:hover {
    height: 75px;
}

There is one more rule controlling the amount of space between the logo and first portlet in the side column - the padding on the top of #column-one. By default this is:

#column-one { padding-top: 160px; }

How do I change the icon in the browser's addressline?

See article How do I change the icon in browser's addressline ?! in MediaWiki_FAQ数据恢复 硬盘数据恢复 磁带数据恢复 raid数据恢复 磁盘阵列数据恢复 数据恢复 数据恢复 数据恢复 数据修复 硬盘数据修复 磁带数据修复 raid数据修复 数据修复 数据修复 数据修复 磁盘阵列数据修复