This patch

  • defines three themeable sitemenu elements: box, page, and outline
  • adds an optional setting for a page footer below the outlines to match the "description" above the outline
  • removes the optional node counts from the links for better visual semantics: they are displayed, but outside the links
  • renames non-hook/non-theme functions with a leading underscore for better naming consistency
  • restructures function order to gather functions in three groups: custom, hooks, and themeing
  • adds inline documentation for all functions
  • includes the patch for http://drupal.org/node/59522
CommentFileSizeAuthor
#4 sitemenu_3.module12.66 KBfgm
#2 sitemenu.module_1.patch16.58 KBfgm
#1 sitemenu.module_0.patch16.09 KBfgm

Comments

fgm’s picture

StatusFileSize
new16.09 KB

Forgot to attach the path...

fgm’s picture

StatusFileSize
new16.58 KB

Improved patch

  • based on current CVS version (1.16)
  • adds a new setting: link to vocabulary page in outlines. Default to false to maintain backwards compatibility
Thomas Sewell’s picture

I was unable to apply this patch to sitemenu.module,v 1.16 2006/04/24 01:16:51

> patch <modules/sitemenu/*patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: modules/sitemenu/sitemenu.module
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/sitemenu/sitemenu.module,v
|retrieving revision 1.16
|diff -u -r1.16 sitemenu.module
|--- modules/sitemenu/sitemenu.module   24 Apr 2006 01:16:51 -0000      1.16
|+++ modules/sitemenu/sitemenu.module   8 May 2006 20:01:26 -0000
--------------------------
Patching file modules/sitemenu/sitemenu.module using Plan A...
Hunk #1 failed at 1.
Hunk #2 failed at 10.
Hunk #3 failed at 224.
Hunk #4 failed at 267.
Hunk #5 failed at 291.
Hunk #6 failed at 317.
Hunk #7 failed at 336.
Hunk #8 failed at 346.
Hunk #9 failed at 419.
Hunk #10 failed at 431.
Hunk #11 failed at 448.
11 out of 11 hunks failed--saving rejects to modules/sitemenu/sitemenu.module.rej
done

Perhaps there is something I'm missing here in order to be able to test the patch for you?

fgm’s picture

StatusFileSize
new12.66 KB

Dunno: I just tested on a plain CVS update of 1.16 and it applies:

patch --verbose < sitemenu.module.patch
Hmm...  Looks like a unified diff to me...
(Stripping trailing CRs from patch.)
The text leading up to this was:
--------------------------
|Index: modules/sitemenu/sitemenu.module
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/sitemenu/sitemenu.module,v
|retrieving revision 1.16
|diff -u -r1.16 sitemenu.module
|--- modules/sitemenu/sitemenu.module   24 Apr 2006 01:16:51 -0000      1.16
|+++ modules/sitemenu/sitemenu.module   8 May 2006 20:01:26 -0000
--------------------------
Patching file sitemenu.module using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 10.
Hunk #3 succeeded at 224.
Hunk #4 succeeded at 267.
Hunk #5 succeeded at 291.
Hunk #6 succeeded at 317.
Hunk #7 succeeded at 336.
Hunk #8 succeeded at 346.
Hunk #9 succeeded at 419.
Hunk #10 succeeded at 431.
Hunk #11 succeeded at 448.
done

Anyway, here is the patched version of the module.

Thomas Sewell’s picture

Thanks. Tested it and the new setting to link to taxonomy pages works fine for me.

I suspect the patching problem was latest CVS vs. 4.7 tagged versions having the same version numbers/dates.

kbahey’s picture

Status: Needs review » Fixed

Committed to 4.7 and HEAD.

Thanks.

Anonymous’s picture

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

On a site that I have the I use print _sitemenu_print_boxes(_sitemenu_overview()); to output the sitemap into a page. I believe that the _ should be reserved for prefixing private functions.

Is the implication that these functions shouldn't be used? If so - how do you recommend I rewrite that page?

kbahey’s picture

Well, this module was originally not meant to be callable, but since you are already doing this, how about I change

_sitemenu_overview() and _sitemenu_print_boxes() to sitemenu_overview() and sitemenu_print_boxes()?

That is all it takes. Please open a new issue, and I will fix it.