logo image support for marinelli theme for drupal 5.x

mau-it - December 6, 2008 - 17:02
Project:Marinelli
Version:6.x-2.95
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I wanted to overlay a logo image on rotating banners in beautiful Marinelli theme, but this feature is not implemented.

So I modified style.css and page.tpl.php - I'm using Drupal 5.x, so changes are applied to Marinelli Theme 5.x-1.2 (2008-Jun-18).

Changes are quite simple, and can be done by hand, but I supply diff files for patching, too.
I left title on the left and positioned the logo imagine on the right; Some tweaking may be necessary on logo margins in css, and logo image height must not be greater than height of banner (i.e. 180 px's).

Here are details for modifying manually:

Open style.css in your editor

under existing lines:

#header {
padding: 0;
margin: 0;
height: 180px;
background: #000033 url(img/banners/rotate.php) no-repeat 0px 0px;
position:relative;
}

add these new lines:

#logo{
/*  be careful: max height of logo image : 180px (as header's height) */

/* assuming some defaults: modify margins as required */
margin-top: 30px; /* "n px" where n=(180-logo_height)/2  to have image vertically centered  */
margin-right: 35px;
margin-bottom: 0px;
margin-left: 0px;
/* logo image on the right */
float: right;
padding:0;
}

#logo img{
padding:0;
margin:0;
}

save and close.

Open page.tpl.php in your editor
under existing lines:

<div id="page">

  <div id="header">

add these new lines:

  <?php if ($logo): ?>
<!-- logo_image -->
<div id="logo">
            <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>"> <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" id="logo" /> </a>
</div>
<!-- /logo_image  -->
  <?php endif; ?>

save and close.
You are done. :-)

I didn't try, but I suppose a similar approach can be done for drupal 6.x version

mau

AttachmentSize
marinelli5x12.style_.css_.patch1.06 KB
marinelli5x12.page_.tpl_.php_.patch597 bytes

#1

mau-it - December 6, 2008 - 17:04
Status:active» needs review

#2

jlmiller22 - March 30, 2009 - 04:23

AWESOME fix, works on 6.x too!

#3

nikmahajan - May 2, 2009 - 08:48

Yeah works on 6X but to make image overflow hidden, following should be put into #logo {}

overflow: hidden;

#4

odox - July 2, 2009 - 11:53
Version:5.x-1.2» 6.x-2.95

Could not get this logo feature to work, with or without code on latest version. Can anyone help?

#5

guitarma - July 3, 2009 - 04:32

I moved the Primary links to below the header, but above the secondary links. My question is: how do I add a region ABOVE the header? I want to put ad space there. Same width as the banner, but only 90-100 pixels high.
I don't have enough php experience to add the region myself, or to even know all of the files to add it to.

Can anyone help me?? Thank you so much, if so!

OOps! Just realized I posted in the wrong place - sorry, I'll move it!

#6

jfmoore - August 4, 2009 - 17:05

Thanks for the fix. I'm not sure, though, what the logo should be named and where it should reside?

#7

Michal1986 - August 4, 2009 - 21:36

whether it works for version 5?
Where can I download themes for version 5 ??

#8

sino - August 8, 2009 - 19:51

Thanks mau! It works for Drupal 6.13.

jfmoore, no need to concern about the logo image file name, just upload it via

Home » Administer » Site building » Themes

#10

bchezem - August 30, 2009 - 16:22

When using the Giordani sub-theme in 6.13, make these changes....Instead of using style.css ( which has been replaced by several other CSS ) use sites/all/themes/marinelli/graphics.css

Instead of the marinelli/page.tpl.php, use sites/all/themes/marinelli/giordani/page.tpl.php.

Also, the banner images in Giordani are 200px high...this is of little consequence except for centering logos.

#11

bikecomedy - September 23, 2009 - 06:02

This worked nicely. At the moment I am not getting the logo to display on the home page. Which I would like. If I find out why I will post it here. Probably something easy. If you know please kindly post here. Cheers

#12

bikecomedy - September 23, 2009 - 18:17

Ok so putting the same code in the page-front.tpl.php worked for getting the logo to land on the front page as well. A few nip and tucks with firebug to the css were needed as well to get the position right. I was able to put a larger than mentioned logo too which was nice.

#13

mrbrowny - September 27, 2009 - 19:00

just suscribing :)

#14

drupal92037 - October 17, 2009 - 15:11

Worked for me on Drupal 6.14. Thanks!

#15

ProfStein - November 3, 2009 - 02:25

Outstanding. Works in Drupal 6.14. Thanks very much.

 
 

Drupal is a registered trademark of Dries Buytaert.