<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
It was. People just don't tend to reply to much on Saturdays.<br>
<br>
Brian<br>
<br>
C&eacute;dric Joubert wrote:
<blockquote
 cite="mid:f5338d441003070035s470f402ayd5c013cc24089696@mail.gmail.com"
 type="cite">Hi,<br>
  <br>
Because i'm new on the liste, i'm wondering if my previous message
correctly received on the list ?<br>
  <br>
C&eacute;dric<br>
  <br>
  <div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">C&eacute;dric Joubert</b> <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:cedjoubert@gmail.com">cedjoubert@gmail.com</a>&gt;</span><br>
Date: 2010/3/6<br>
Subject: How to add comment under menu items<br>
To: <a moz-do-not-send="true" href="mailto:development@drupal.org">development@drupal.org</a><br>
  <br>
  <br>
  <div bgcolor="#ffffff">
  <div><font face="Arial" size="2">Hi,</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">I'm new on Drupal and I would like
to know how can I make properly such comment on items Menu please ?</font></div>
  <div><font face="Arial" size="2">&nbsp;-&gt; each first row is a link and
each 2nd row is a comment...</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">- Menu 1</font></div>
  <div><font face="Arial" size="2">&nbsp; (my explanation)</font></div>
  <div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">- Menu 2</font></div>
  <div><font face="Arial" size="2">&nbsp; (other explanation ...)</font></div>
  <div><font face="Arial" size="2">...</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">The only solution i've found&nbsp;is to
do that (below)... but i'm sure it's not a property way...</font></div>
  <div><font face="Arial" size="2">- the only constraint i have is to
have the abbility to get the Description field in the underlying menu
to display a dynamic comment.</font></div>
  <div><font face="Arial"><font size="2">but actually, the only trick
I've found to get the Description is to parse the HTML string to
retrieve the "<span>title" tag to get my text.</span></font></font></div>
  <div><font face="Arial"><font size="2"><span>Not very cool, i think...</span></font></font></div>
  <div><font face="Arial"><font size="2"><span>- actually, to determine
the underlying nodes menu, i'm testing her names... is there another
way to do that ?</span></font></font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">Can you help me please ?</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">Regards</font></div>
  <div><font face="Arial" size="2">C&eacute;dric</font></div>
  <div>&nbsp;</div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">function myTheme_menu_item(</font><font
 face="Arial" size="2">$link, $has_children, $menu = '',
$in_active_trail = FALSE, $extra_class = NULL) {<br>
&nbsp; $class = ($menu ? 'expanded' : ($has_children ? 'collapsed' :
'leaf'));<br>
&nbsp; if (!empty($extra_class)) {<br>
&nbsp;&nbsp;&nbsp; $class .= ' '. $extra_class;<br>
&nbsp; }<br>
&nbsp; if ($in_active_trail) {<br>
&nbsp;&nbsp;&nbsp; $class .= ' active-trail';<br>
&nbsp; }<br>
&nbsp; $css_id = strip_tags($link);<br>
&nbsp;&nbsp;</font></div>
  <div><font face="Arial" size="2">&nbsp;&nbsp;// test the node for which i want
to add comment<br>
&nbsp; if (stripos($link, 'MyMenu1') &gt; 0 || stripos($link, 'MyMenu2')
&gt; 0) {<br>
&nbsp;&nbsp;&nbsp; $rec = 'title="';<br>
&nbsp;&nbsp;&nbsp; $i = stripos($link, $rec);<br>
&nbsp;&nbsp;&nbsp; if ($i &gt; 0) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $j = strpos($link, '"', $i+strlen($rec));<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($j &gt; 0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $title = substr($link, $i+strlen($rec), $j-$i-strlen($rec));<br>
&nbsp;&nbsp;&nbsp; }&nbsp; <br>
&nbsp; }<br>
&nbsp; <br>
&nbsp; $title = ($title != "") ? '&lt;div
class="views-field-created"&gt;&lt;h0&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;['
. $title . ']&lt;/h0&gt;&lt;/div&gt;' : '';<br>
&nbsp; return '&lt;li class="'. $class .'"&gt;'. $link . $menu
."&lt;/li&gt;\n" . $title;<br>
}<br>
  </font></div>
  </div>
  </div>
  </div>
  <br>
</blockquote>
<br>
</body>
</html>