[development] Theme subscription's links from notifications
Salvatore De Paolis
iwkse at gmx.com
Mon Feb 8 22:33:10 UTC 2010
Hi,
i'd like to theme the links created by the notifications module, like subscribe
to content, type, author, ecc.
For doing that i'm try to hook the link_alter and overwrite the link in the way:
global $user;
$options = notifications_ui_subscribe_options($user, 'node', $user);
$i = 0;
foreach ($options as $index => $option) {
$notify = 'notifications_' . $i;
if ($option['type'] == 'thread') {
$links[$notify]['title'] = "New title";
$links[$notify]['attributes']['title'] = "New attribute title";
}
if ($option['type'] == 'nodetype') {
$links[$notify]['title'] = "New title";
$links[$notify]['attributes']['title'] = "New attribute title";
}
...
$i++;
}
I have two issues with this code. First, the notifications_ class is also used
with the taxonomy module, and this means when i do this change the Tags is
affected too.
Second, $option['type'] == 'nodetype' would match all types (profile, group,
ecc) and I can't really switch from that.
Anyone know a better way or some more info to make this code to work?
Thanks in advance
Sal
More information about the development
mailing list