By clandmeter on
Hi,
(Don't kill me, I'm new to this)
I'm trying to create a module which will only show a specific function when i create/edit forum topics or comments.
When i add a forum node this is what i can use:
Forum topic:
add: node/add/forum arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'forum'
But when i want to edit this node i have this:
edit: node/nid/edit arg(0) == 'node' && arg(2) == 'edit'
This is not enough and will be true for any node. If i could use $node->type == 'forum' for forum nodes and comments then this would be good. But i tried it but its empty.
How can i find out if its forum related in my custom function?
Thx,
Carlo
Comments
hook_nodeapi()
I think this is what you're looking for hook_nodeapi()
My head starts to hurt. It
My head starts to hurt. It seems i don't know enough about functions and objects to get this working.
What I am actually trying to do is making the quicktags module only to show on add/edit forum nodes/comments.
The nodeapi function is not in this module, the owner created a function which checks the arg settings.
How would i be able to change it so it also checks if its a forum node/comment?
Thx,
Carlo