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
)
);
}
Comments
Comment #1
kbahey commentedPlease 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.
Comment #2
soupp commentedThe patch is attached now. Sorry that missed it.
Comment #3
kbahey commentedThank you .
Committed to 5.x-2.x and 6.x-1.x.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.