I've had to hack the module to enable this feature also on nodes.
function follow_block:
case 'user':
$type = arg(0);
switch($type) {
case 'user':
$uid = arg(1);
break;
case 'node':
$node = node_load(arg(1));
if(in_array($node->type,array("blog","publication")))
$uid = $node->uid;
break;
}
if (is_numeric($uid) && ($content = _follow_block_content($uid))) {
return array(
'subject' => _follow_block_subject($uid),
'content' => $content,
);
}
break;
A nice option would be to make an admin setting to select on which nodetypes this block should be displayed.
Comments
Comment #1
q0rban commentedThis could be accomplished pretty easily with a custom block using Drupals UI and php input format. For the block's content, set:
Set this for your block visibility:
Comment #2
fadgadget commentedHello and thanks for this solution. Is there anyway that i could block the visibility on a page '/latest'.
Thanks
Comment #3
fadgadget commentedi used something i had hanging about to only show on certain content types and it seemed to work
?>
Comment #4
q0rban commentedHi there fadgadget! It sounds like what you are looking for is Context module. It will allow you to designate a context in which this block should display, including all pages but /latest, and not on certain node types. If that's not an option for you, you'll have to use the Php evaluator like comment 1 and check the node type, or do this logic in your own theme preprocess function. I would recommend you don't hack the module, in case there are security updates you need to download.