Hi

Newswire is a great theme, one of the best ones I've seen for Drupal. I am trying to customize it for my site and got the following issue. Suckerfish menu look great and I would like to add one or two menu items to the right of the menu bar, close to the rss icon. How could I do it?

I want the menu line to look similar to the following:

--------------------------------------------------------------------------------------------------
|Forum | Tools | Another menu item |                                          | About | rss icon |
--------------------------------------------------------------------------------------------------

Somehow I think that the About link on the right would look very stylish

Comments

Jeff Burnz’s picture

Its not so easy with this theme. Let me think about it for a day or two, really busy right now with work.

Artem’s picture

Sure, take your time, Jeff.

I appreciate that you are trying to help regardless of the result.

Jeff Burnz’s picture

Alrighty then. This turns out it be so simple I surprised even myself. You can do it all with CSS without touching any of the HTML, which is a biggish relief for you (seriassly...).

Do this in style.css around line 131, or apply the attached patch, I'm going to commit this to head also (will be commented as below, to use simply uncomment and modify etc...).

You should use this in conjunction with Drupals Menu Weight system to juggle the Primary links to suit.

/*** To position the last Primary Link on the right, next to the RSS icon, 
     uncomment this...
		 
#primary-menu ul.links li.last {
  margin: -18px 12px 0 0;
  padding: 0;
  float: right; 
}
***/
/*** If you want more than just the last Primary link on the right, you can
       float them individually and then use left margin to push them back
       into view, such as the following example.
		 
     .menu-XXX - is the menu class for the specific menu item
     NNpx -it the number of pixels you need to push it back into view
		 
#primary-menu ul.links li.menu-XXX {
  margin: -18px NNpx 0 0;
  padding: 0;
  float: right;
}
*/

For Suckerfish this becomes considerably more tricky to implement because there can be multiple .lasts classes in the menu.

I'll post an example here but you will need to play around with the selectors as I dont have time to test all permuations, but this shows you the basic idea. I must reiterate, please don't come back and tell me this doesn't work, you have to mess around with it to get your links positioned correctly.

If your last item has sub items (i.e is a drop down itself) then you'll probably need a lot more margin-left, at least 160px approx I would think.

/*** The Suckerfish version doesn't need any negative margin-top ***/

#suckerfish ul li.last {
  margin: 0px 12px 0 0;
  padding: 0;
  float: right; 
}

/*** There can be multiple .last classes in the Suckerfish drop menu, 
       you may have to target every sub level of the menu with a float: none; and
       possible margin adjustments also... ***/

#suckerfish ul li li.last {
  float: none; 
}

I'm not going to include this in the patch since it can be tricky with the Suckerfish, but I leave it here for anyone who wants to use it.

Artem’s picture

Thank you, Jeff!
Works very well on a test site, I'll probably roll the update to the live site tomorrow.

On a side note (not a fix request, just letting you know in case YOU think it could/should be fixed): The last menu item behaves a bit differently from the other ones when you zoom in/out in Firefox (whether you are doing full zoom or text-only zoom). Not that it was a big deal, the item is just moved in a different direction from the other ones.

Artem’s picture

StatusFileSize
new3.37 KB
new3.09 KB

Oups, I was a bit too quick. In IE (at least in IE6) the patch widens the menu band (not too bad on its own) and makes the menu items and rss icon horizontal centers not aligned. That might have looked ok without the moved menu item, but exactly when there is "about" next to the icon, it doesn't look very nice. See the screenshots attached.

Jeff Burnz’s picture

Afraid I have no time to fix the IE6 issue, place a copy of those styles in the IE style sheet and use a star or underscore hack to target IE6 and mess with the margins and padding is probably all that's needed.

Jeff Burnz’s picture

Status: Active » Closed (fixed)
Daniel Berman’s picture

Component: User interface » Code
Category: support » feature
Status: Closed (fixed) » Active

Jmburnz, thank you so much for a great theme.

One thought along the same lines of this thread. Any ideas about adding the option for a site login bar on the right hand side of suckerfish menu? This code

  global $user;
  if ($user->uid) {
    print "Welcome ". $user->name. " | ";
    print l("My Account","user"). " | ";
    print l("Logout","logout");
  }
  else {
    print "Welcome Visitor: ". l("Login/Register","user/login");
  }

from http://www.roopletheme.com/forum/index.php?topic=303.msg3085#msg3085 would seem to be a good starting point. On the other hand, perhaps I am asking for the moon, but I could see it being useful for people in need of a concise, and tight login solution.

