I needed to use this module in conjunction with module_grants and I found I needed to make the following modification to the _talk_access() function in talk.module to allow the Talk tab to be visible on unpublished nodes.
/**
* Helper item for talk_menu: access callback.
*/
function _talk_access($node) {
if (module_exists('module_grants')) return ($node->nid && _talk_node_comment_value($node) && talk_activated($node->type) && user_access('access comments') && module_grants_node_access('view', $node) && (variable_get('talk_page_no_comments', TRUE) || $node->comment_count));
else
return ($node->nid && _talk_node_comment_value($node) && talk_activated($node->type) && user_access('access comments') && node_access('view', $node) && (variable_get('talk_page_no_comments', TRUE) || $node->comment_count));
}
Don't know if this sort of thing would be able to be included in future versions of Talk.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | talk-885156.patch | 1007 bytes | jzornig |
| #1 | talk-885156.patch | 1 KB | jzornig |
Comments
Comment #1
jzornig commentedI've rolled a patch for this agains the 1.7 release. I hope it could make it into the 1.8 release.
Comment #3
jzornig commentedUpdated patch.
Comment #5
jarodms commented