Closed (fixed)
Project:
Subscriptions
Version:
5.x-2.0-beta5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
25 Dec 2007 at 19:12 UTC
Updated:
22 Feb 2008 at 01:11 UTC
Hello.
I need to disable the opportunity to subscribe to a specific users node.
To do this, I remove a few lines in the files:
subscriptions_taxonomy.module:
function _subscriptions_taxonomy_node_options($account, $node) {
$options = array();
$vids_to_omit = variable_get('subscriptions_omitted_taxa', array());
foreach ($node->taxonomy as $tid => $term) {
// Taxonomy term
if (in_array($term->vid, $vids_to_omit)) {
continue;
}
$options['tid'][] = array(
'name' => t('To posts in %term', array('%term' => $term->name)),
'params' => array('value' => $tid),
);
// $options['tid'][] = array(
// 'name' => t('To posts in %term by %name', array('%term' => $term->name, '%name' => $node->name)),
// 'params' => array('value' => $tid, 'author_uid' => $node->uid),
// );
$options['tid']['weight'] = -1;
}
return $options;
}
subscriptions_content.module:
function _subscriptions_content_node_options($account, $node) {
// Default node, field are the first three indexes, but they can be overridden in params
// Thread
$options['nid'][] = array(
'name' => t('Subscribe to this post'),
'params' => array('value' => $node->nid)
);
$options['nid']['weight'] = -4;
$unlisteds = variable_get('subscriptions_unlisted_content_types', array());
if ((user_access('subscribe to content types', $account) && !in_array($node->type, $unlisteds)) || user_access('subscribe to all content types', $account)) {
// Content type
$type_name = node_get_types('name', $node->type);
$options['type'][] = array(
'name' => t('To %type posts', array('%type' => $type_name)),
'params' => array('value' => $node->type),
);
// Content type and author
// $options['type'][] = array(
// 'name' => t('To %type posts by %name', array('%type' => $type_name, '%name' => $node->name)),
// 'params' => array('value' => $node->type, 'author_uid' => $node->uid),
// );
$options['type']['weight'] = -2;
}
return $options;
}
Please make such a setting: "subscription to the users node" in the control panel.
Comments
Comment #1
Dimm commentedSorry for the mistakes in the text.
I say poorly in English.
Comment #2
salvisWhy do you need to disable that?
Comment #3
Dimm commentedThat's no need for my site.
Comment #4
salvisYes, but does it hurt?
Note that the subscribe by author options are suppressed for content types that don't show the poster's name.
Comment #5
salvis