Hey guys,

I thought it would be nice to have no-follow attribute for flag link to avoid excessive indexing by search engines.

This is the example (around lines 193-218):

    if (is_numeric($eid)) {
      $options = array('class' => 'flag_content');
  
      if (!_flag_content_check($eid, $type)) {
        // Not already flagged, flag it for admin
        $links['flag_content_add'] = array(
          'title' => t('report this page'),
          'href' => "flag_content/add/$eid/$type",
          'attributes' => array(
            'class' => 'flag_content',
            'title' => t('Notify the administrators this posting is problematic'),
            'rel' => 'nofollow' // added nofollow attribute
            )
          );
      }
      else {
        // If has admin privileges, show an unflag link
        if (user_access(FLAG_CONTENT_PERM_MANAGE)) {
          $links['flag_content_unflag'] = array(
            'title' => t('unflag'),
            'href' => "flag_content/unflag/$eid/$type",
            'attributes' => array(
              'class' => 'flag_content',
              'title' => t('Remove flagged marking'),
              'rel' => 'nofollow' //  added nofollow attribute
              )
            );
        }
CommentFileSizeAuthor
#2 flag_content-nofollow.diff779 bytessoupp

Comments

kbahey’s picture

Version: 5.x-2.8 » 5.x-2.x-dev
Status: Active » Needs work

Please create a patch against 5.x-2.x-dev using the info here http://drupal.org/patch

This will make it easier to review and commit so it is a base feature of the module.

soupp’s picture

Status: Needs work » Needs review
StatusFileSize
new779 bytes

The patch is attached now. Sorry that missed it.

kbahey’s picture

Status: Needs review » Fixed

Thank you .

Committed to 5.x-2.x and 6.x-1.x.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.