Daniel

Jeff Burnz’s picture

Hi Daniel. I need to keep the theme as generic as possible, thats a big part of what makes it quite popular. Its pretty easy to add in this sort of thing and is more of a site specific customisation that only some sites would want.

chrysonline’s picture

Version: 6.x-3.1 » 6.x-3.2
Assigned: Unassigned » chrysonline
Category: feature » bug

Hi jmburnz,

i just wanted to thank you for your newswire theme 3.2 and his capabilities. So so great !!

i used this patch and it runs on a french D6.6 website under construction

No bug with IE, Firefox, but there is a bug with the latest menu item "about" with Google Chrome (not aligned with primary items menu at left.

well, i would try to fix it if i can.

Bye (from France)

Jeff Burnz’s picture

@chrysonline

Ok, thanks for the report, I'll take a look in Chrome when I get a chance, hopefully soon!

Can you tell me if the dates are formatted correctly in French? I've heard reports they may not be but that sounded strange to me.

hellaswebnews’s picture

StatusFileSize
new140.75 KB

I have a question which is similar to the subject matter here.

First things first. Thx for the theme. I personally find it quite professional in looks.

My question is this.

How can I add two previously done nice menus on the suckerfish region WITHOUT the second menu to wrap to the second line?

If this is too confusing I am attaching a pic to show my issue.

Best Regards, Aris.

Jeff Burnz’s picture

@aris53m
You can probably float them within the suckerfish region, that should work, I really need to see the site before I can actually show you code example of how to do this for your situation.

chrysonline’s picture

hi jmburnz,

YES !

The dates are not formatted correctly in French.

In french, you must simply reverse 'F' and 'j'... and delete ','

i change your node.tpl.php like that :

<h4 class="meta"><abbr title="<?php print format_date($node->created, 'custom', "l j F Y - H:i"); ?>"><?php print format_date($node->created, 'custom', "j F Y"); ?></abbr> <?php print t('by'); ?> <em><?php print $name; ?></em></h4>

not "October 29, 2008"

but "29 Octobre 2008"

:-)

Daniel Berman’s picture

Re: #9, Thanks I understand, and I appreciate your reply.

hellaswebnews’s picture

Category: task » bug
Priority: Minor » Normal
Status: Closed (fixed) » Active

jmburnz thx for your prompt response!!!

my site is www.hellaswebnews.com

i would appreciate any further help

cheers, hellaswebnews

Jeff Burnz’s picture

@aris53m

In the file - suckerfish.css, around line 15, you need to make a change:

#suckerfish .block {
  float: left;
  clear: none;
  margin-bottom: 0;
  padding-bottom: 0;
  border: none;
}

If you look carefully you will notice I have added only 2 lines to the existing code - float: left; clear: none;

You may want to have a look in IE6, tested only in Firefox 3.

BTW - your site is looking great, well done!

hellaswebnews’s picture

StatusFileSize
new189.44 KB

Hi Jim,
the change successfully put the secondary link (Αρχική σελίδα) below the nice menu (2) (videos mp3). Worked in ff3 and chrome (not on ie8). But what i want to do was to place nice menu (2) next to nice menu (1). What do I need to change in the suckerfish.css to make this happen? Thx again! hellaswebnews (www.hellaswebnews.com)

ps: see sfm.pdf att.

hellaswebnews’s picture

Hi jmburnz

forget my previous message everything works fine including ie8.

Best Regards and thx for the help and your nice comments regarding my site.

cheers, Aris.

hellaswebnews’s picture

Category: bug » task
Priority: Normal » Minor

Hi jmburnz

quick question assuming you have the time.

when the dropdown menus (in the suckerfish) drop they hide everything behind them ie www.hellaswebnews.com.

in another site (www.ert.gr) i've seen dropdown menus do not hide the entire text when they drop.

is it easy to modify the .css files in newswire to produce the same effect as in this site? (www.ert.gr)

as said, if you have the time. its not urgent.

kind regards, hellaswebnews.

Jeff Burnz’s picture

Category: bug » task
Priority: Normal » Minor

@aris53m -probably the easy to do this is to tile a semi-transparent image in the background of the menu items, rather than a solid colour - else this can be done with Javascript (jquery).

hellaswebnews’s picture

jmburnz, for your reply i'll check it out .

Jeff Burnz’s picture

Status: Active » Closed (fixed)

Closing, this has gone way off topic the last few additions, ideally please start a new issue rather than adding to others.

Status: Active » Closed (fixed)