Why did you add the <img> tag to the Monobook skin? It should be sufficient to edit only the [[MediaWiki:Monobook.css]] article to do what you want.
On Nov 8, 2007 2:25 PM, James Sweet james@educationarchitects.com wrote:
Hi All,
I want the logo of a wiki to change to a different image when the mouse hovers over it. So. I modified the p-logo section of monobook.php as follows:
<div class="portlet" id="p-logo">
<a href="<?php echo
htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"><img src="<?php $this->text('logopath') ?>" width="150" alt="Go to the Home Page"/></a>
</div>
Then, I modified the p-logo anchor styles in main.css as follows.
#p-logo a,
display: block; height: 175px; width: 150px; background:url(image1.png) no-repeat top left; background-position: 35% 50% !important; text-decoration: none;
}
#p-logo a:hover {
display: block;
height: 175px; width: 150px; background:url(image2.png) no-repeat top left; background-position: 35% 50% !important; text-decoration: none;
}
Finally, in localsettings.php I set the logopath to a transparent png file.
However, neither of the background images is displayed by MediaWiki. Does anyone know what other files or styles need to be modified to make this work?
Best,
Jim Sweet
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
In the current code, the logo is a background image in monobook.php. In order to get the effect I want, it must be a transparent image with two different background images defined in the style sheet. However the transparent image is the logopath defined in localsettings.php, so it can be changed to another image without going back into monobook.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jim Wilson Sent: Thursday, November 08, 2007 5:15 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Change logo on hover
Why did you add the <img> tag to the Monobook skin? It should be sufficient to edit only the [[MediaWiki:Monobook.css]] article to do what you want.
On Nov 8, 2007 2:25 PM, James Sweet james@educationarchitects.com wrote:
Hi All,
I want the logo of a wiki to change to a different image when the mouse hovers over it. So. I modified the p-logo section of monobook.php as follows:
<div class="portlet" id="p-logo">
<a href="<?php echo
htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"><img src="<?php $this->text('logopath') ?>" width="150" alt="Go to the Home Page"/></a>
</div>
Then, I modified the p-logo anchor styles in main.css as follows.
#p-logo a,
display: block; height: 175px; width: 150px; background:url(image1.png) no-repeat top left; background-position: 35% 50% !important; text-decoration: none;
}
#p-logo a:hover {
display: block;
height: 175px; width: 150px; background:url(image2.png) no-repeat top left; background-position: 35% 50% !important; text-decoration: none;
}
Finally, in localsettings.php I set the logopath to a transparent png
file.
However, neither of the background images is displayed by MediaWiki. Does anyone know what other files or styles need to be modified to make this work?
Best,
Jim Sweet
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org