I want to show a subscribe/unsubscribe link on a forum topic list page, along with each of the topics in the list. I have all the info for the subscribe link in the $topic variable in mytheme_preprocess_forum_topic_list():
foreach ($variables['topics'] as $id => $topic) {
Assuming that I want to call notifications_get_link() to get the unsubscribe link, how can I obtain the subscription id (SID) for any existing subscription for the topic node?
I suppose I ought to call notifications_user_get_subscriptions(), but the documentation is a bit thin. An example would be great.