Here is a patch for 5.x-4.0 to get it working with Drupal 6. Because I just can't live without this module!

Comments

m3avrck’s picture

Thanks for the patch! I'll explore Drupal 6 soon with some ideas to further improve this module, thanks for the starter patch!

coltrane’s picture

Status: Needs review » Needs work

Patch didn't apply cleanly for me to 5.x-4.0 and Drupal 6.0.

(Stripping trailing CRs from patch.)
patching file simplemenu.css
(Stripping trailing CRs from patch.)
patching file simplemenu.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file simplemenu.info.rej
(Stripping trailing CRs from patch.)
patching file simplemenu.js
(Stripping trailing CRs from patch.)
patching file simplemenu.module

Continuing anyways and manually adding core = 6.x to simplemenu.info and enabling the module the navigation menu doesn't show in the simplemenu. Going to the simplemenu config page and submitting it with Navigation set as the menu doesn't fix it nor does selecting another menu.

Also a javascript 404 error is given on every page for simplemenu/menu.

ax’s picture

Version: 5.x-4.0 » 5.x-5.0
Status: Needs work » Needs review
StatusFileSize
new18.08 KB

try this patch (against latest 5 version, ie. either DRUPAL-5 or DRUPAL-5--5-0). based on starbows patch, with the following changes:

* updated superfish.js to latest version 1.4.1 to work with Drupal 6's jQuery 1.2.3.
* moved superfish.js out of simplemenu.js to ease further upgrades
* don't append <ul class="menu"> (the menu returned by simplemenu_theme_menu_tree()) to <ul id="simplemenu">, but make former the latter (by adding 'id="simplemenu"' to it). this dom hierarchy is what superfish,js and *.css expect (and why the menu didn't show before).
* removed the "Add devel module links" functionality. the much changed Drupal 6 devel.module now returns its links through a custom menu, so it can be put anywhere in the menu tree shown by simplemenu.
* fixed simplemenu_expanded_tree_page_data(). this shouldn't be a copy of menu_tree_page_data(), which returns a menu based on the current page, but of menu_tree_all_data(), which returns the *whole* menu for a custom menu. thats why i renamed it to simplemenu_tree_all_data(). modified it to accept any menu item as root param, not just the root of a custom menu).

this works for me as of today.

TODO:
* get (a modified version of) simplemenu_tree_all_data() into core. the functionality of getting all menu items below a certain root item certainly is not only needed by simplemenu. menu_tree_all_data() unfortunately doesn't do this - it only provides (as alternative to getting the whole tree of a custom menu) the tree from the root of that custom menu down to a certain item. but not all items below a certain item.

ax’s picture

StatusFileSize
new18.07 KB

missed a case. we don't want the "Select the menu to display." (eg. "Administer") to display, only its submenus (eg. Content Management, Site building, etc.)

jbrauer’s picture

Status: Needs review » Reviewed & tested by the community

+1

This patch works like a charm against DRUPAL-5

ax’s picture

does anyone mind if i commit this to DRUPAL-6--1 and create a 6.x-1.x-dev release?

patrickfgoddard’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new383 bytes

Patch failed for me:
"patching file simplemenu.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file simplemenu.info.rej
patching file simplemenu.js
patching file simplemenu.module
patching file superfish.js
"

Added "core = 6.x" manually to .info file, enabled and works fine (so far).

ax’s picture

Status: Needs work » Reviewed & tested by the community

did you patch against a clean DRUPAL-5/DRUPAL-5--5-0 simplemenu install? there are no patching errors, i just tried again. you probably had simplemenu.info patched already. setting back to RTBC.

m3avrck’s picture

I'll properly create a 6.x version and branch once this patch has been ironed out and I can fix a few other things.

jbrauer’s picture

Regarding #7 I got this same error when I tried to patch against the tarball and solved it the same way. When I patched a fresh CVS copy of DRUPAL-5 the patch applied correctly.

marafa’s picture

is this downloadable as a module yet?

m3avrck’s picture

I'll get this packaged up this weekend...

ax’s picture

@m3avrck: my offer of committing this to DRUPAL-6--1 and creating a 6.x-1.x-dev release is still valid :)

anantagati’s picture

Patch from #4 works good. Applied on DRUPAL-5--5-0.

thomas_green’s picture

I'd love it if you'd check it in to DRUPAL-6--1.

ax’s picture

@m3avrck: you give me a go?

m3avrck’s picture

reviewing all of this and committing it in a few :)

m3avrck’s picture

Status: Reviewed & tested by the community » Fixed

thanks guys this has been committed!

there is still an issue if you use the "black & blue" theme as the menu doesn't have the black bg anymore.

no time to look at that now but if someone has a patch for that let me know!

00drup00’s picture

Title: Working version for Drupal 6 » Working version for Drupal 6 - IE6 bug?
Version: 5.x-5.0 » 6.x-1.x-dev
Assigned: Unassigned » 00drup00
Category: feature » support
Status: Fixed » Active
StatusFileSize
new22.93 KB

Did anyone check this version to work properly in IE6?

It displays right in ff and ie7.
But not in ie6, see attachment.

Is this a js or css problem?

Appreciate your comments.

Thank you.

ax’s picture

Title: Working version for Drupal 6 - IE6 bug? » Working version for Drupal 6
Version: 6.x-1.x-dev » 5.x-5.0
Assigned: 00drup00 » Unassigned
Category: support » feature
Status: Active » Fixed

works for me with the original theme. note what m3avrck said above:

there is still an issue if you use the "black & blue" theme as the menu doesn't have the black bg anymore. no time to look at that now but if someone has a patch for that let me know!

please submit a new issue (and if possible a patch) for that one. thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.