Active
Project:
Notifications
Version:
6.x-2.3
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Sep 2011 at 22:33 UTC
Updated:
19 Nov 2011 at 20:28 UTC
I've got the realnames module installed and in the subscriptions block it has a checkbox with "Posts by markshep" next to it, but I want it to say "Posts by Mark Sheppard" instead. Here's a patch which seems to work:
--- sites/all/modules/notifications/notifications_content/notifications_content.module~ 2010-10-21 07:34:59.000000000 +0000
+++ sites/all/modules/notifications/notifications_content/notifications_content.module 2011-09-26 22:23:27.000000000 +0000
@@ -608,8 +608,9 @@
}
// Author
if (notifications_content_type_enabled($node->type, 'author')) {
+ $user = user_load(array('uid' => $node->uid));
$options[] = array(
- 'name' => t('Posts by @name', array('@name' => $node->name)),
+ 'name' => t('Posts by @name', array('@name' => theme("username", $user))),
'type' => 'author',
'fields' => array('author' => $node->uid),
);
However I know virtually nothing about Drupal internals so there could well be a better way of doing this!
Comments
Comment #1
Littlebob commentedI'm also having the exact same problem. Does anyone else here see a problem with the above method? I only see the slight overhead of the extra user lookup.