What is vldPersonals?

vldPersonals is a very easy to use dating/social software. It allows you to create a fully functioning & modern dating website in a matter of minutes. If You think it's too complicated - check vldPersonals!
Know more about how You can become a dating website owner

What is vldCrowd?

vldCrowd.com is the biggest unofficial community of vldPersonals owners. It is a place to share ideas and thoughts about Your dating website. It is a place to answer questions and receive answers.
Do You own a vldPersonals license? Don't hesitate and join!

Connect Today

Community members help each other to take their dating websites to the next level. Can You make your vldPersonals website better? Join and find out...

Connect With More Than 500 Dating Website Owners! Sign Up Today

Another block mod bYtes the dust!

11/07/2009 05:38 AM
303 0 0
This mod is aimed at preventing member's viewing profiles (when they are logged in) of member's whom have blocked them.
 
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:
PHP

"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:
PHP

//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:
PHP
<!-- INCLUDE message.tpl -->

Enjoy