How to alter message for example for story node type?
How to detect node type with $type variable? The hook_activity_messages_alter is not documented and DEVELOPERS.txt is outdated (hook_activity_records_alter changed to hook_activity_record_alter and parameters changed too).

Comments

sirkitree’s picture

Title: How to alter message? » Update hook_activity_messages_alter() documentation
Assigned: Unassigned » sirkitree
Category: support » task

I will update the documentation with the changes in hook_activity_records_alter() and properly document hook_activity_messages_alter() - however, what you are trying to do (detect a node type) within hook_activity_messages_alter() will not be possible currently.

That being said - we've anticipated this scenario and have been thinking for a few days on how to handle it. We're basically going to have to extend the API to handle multiple object types, but have no solid plan outlined just yet. Scott has a couple of ideas on how to go about it that maybe he can outline here for us.

I'll update back when I have the documentation changes committed.

sirkitree’s picture

Status: Active » Fixed
mrjavum’s picture

sirkitree
thanks!

mrjavum’s picture

The previous variant (hook_activity_records_alter) was more usable for alter messages throw tokens... (IMHO)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.