Quote:
Originally Posted by Dismounted
vBulletin currently does not store a date/time for when users become friends. Trying to add this functionality would get messy. Hopefully either: a) IB decides to add it, or b) I find an elegant way to do it.
|
Yes of course you're right but I just think it so, when sending a friend request to any user then, his/her "approve" it then, DATABASE does not work for that function? Example like this;
PHP Code:
// Make us friends
$db->query_write("
REPLACE INTO " . TABLE_PREFIX . "userlist
(userid, relationid, type, friend)
VALUES
({$vbulletin->userinfo['userid']}, $userinfo[userid], 'buddy', 'yes'),
($userinfo[userid], {$vbulletin->userinfo['userid']}, 'buddy', 'yes')
");
$db->query_write("
UPDATE " . TABLE_PREFIX . "user
SET friendcount = friendcount + 1
WHERE userid IN ($userinfo[userid], " . $vbulletin->userinfo['userid'] . ")
");
$db->query_write("
UPDATE " . TABLE_PREFIX . "user
SET friendreqcount = IF(friendreqcount > 0, friendreqcount - 1, 0)
WHERE userid = " . $vbulletin->userinfo['userid']
);
I know theres no timestamp on SQL Queries however that would be add a "X, with x friend" ... Oh I'm confusing now I'm so sorry that's just a suggestion by me. If you add that feature then we'll be so glad

thank you for replies...
Quote:
Originally Posted by Dismounted
I will have a look at the feasibility for this.
|
Well, I don't know what to say except 'thanks'! hehe

) thank you for your replies. I will wait more feature, regards...