sorry, I don't know how did I realize the drupal version was six, and my reply was a "finish-porting-this-to-d6".. <br>Now I see, only half of the menu entry is 'ported' as well.. <br><br>Indeed, a very bad advice at all.. where the hell is my head?.. brbr<br>
<br><div class="gmail_quote">On Wed, Feb 4, 2009 at 12:32 AM, Jakob Petsovits <span dir="ltr"><<a href="mailto:jpetso@gmx.at">jpetso@gmx.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tuesday 03 February 2009, Iņaki Lopez wrote:<br>
> $items[] = array(<br>
> 'path' => 'admin/settings/featured-comments/feature',<br>
> 'title' => t('featured comment'),<br>
> 'callback' => 'feature_comment',<br>
> 'callback_args' => $_GET['cid'],<br>
><br>
> should be..<br>
><br>
> $items[] = array(<br>
> 'path' => 'admin/settings/featured-comments/feature/%',<br>
> 'title' => t('featured comment'),<br>
> 'callback' => 'feature_comment',<br>
> 'callback_args' =>array(4),<br>
> ...<br>
<br>
</div>Bad advice:<br>
<br>
1. There is no '%' wildcard in Drupal 5, and Drupal 6 puts the path as array<br>
key instead of having a separate 'path' element.<br>
<br>
2. There is no 'callback_args' property. array(...) is correct, but it also<br>
needs to be renamed to 'callback arguments' for Drupal to do anything with it.<br>
In Drupal 5, that would be "'callback arguments' => array($_GET['cid'])".<br>
(Or 'page callback' and 'page arguments' in Drupal 6, which I understand the<br>
original poster is not using at this time.)<br>
<br>
Maybe the thread is better off dead -<br>
<a href="http://api.drupal.org/api/function/hook_menu/5" target="_blank">http://api.drupal.org/api/function/hook_menu/5</a> has been posted already -<br>
but it's hard to leave the above example uncommented as is.<br>
<br>
Cheers,<br>
<font color="#888888"> j<br>
<br>
</font></blockquote></div><br>