Problem/Motivation

Users report they don't know what they're following when they click Follow. That is, am I following *this one Node* or am I following the Group to which the node belongs.

Proposed resolution

Add the Content Type label to the button so that the text reads something like "Follow Post" or "Follow Group".

Comments

rgchi’s picture

Status: Active » Needs review

Solution:

So I'm wrapping this up in a module for our deploy that does the following.

hook_flag_alter(&$flag) {
    $flag->flag_short = $flag->flag_short . ' ' . $flag->content_type;
}

The end result is akin to this...
Only local images are allowed.

rgchi’s picture

Title: Add Content Type to the Follow buttons » Update again...

Based on a this ticket, I changed to the following in hook_flag_alter(&$flag):

 $extra_text_of_type = "";
    switch ($flag->content_type) {
      case 'node': 

        $possible_content_type = implode(',', $flag->types);
       
        if (strpos($possible_content_type, 'post') !== false) {
           $extra_text_of_type = t(" this post");
        } 
        elseif (strpos($possible_content_type, 'group') !== false) {
           $extra_text_of_type = t(" this group");
        } 
        else {
           $extra_text_of_type = "";
        }        
        break;
      
      case 'user':
        $extra_text_of_type = t("user");
        break;
      
      default: 
         $extra_text_of_type = "";

    }

    $flag->flag_short = t('Follow @type', array('@type' => $extra_text_of_type));
    $flag->unflag_short = t('Unfollow @type', array('@type' => $extra_text_of_type));

ezra-g’s picture

Title: Update again... » Make "Follow" text more clear
Status: Needs review » Active
Issue tags: +Usability, +user experience

Retitling with a useful title and setting back to active. Thanks for the suggestion!

lsolesen’s picture

Version: 7.x-3.3 » 7.x-3.13
Issue summary: View changes