Even if I set the flag "email_node" to show on my content page for all logged in users, it doesn't show on my nodes.
I tried all the option to show it on teaser, full content, links and even via code.
I know that it is possible to change the value of this flag on user notifications configuration page, but I need it also on node page itself.
I have no problem to display the comons_follow_node, I don't understand what is different with "email_node" flag ?

Comments

heyyo’s picture

The permission of this flag is changed under message_subscribe module
in message_subscribe_email.module file:

function message_subscribe_email_flag_access($flag, $content_id, $action, $account) {
  if (strpos($flag->name, 'email_') === 0) {

    $entity_type = FLAG_API_VERSION == 3 ? $flag->entity_type : $flag->content_type;

    // Get the other flags on that same content.
    $user_flags = flag_get_user_flags($entity_type, $content_id, $account->uid);

    $name = str_replace('email_', '', $flag->name);
    $prefix = variable_get('message_subscribe_flag_prefix', 'subscribe') . '_';
    // Disable access to the flag when the subscribe flag is unflagged, but
    // allow unflagging.
    return $action == 'unflag' || !empty($user_flags[$prefix . $name]);
  }
}

But in commons subscribe flag is not used. Not sure what the best way to deal with that.

heyyo’s picture

Issue summary: View changes

typo

ezra-g’s picture

Title: How to show flag "email_node" on node page » Allow users to control email notifications when viewing contetn
Issue summary: View changes

Retitling to describe the functional goal here.

lsolesen’s picture

Category: Support request » Feature request