Topic on Project:Support desk

Jump to navigation Jump to search

Edit Vector Tabs/Where Do Tabs Get Output?

3
207.254.173.25 (talkcontribs)

I'm trying to heavily modify Vector (latest version), mostly the footer and the header. However, when trying to create a custom header, something annoying occurs. I figured out mw-page-base and mw-head-base via colors, and now I put the Namespaces, Variants, Views, Actions, Search tabs into mw-head-base, but they pop up into custom-header (my custom class for the header), and the logo doesn't appear either.

http://mustachio.madsplash.net/index.php/Main_Page is where you can see what's going on. The transparent black background is my custom header class, red is mw-page-base, and blue is mw-head-base. I want the tabs and the line of user links to be in the blue box, not in the black box.

Any help in this regard?

88.130.124.94 (talkcontribs)

Hi!

If you want to output parts of the page at another place inside it, then you should edit the skin file! In case of vector, this would be the file skins/Vector.php, in case of a custom skin the according PHP file of that skin. This file basically contains the HTML structure of each wiki page and inbetween some function calls, which create the markup of the according part. Move the HTML and or these function calls so that they create the strcutre, which you want! (After that you obviously will have to adjust the CSS to make things fit again on screen, but first things first, last things last.)

207.254.173.25 (talkcontribs)

Already been messing with Vector.php.

Here's currently what I've got it outputting... if you read in the top section, you'll notice where I've got the tabs put, but unfortunately I may have to use Absolute positioning to fix it. #blegh

<div id="custom-header">
			<div id="p-logo" role="banner" style="width: 180px; height: 100%;">
				<a style="background-image: url(<?php $this->text( 'logopath' ) ?>; width: 100%; height: 100%;);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>></a>
			</div>
			
			<div class="clear: both;"> </div>
		</div>
		
		<div id="mw-page-base" class="noprint" style="background-color: red;"></div>
		<div id="mw-head-base" class="noprint" style="background-color: blue;">
			<div id="mw-navigation" style="width: 100%;">
			
			<div id="mw-head">
				<?php $this->renderNavigation( 'PERSONAL' ); ?>
				
				<div id="left-navigation">
					<?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
				</div>
				
				<div id="right-navigation">
					<?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
				</div>
			</div>
			
			</div>
		</div>
		
		<div id="content" class="mw-body" role="main">
			
			<a id="top"></a>
			
			<div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>>
			
			</div>
			
			
			<?php 
				if ( $this->data['sitenotice'] ) {
					echo "<div id='siteNotice'>" . $this->html('sitenotice') . "</div>";
				}
			?>
			
			
			<h1 id="firstHeading" class="firstHeading" lang="<?php
				$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
				$this->text( 'pageLanguage' );
			?>">
				<span dir="auto">
					<?php $this->html( 'title' ) ?>
				</span>
			</h1>
			
			
			<?php $this->html( 'prebodyhtml' ) ?>

... (rest omitted for space)

Reply to "Edit Vector Tabs/Where Do Tabs Get Output?"