You&#39;ll want to use<br><br><a href="http://example.com/admin/settings/featured-comments/feature?cid=10840" target="_blank">http://example.com/admin/settings/featured-comments/feature/10840</a><br><br>as url.<br><br>But also:<br>
<br>function feature_comment($cid = NULL) {<br>&nbsp; if (!isset($cid)) {<br>&nbsp;&nbsp;&nbsp; // Do something else.<br>&nbsp;&nbsp;&nbsp; drupal_goto(...);<br>&nbsp; }<br>
 &nbsp;$comment = _comment_load($cid);<br>
 &nbsp;db_query(&quot;UPDATE {featured_comments} SET featured=1 WHERE cid=%d&quot;, $cid);<br>
 &nbsp;drupal_goto(&quot;node/$comment-&gt;nid&quot;);<br>}<br><br><br><div class="gmail_quote">On Tue, Feb 3, 2009 at 11:34 AM, cooper Quintin <span dir="ltr">&lt;<a href="mailto:cooperq@cooperq.com">cooperq@cooperq.com</a>&gt;</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;">Hello all,<br>
I am writing a module and I am trying to use a url as a callback<br>
argument, but it does not work. &nbsp;Here is the code:<br>
<br>
$items[] = array(<br>
 &nbsp; &nbsp;&#39;path&#39; =&gt; &#39;admin/settings/featured-comments/feature&#39;,<br>
 &nbsp; &nbsp;&#39;title&#39; =&gt; t(&#39;featured comment&#39;),<br>
 &nbsp; &nbsp;&#39;callback&#39; =&gt; &#39;feature_comment&#39;,<br>
 &nbsp; &nbsp;&#39;callback_args&#39; =&gt; $_GET[&#39;cid&#39;],<br>
 &nbsp; &nbsp;&#39;access&#39; =&gt; user_access(&#39;administer comments&#39;),<br>
 &nbsp; &nbsp;&#39;type&#39; =&gt; MENU_CALLBACK<br>
 &nbsp;);<br>
<br>
and the callback function:<br>
function feature_comment($cid) {<br>
 &nbsp;$comment = _comment_load($cid);<br>
 &nbsp;db_query(&quot;UPDATE {featured_comments} SET featured=1 WHERE cid=%d&quot;, $cid);<br>
 &nbsp;drupal_goto(&quot;node/$comment-&gt;nid&quot;);<br>
}<br>
<br>
going to an example url:<br>
<a href="http://example.com/admin/settings/featured-comments/feature?cid=10840" target="_blank">http://example.com/admin/settings/featured-comments/feature?cid=10840</a><br>
gives the following error: warning: Missing argument 1 for<br>
feature_comment() in<br>
/var/www/html/sites/all/modules/featured_comments/featured_comments.module<br>
on line 149.<br>
<br>
<br>
So my question is, what is the best way to use parts of the linked url<br>
as a callback argument for a function, because obviously it is not what<br>
I am doing!<br>
Thanks,<br>
<font color="#888888"><br>
--<br>
Cooper Quintin<br>
Freelance Programmer, Indymedia Journalist<br>
<a href="http://CooperQ.com" target="_blank">http://CooperQ.com</a><br>
(510) 827-5382<br>
<br>
</font></blockquote></div><br>