Under Appearance // Settings we have Logo checked in both b2_nature and global settings. we have uploaded the logo file using the upload feature and checked that it is in the Sites/Default/Files directory and have tested that the graphic displays when we type the link directly in the browser (so permissions, etc. are set fine).

Problem seems to be in the code of the b2_nature theme - the logo checkbox is checked and hence it should appear, but does not?

Please advise.

thanks

CommentFileSizeAuthor
#8 vetbbc.png496.2 KBKartagis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

javamonkey’s picture

I looked at some of the tpl.php files to see if I could figure out the problem. Unfortunately, the code for incorporating the logo graphic file seems to be entirely absent, not merely slightly broken. I did a quick text search of the entire theme folder structure and the word "logo" does appear in styles.css. So I assume the author intended to include the logo and style it but somehow the code to actually include it got left out.

drupal-king’s picture

Thanks JavaMonkey - so are you saying I should abandon this theme...looks like it!> - gonna probably go with Martinelli ... looks good!

javamonkey’s picture

No, I wouldn't say to abandon it yet. I just took took a quick glance so perhaps the developer will respond with a solution, either a code change or point out something I missed entirely. My look at the code was very brief while setting up a demo project with dozens of user-switchable themes. So give the developer or someone else a chance to respond here with a solution.

Kartagis’s picture

I've just stumbled upon the same issue. I wouldn't want to ditch this theme over one small (relatively) issue.

javamonkey’s picture

I think I've come up with a temporary fix until the developer or someone more proficient than I comes along. Be sure to make a backup copy of the original files in case my fix doesn't work for you. The two files are in the b2_nature theme folder. I show a line or two above and below my changes so you can kind of figure where they go in the files. The lines of code here may word wrap onto an additional line but if you look and compare you can see what has been added.

In page.tpl.php I added a line (and a php comment line to explain) in the area of line 28:

<div class="b2-logo">
<?php /* This line and the following line added by Javamonkey to insert the site logo image */ ?>
     <?php   if (!empty($logo)) { echo '<a href="' . url($base_path) . '">' . '<img class="b2-logo-image" src="'.$logo.'"/></a>'; } ?>
     <?php   if (!empty($site_name)) { echo '<h1 class="b2-logo-name"><a href="'.check_url($front_page).'" title = "'.$site_name.'">'.$site_name.'</a></h1>'; } ?>
     <?php   if (!empty($site_slogan)) { echo '<h2 class="b2-logo-text">'.$site_slogan.'</h2>'; } ?>
</div>

In style.css, around line 340, I added some lines of CSS:

  left: 0;
  margin-left: 12px;
}
/* begin changes by Javamonkey to display the site logo image */
.b2-logo-image
{
  display: block;
  float: left;
  padding: 0;
  margin: 0 40px 0 0;
}
/* end changes by Javamonkey for displaying logo image */
h1.b2-logo-name

Good luck and my apologies to the developer, I'm sure this is just a hack...but hopefully it helps a few people use the theme successfully for now.

drupal-king’s picture

Thanks Javamonkey - will try the code later - got to update 10 sites with 7.9!!! - Thanks - Hoping for the developer to respond??

bboldi’s picture

Sorry, I'm in the middle of moving to a new apartment, and I don't really have time or acceptable internet connection :( ... I will come up with a fix as soon as I can, I promise - till then thanks for your patience... and Javamonkey: thanks for the quick fix ;)

Kartagis’s picture

FileSize
496.2 KB

Hi javamonkey!

I've applied your code as below:

<div class="b2-logo">
     <?php   if (!empty($logo)) { echo '<a href="' . url($base_path) . '">' . '<img class="b2-logo-image" src="'.$logo.'"/></a>'; } 

if (!empty($site_name)) { echo '<h1 class="b2-logo-name"><a href="'.check_url($front_page).'" title = "'.$site_name.'">'.$site_name.'</a></h1>'; }
if (!empty($site_slogan)) { echo '<h2 class="b2-logo-text">'.$site_slogan.'</h2>'; }

?>

and CSS code:

.b2-logo-name
{
display: block;
float: left;
padding: 0;
margin: 0 40px 0 0;
}
and yet my logo looks like attached. What do I need to do?

Regards,

javamonkey’s picture

@Kartagis:

I noticed in the code you posted of your CSS that the name is different from what I changed ... ".b2-logo-name" instead of ".b2-logo-image". I didn't edit the original style.css so much as insert a whole new section. It MAY work if you just change the section name to ".b2-logo-image" but I don't know. You may need to restore your original style.csss and then do the whole thing over again.

It may not have been clear in my original post so I'll expand it so you can see where I stuck in the new ".b2-logo-image" part. Again, this is just a quick fix that I got to work on my particular site so your mileage may vary. I can figure out most of even the worst spaghetti code in PHP or other languages but I confess that CSS makes me want to curl up in a fetal position. Hopefully Bboldi will get settled into his new place and give us a better solution in the not too distant future.

/* begin Logo */
div.b2-logo
{
  display: block;
  position: absolute;
  top: 12px;
  left: 0;
  margin-left: 12px;
}
/* begin changes by Javamonkey to display the site logo image */
.b2-logo-image
{
  display: block;
  float: left;
  padding: 0;
  margin: 0 40px 0 0;
}
/* end changes by Javamonkey for displaying logo image */
h1.b2-logo-name
{
  display: block;
  text-align: left;
  font-weight: normal;
  font-size: 31px;
  padding: 0;
  margin: 0;
  color: #FFFFFF !important;
}
h1.b2-logo-name a, 
h1.b2-logo-name a:link, 
h1.b2-logo-name a:visited, 
h1.b2-logo-name a:hover

@bboldi:
Thanks for this really attractive theme and good luck in your new apartment.

Kartagis’s picture

I've amended my files, however, it still displays like that.

drupal-king’s picture

@bboldi:
are you planning to release an update soon?

Kartagis’s picture

Yeah, that's what I'm wondering as well.

javamonkey’s picture

@Kartagis:

Sorry not to reply sooner, been busy with work. As I've said before, I'm no expert in this theme or CSS but I recall I had a similar problem of the slogan dropping down below the logo and the solution that worked for me was to add sufficient margin in the CSS block that I added for the logo. You might try playing with that value of 40px and increase/decrease it and see what happens. Be sure to clear your cache every time you change it because Drupal doesn't notice the change otherwise and you'll drive yourself crazy changing the CSS but not seeing any results.

margin: 0 40px 0 0;

Above is the line to play with, in the .b2-logo-image block of style.css

bboldi’s picture

Thanks for your patience... moving is a long process :)

Here is my solution for the logo problem: http://drupal.org/commitlog/commit/27218/9f750e1818b4e8fc87a05d3958961e5... (your logo must be max 60 pixels in height though). Please test it, and let me know if it works, then I will release an update for the main version.

drupal-king’s picture

TESTED.

seems to work fine-

A) in message bar at bottom of browser (IE 8), I receive an "Error on Page" message, as follows:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; EasyBits GO v1.0; .NET CLR 2.0.50727; eSobiSubscriber 2.0.4.16; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Sat, 12 Nov 2011 12:19:42 UTC

Message: Access is denied.

Line: 210
Char: 5
Code: 0
URI: http://...../sites/all/themes/b2_nature/script.js?lujpo0

B) Logo seems to position itself 2 to 3 spaces from the left sidebar...?

Thanks

bboldi’s picture

Status: Active » Closed (fixed)

Fixed/added in release 7.x-1-1