You could probably add Part 2 of this mod to member pictures and other member pages too, with no - or little modification.
Please backup, backup, backup. And test.. (I've only tested it a little).
Part 1 in lang.core.php AFTER "You cannot access this page.",
ADD:
"no_access_member_profile" => //MOD
"You cannot access this member's profile.", //MOD
Part 2 in lib.member_profile.php BEFORE " // Get connections " comment section, ADD:
//MOD START - PREVENT VIEWING PROFILE IF YOUR BLOCKED
//------------------------------------------------
// Get blocked
//------------------------------------------------
$result = $DB->query("SELECT blocked_id FROM " . DB_PREFIX . "blocked WHERE (blocked_id='" . $SESSION->conf['member_id'] . "' AND member_id='" . $profile_obj['member_id'] . "') LIMIT 1");
//------------------------------------------------
// Check if resultset contains any rows
//------------------------------------------------
if ($DB->num_rows($result))
{
$TEMPLATE->set_message("error", ($LANG['core']['no_access_member_profile']), 0, 0);
redirect(VIR_PATH);
}
//MOD END
Oh yeah, for this mod to work (as it is above), you will need to make sure you have included the message template on your homepage.tpl somewhere, like:
Enjoy





Comments
Log in to leave a comment