UseBB Community

The official board for UseBB help and discussion

UseBB Community » Resources & Customization » rel="nofollow" in member profiles? (patch!)

rel="nofollow" in member profiles? (patch!)

Moderators: Gaia.

Page: 1

Author Post
Member
Registered: Jun 2005
Posts: 6
Location: Uetersen (near Hamburg)
I got patched the profile.php file for enabling/disabling rel="nofollow" in member profiles. This would fight against registrations which have only the purpose to get higher listed in Google. Have a closer look on my code:


$target_blank = ( $functions->get_config('target_blank') ) ? ' target="_blank"' : '';
$rel_nofollow = ( $functions->get_config('rel_nofollow') ) ? ' rel="nofollow"' : '';

$template->parse('profile', 'various', array(
'title' => sprintf($lang['Profile'], unhtml(stripslashes($profiledata['displayed_name']))),
'username_v' => $username,
'userid_v' => $_GET['id'],
'real_name_v' => unhtml(stripslashes($profiledata['real_name'])),
'level_v' => $level,
'rank_v' => unhtml(stripslashes($profiledata['rank'])),
'avatar_v' => $avatar,
'regdate_v' => $functions->make_date($profiledata['regdate']),
'posts_v' => $profiledata['posts'],
'postsperday_v' => $posts_per_day,
'searchposts' => '<a'.$rel_nofollow.' href="'.$functions->make_url('search.php', array('author' => urlencode(unhtml(stripslashes($profiledata['displayed_name']))))).'">'.$lang['SearchMembersPosts'].'</a>',
'lastlogin_v' => $last_login,
'age_v' => $age,
'location_v' => unhtml(stripslashes($profiledata['location'])),
'website_v' => ( !empty($profiledata['website']) ) ? '<a'.$rel_nofollow.' href="'.unhtml(stripslashes($profiledata['website'])).'"'.$target_blank.'>'.unhtml(stripslashes($profiledata['website'])).'</a>' : '',
'occupation_v' => unhtml(stripslashes($profiledata['occupation'])),
'interests_v' => unhtml(stripslashes($profiledata['interests'])),
'signature_v' => $functions->markup($functions->replace_badwords(stripslashes($profiledata['signature'])), $functions->get_config('sig_allow_bbcode'), $functions->get_config('sig_allow_smilies')),
'email_v' => $functions->show_email($profiledata),
'msnm_v' => ( preg_match(EMAIL_PREG, $profiledata['msnm']) ) ? '<a'.$rel_nofollow.' href="http://members.msn.com/'.$profiledata['msnm'].'"'.$target_blank.'>'.$profiledata['msnm'].'</a>' : unhtml(stripslashes($profiledata['msnm'])),
'yahoom_v' => ( !empty($profiledata['yahoom']) ) ? '<a'.$rel_nofollow.' href="http://edit.yahoo.com/config/send_webmesg?.target='.unhtml(stripslashes($profiledata['yahoom'])).'"'.$target_blank.'>'.unhtml(stripslashes($profiledata['yahoom'])).'</a>' : '',
'aim_v' => ( !empty($profiledata['aim']) ) ? '<a'.$rel_nofollow.' href="aim:goim?screenname='.unhtml(stripslashes($profiledata['aim'])).'&amp;message=Hi.+Are+you+there?">'.unhtml(stripslashes($profiledata['aim'])).'</a>' : '',
'icq_v' => ( valid_int($profiledata['icq']) ) ? '<a'.$rel_nofollow.' href="http://www.icq.com/whitepages/about_me.php?Uin='.intval($profiledata['icq']).'"'.$target_blank.'>'.intval($profiledata['icq']).'</a>' : unhtml(stripslashes($profiledata['icq'])),
'icq_status' => ( valid_int($profiledata['icq']) ) ? '<img'.$rel_nofollow.' src="http://web.icq.com/whitepages/online?icq='.intval($profiledata['icq']).'&amp;img=25" alt="'.intval($profiledata['icq']).'" />' : '',
'jabber_v' => unhtml(stripslashes($profiledata['jabber'])),
'skype_v' => unhtml(stripslashes($profiledata['skype']))
));
Developer
Registered: Apr 2004
Posts: 2215
Location: Belgium
Could you also put it in the mods tracker?

Thanks.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog

Page: 1

UseBB Community » Resources & Customization » rel="nofollow" in member profiles? (patch!)

UseBB Community is powered by UseBB 1 Forum Software