By lllkkk on
How can I get the node ID, that will be post after the filter processing $text ,in a filter module?
Thanks a lot.
How can I get the node ID, that will be post after the filter processing $text ,in a filter module?
Thanks a lot.
Comments
Does anyone can give some
I am a little new at this so bare with me...:
Does anyone can give some suggestion, or just a link?
I too would like to know if
I too would like to know if this is possible. I would like to implement the inline module as a true filter but I need this function first.
not possible
I dont think its possible at the moment. Look at the code to invoke
filters. It does not pass $node to the filter function. But I agree this
would be very helpful! Maybe for 4.8 or later, we can change the
parameters.
possible for node view, not in teaser (frontpage)
I mean get nid in
I mean get nid in hook_filter , this code doesnot work
----------------------------------------------
my drupal site http://www.kylinx.net/
same question but 6.x
The same question, but Drupal 6.x: http://drupal.org/node/239737
Yeah D4 is long unsupported,
Yeah D4 is long unsupported, but on of my modules does this. I think the best way is this:
This ensures that the node object is accessible in most situations where filters are being used on node text, and your code is just skipped otherwise. I think
menu_get_object()is very useful for this.Check out the API docs for more information on how you can make use of the function. http://api.drupal.org/api/drupal/includes--menu.inc/function/menu_get_ob...