Not sure how much work is required. Just starting this to kick it off since there's discussion in some other unrelated issues.

Comments

catch’s picture

Title: Port module to 5.0 » Port nice menus to 5.0
Christoph C. Cemper’s picture

+1 want this too

flamingpoodle’s picture

Cool Catch. can't wait :).

burgs’s picture

I've done a super quick port, without lots of testing. It's not official, just waiting to hear back from Jake.
If you are desperate for a version for 5, you can download it from http://www.feedmegigs.com/nice_menus.zip

Simon

greggles’s picture

burgs - can you provide your version as a patch file as opposed to a zip?

http://drupal.org/diffandpatch

flamingpoodle’s picture

Thanks buddy. I've LDed it and will give it a spin for you.

burgs’s picture

StatusFileSize
new5.15 KB

Patch file attached. It's my first patch file ever, so please be nice if it's wrong.

dingbats’s picture

Status: Active » Needs review
pjb’s picture

I've given this a test and it seems that IE6 has issues expanding the menus. I seem to recall this occurring on the 4.x versions as well so it might be unrelated to upgrading to version 5. Anyone else tried?

SubWolf’s picture

StatusFileSize
new3.22 KB

Might be a bit late to the party, did this patch yesterday - and I see some subtle differences, the only big one being the link still in the help section.

burgs’s picture

Yeah, it doesn't work in ie6 for me either. any suggestions?

zidar’s picture

Hello if you are talking about the problem that when the menu expands it appears under the window not on top.

This was a problem in 4.7 and IE the fix is on the forum..

But i cant find it as my current link has stopped

I'm sure it was a small line change to a theme / mod

miseryshining’s picture

StatusFileSize
new625 bytes

i've rewritten the js using the jquery library. The old js file contains functions that aren't supported anymore. Also added the slide up/down effect for menu's.

Just replace the nice_menus.js file with this one. if this still doesn't work check your page.tpl.php and make sure $scripts is called before $head.

peterthevicar’s picture

Thanks for the port guys, it seems to work fine using SubWolf's patch. I can't change the configuration though, when I try I get an error page and this is dumped in my server's error_log:

[error] [client 84.45.223.32] php-script: line 8: 21923 Segmentation fault /usr/bin/php, referer: admin/build/block
[error] [client 84.45.223.32] Premature end of script headers: php-script, referer: admin/build/block

Any ideas?

TIA, Peter

burgs’s picture

thanks miseryshining - your js file works a treat.
we should submit this all and release this as version 5.0

jsimonis’s picture

So is this ready to be posted on the modules page?

druvision’s picture

Of course, to activate the module on version 5.0 you need an 'nice_menus.info' file.
Here is my invented one. I am not sure the values are correct, but it works.

; $Id: $
name = Nice Menus
description = Make drop down css/javascript menus for site navigation and admin menus
version = "5.x-1.x-dev"
project = "nice_menus"
jsimonis’s picture

It would be really great if this could be packaged up as a module and linked on the module page for those who aren't as good at using all this to create an updated version of the module.

dsp1’s picture

the attached js file nice_menus.js_.txt does not seem to work with the last HEAD. the code is much smaller than the included code also. the date inside the file is 2006/08/06, which is older than the HEAD js file.

miseryshining’s picture

it works together with the stable 4.7 patched version (i used burgs patch). i forgot to change the date in there, since i started with the old js file, but decided to rewrite it. With the inclusion of jquery, we can do with much less code now.

JamesSharpe’s picture

StatusFileSize
new7.62 KB

I've created a single patch against the 4.7.x-1.x-dev snapshot which includes the new nice_menus.js, the .info file and burgs patch. There was a small bug in miseryshining 's js file which was removing over from the wrong element which I've now fixed.

teleted’s picture

I can confirm that the menus now function under IE6 very nicely.

There still seems to be a problem preventing the configuration screen for nice menu blocks. In Safari, clicking configure on the Blocks admin page gets:

Safari can’t open the page.
Safari can’t open the page “http://www.ansette.com/dr5/admin/build/block/configure/nice_menus/1”. The error was: “lost network connection” (NSURLErrorDomain:-1005) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.

I've found that removing the last line from this form array in nice_menus.module allows the configure screen to appear. The problem is, of course, that this line populates the source menu field.

$form['nice_menus_menu_'. $delta] = array(
'#type' => 'select',
'#title' => t('Source Menu Tree'),
'#description' => t('The menu tree from which to show a nice menu.'),
'#default_value' => variable_get('nice_menus_menu_'. $delta, '1'), // REMOVE TRAILING COMMA
'#options' => menu_parent_options(0) // REMOVE LINE
);

Being fairly new to Drupal, I don't want to guess whether this is the true source of the problem (menu_parent_options) or an effect of some other cause.

teleted’s picture

Actually, I need to correct my post above. I can't confirm that the menus are working under IE6. I downloaded the current 4.7 devel and the above patch, renamed my current nice_menus folder in the modules directory, and uploaded the new version. Menus are not popping out (to the right) in IE6, but they are for IE7, Safari, Firefix, and Opera. Using Drupal 5.1.

