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

Smarter friend request mod

11/07/2009 12:35 AM
662 0 5
This mod smartens the friend request process (at least I think so).
 
Currently (at least in 2.5.3) if:
Member A adds Member B as friend
Member B comes and adds Member A as friend (not by accepting existing request from Member A)
Member B gets a message saying "you have already added this member" when in fact they haven't - Member A did the adding before.
 
This mod changes the above to:
Member A adds Member B as friend
Member B comes and adds Member A as friend (not accepts existing request from Member A
Member A and Member B are now friends and live happily ever after.
 
The mod:
 
In lib.account.friends.php
 
Find:
PHP
$result = $DB->query("SELECT friend_id, request_date, pending FROM " . DB_PREFIX . "friends WHERE ( (friend_id='$id' AND member_id='" . $SESSION->conf['member_id'] . "') OR (member_id='$id' AND friend_id='" . $SESSION->conf['member_id'] . "') ) LIMIT 1");

Replace with:
PHP

$result = $DB->query("SELECT friend_id, member_id, request_date, pending FROM " . DB_PREFIX . "friends WHERE ( (friend_id='$id' AND member_id='" . $SESSION->conf['member_id'] . "') OR (member_id='$id' AND friend_id='" . $SESSION->conf['member_id'] . "') ) LIMIT 1"); //MOD

Find:
PHP

elseif ( $obj->request_date > (time()-60*60*72) )
 
                {
 
Add after:
PHP

//MOD START
if ( $obj->member_id == $id) {
                               
        redirect(VIR_PATH . ($PREFS->conf['fancy_urls'] ? "account/friends/accept/$id/" : "index.php?m=account_friends&p=accept&id==$id"));
                       
}
//MOD END
 

And that is it!

Comments

adboy

  • Posted on 09/05/2010 11:39 AM
Great. Thx. Works in 2.5.7 as well:)

Zoli

  • Posted on 11/07/2009 04:55 AM
Working well,
thx

firesgame

  • Posted on 11/07/2009 03:07 AM
This is not only for 253 but 255 too. The same Code.

radioact

  • Posted on 11/07/2009 01:42 AM
Nice and elegant improvement, mister.

idealists

  • Posted on 11/07/2009 12:36 AM
Haha, I didn't realise large was that large :)

Log in to leave a comment