Hi,

i want to implement messages like this "[author-name] has added [activity-node-link] to [ogname]"

the only token taht is not working is ogname, it would be even nicer if ogname would be a link to the group.

Can anyone point out how this would work?

Thanks

Comments

Scott Reynolds’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Needs review

you will need to write hook_token_list() and hook_token_values().

Token module provides a tokenSTARTER.module as a great example on how to do this. In the hook_token_values(), you will use the l() function to create a link.

mdesmet’s picture

Thanks, that will do it!

Just thought it would already be adressed in the current code.

I could submit the code when finished developing it (somewhere next week as I'm leaving for a small holiday) as I'm sure that there are more users wanting to do something like that. Just ping me if you are interested in getting this included in the module.

pribeh’s picture

Bump. Thanks for taking a stab at this mdesmet. I'll share if I get to it first.

sirkitree’s picture

Title: How to add messages for nodes added to a group » OG Tokens
Status: Needs review » Closed (won't fix)

This is not something that will be implemented within Activity itself, so marking as won't fix. But please feel free to move this to the OG queue if you post a patch. Then tag it as activity2-integration so we can review.