Patching went without error:
NiceMenu- JamesSharpe 20070307 version/nice_menus$ patch -i nice_menus_0.patch.txt
patching file nice_menus.info
patching file nice_menus.js
patching file nice_menus.module

AdrianB’s picture

I'm using nice_menus-egressive20070304 posted here but with the js from the above patch (nice_menus_0.patch) by JamesSharpe. Works fine in IE6 as far as I can tell.

(Since there's all sorts of personal versions and patches, it would be nice if the module was updated to one good working version for Drupal 5.x. But it seems like module management is dead right now, nothing happened in the CVS for five month now.)

jsimonis’s picture

AdrianB--

I'd love to do that, but I seem to be messing up each time I edit the module file.

Would it be possible to get the edited files e-mailed over? I tried contacting you, but your contact form isn't turned on.

I sure can't wait for this to finally be posted as a module.

AdrianB’s picture

Oops, didn't know it wasn't enabled. I'll contact you.

jsimonis’s picture

I've put the patched version on several sites. So far, everything works good. Users have tested it out in several browsers, and it works fine in all of them.

Great job everyone.

dkruglyak’s picture

Status: Needs review » Needs work

Who is actually maintaining this module these days? I see the last checkin was back in October...

There is another important fix for IE6.0 that adds an IFrame to cover browser bug with SELECTs (http://drupal.org/node/84608)

This needs to be converted to jQuery and ported into 5.0.

miseryshining’s picture

StatusFileSize
new9 KB

-hopefully fixed IE6 z-index bug, full patch for 4.7.x-1.x-dev attached (build on JamesSharpe's patch).
A hidden iframe is prepended to all .menuparent > ul's, inspired by this solution.
I couldn't get the js hacks to work reliably.

Needs testing!

baronmunchowsen’s picture

Hi,

1. Apologies if this is in the wrong place - I don't think it is but may be wrong!
2. I have implemented the patch above (#29) on the latest 4.7 release without issue.
3. On a fresh 5.1 install (php 5.2.1 MySQL 5.0.24a) I enabled the patched nice_menus module
4. In I.E. 6 (on an XP machine) an error appears that stops the drop-downs from appearing:

Line: 17
Char: 3
Error: Object expected
Code: 0

5. I would love to see this module fully ported to 5.x and would like to help in any way possible. I hope this testing/feedback helps. I have been chasing this error for ages and the only solution I have at present is to rebuild my site in 4.7

Cheers

miseryshining’s picture

I suspect it's the problem I mentioned here (last line). Just call $scripts before you call $head in your page.tpl.php

baronmunchowsen’s picture

StatusFileSize
new61.5 KB

Hello,

You were absolutely correct. I applied the code in #13 and it's working sweet on ie6 now. Thanks. However, Opera (9.10) on XP is a different story. The drop-downs work, but the text inside them appears all jumbled. It's not a css issue - and I think it may have something to do with jquery??? I've attached a screen grab. This problem did not exist before I applied the fix for the ie6 issues. Given the choice thought, I'd rather have it working in ie6. Don't know if this is really even a nice-menus issue either!

Cheers!

miseryshining’s picture

Good to hear you got it fixed. Opera is probably identifying as IE, and thus loading the hidden Iframe (i guess it parses the conditional comments). Then, it won't apply 'filter: mask();' since it's a proprietary IE property.

emdalton’s picture

I'm using the JS file above with Drupal 5.1 (somebody's offsite version of the module), and everything is working, including 3d level menus on IE 6. However, the slide effect is driving my users crazy. Can it be sped up or turned off? We'd rather have it behave on IE the same way it behaves on Firefox, i.e. the menu appears and disappears all at once.

Thanks!

mennonot’s picture

Subscribing...

miseryshining’s picture

replace
slideDown("slow") with show()
and slideUp("slow") with hide()

andjsmit’s picture

Hello,

I have the nice menus setup up as described in #24 above. My only problem now is with IE6 initially placing the menus left of where they should be until first moused over. Once moused over, they pop over to where they should and the menus function properly. Reloading the page returns the menus to the wrong starting position. This does not seem to be a JS problem as turning scripting off still causes the menus to appear in the wrong location, only mouse over has no affect. I first reported this issue here.

The theme's (homepage only) places these nice menus in the center of the page inside a table. You can see the demo site at here.

Any thoughts or advice would be greatly appreciated.

cudaboy_71’s picture

i know a lot of you prefer the patch files. but, i'm not a programmer, i don't have CVS installed, nor do i have the inclination to install/learn how to use it. this one issue is the sole reason i have for mucking around in code anyway.

can someone please provide a .zip of this nice_menu_5 port that is compatible with IE6.

if anyone is willing to help, thanks.

emdalton’s picture

#36, thanks!

I was asked which version of nice_menus I'm using. It's SubWolf's version from http://chilleddreams.com/d5-dev/nice_menus-5.x-contrib-dev.tar.gz

sylhco’s picture

Like #38, I'd really appreciate a fully patched version of nice menus for 5.0.
I tried this version http://chilleddreams.com/d5-dev/nice_menus-5.x-contrib-dev.tar.gz, using Firefox and the zen-fixed theme and it pretty much blew up. Menus were all over the place, and whenever I tried to place Nice Menus somewhere(ie header), other menus would end up there there instead with nice menu features (and they weren't even nice menus to begin with) . It was just really weird. I couldn't even see a pattern to the madness :p.

superfly’s picture

I ran the patch, and it sort of works... If the menus are on the left (and possibly on the right too, haven't tested that), they work fine. Need a bit more styling (used the default Drupal 5.x theme, Garland), but they work. THEN I tried from the header at the top. What a mess. No drop downs, nothing. The funny thing is that even if the menu type is "down" and it's in the left side bar, it works. Move it to the top, no worky. Will look into it, because we need to use it at work, but if anyone else has any ideas, they would be most welcome.

sylhco’s picture

Yes - it was along the top that caused the most problems for me. Perhaps I was also not implementing it properly. Is there a step by step for Nice Menus ?

emdalton’s picture

My site uses the above patched version to implement horizontal menus with drop down in a modified Contented7 theme. It is working under Firefox, Mozilla, and IE6. I did have to fiddle with the CSS a bit to get 3d level menus working correctly.

SavoryMedia’s picture

#39 - Thank you VERY much for linking the dev version of the module. I'm currently running it on a 5.0 dev site in the middle of a full upgrade from 4.7.4 to 5.1 and it is working fantastically. *thumbs up*

dkruglyak’s picture

Is there a commiter in the house? I am very confused about which of the patches floating around is the right one.

jakeg is now the only developer listed and his last commit is October 2006. I wonder if anyone wants to step in as a maintainer and get all the patches integrated and released for 5.1?

add1sun’s picture

Hi, I talked to jake and he is just too busy to look after this right now so he has given me CVS access. I need this module to work well for a project at work so I offered to co-maintain to keep it moving. I'll be creating a 5 branch and applying the patches we have so far so that it will be easier to work towards an official 5 release. I hope to get this done this week. Then I'll try cleaning up the issue queue a bit as well. So, once I get it all settled down, patches and help will be welcome and applied regularly!

emdalton’s picture

#46 - that's great news! One thing I think would really help people would be a better documented CSS file. Let me know if I can help.

dkruglyak’s picture

add1sun, thank you so much.

Please note that besides basic 5.x port there is a fix for IE6 SELECT bug spread out across several patches. Plus we had to make extra mods in our 4.7 version that did not get posted here.

Look forward to using your first stab of 5.x version as a starting point.

add1sun’s picture

Hm, well it is sort of a bummer that folks were working against 4.7 rather than HEAD since Jake had done a bit of work towards 5 in HEAD already. I've gone through and manually figured out what was overlapping and what still needed to be fixed. His JS and CSS changes were a bit different and frankly I'm going to start with his since his works without having to move $scripts over $head. (This will be majorly confusing to folks who are using core themes and we really should not make people open the page.tpl.php of a default core theme to change things - the standard is $head first. If I am misunderstanding this please let me know. All of the patching in here is a bit confusing to wade through, especially since I am not working from 4.7 but HEAD, so it may take me awhile to actually catch up to ya'll.)

I've made the branch but won't make a 5.x-1.x-dev release until I have hammered on this a bit just so that I know what is going on. Then I'll make the dev release and everyone can do proper patches against the working copy and we can get it spit shiny.

dkruglyak’s picture

Sounds great. Branch is fine as long we have the central place against which to test and verify the fixes.

add1sun’s picture

Status: Needs work » Active

OK, I've added a bunch of changes to the code now. I am basically using the work that jakeg already had done with a few more additions. So, that means it needs to be tested and patched a lot right now. No dev tarball until it gets some major kinks worked out. Anyone that wants to keep testing and patching can check out the 5 branch (DRUPAL-5) from CVS to get the latest code.

If you need help figuring out how to use CVS there are a bunch of resources in the handbook:
CVS checkout modules - http://drupal.org/node/321
Creating patches - http://drupal.org/patch/create

It really is easy once you have CVS set up and no, you do not need a CVS account to checkout, test and patch.

add1sun’s picture

Status: Active » Fixed

OK, I have been making a mess in the 5 branch all morning. ;-) It is now using the js and css from the above patches and I figured out the only way to solve the "ordering" problem with $head and $script is to manually call all the js files (jquery, drupal and nice_menus) in the correct order inside the drupal_set_html_head. It isn't pretty but you can't control where drupal_set_html_head places its stuff and it always goes in as the first thing. Since themes normally set $head first, this is the only solution I can find.

IE third level menus are NOT working for me again and I don't have time to keep monkeying about right now. I am creating a release (with a big ole warning on the project page) so you all can download the tarball and do patches against it. Dev releases are rolled every 12 hours so there should be a tarball after midnight GMT tonight. I consider this particular issue closed so please post problems and patches in either existing or new issues.

dries’s picture

Status: Fixed » Closed (fixed)
zerac_ee’s picture

An issue related to Comment #22 is in the works at this location. http://drupal.org/node/163539#comment-619552

-Rez