change the link for "Friend Requests"

Hey guys.  As default, "Friend Requests" goes to mysite.com/communicator.php?person_switcher=to&communicator_mode=friends_requests but I would like to change the link to mysite.com/communicator.php.  The reason is if you go to that default link. you see two same "Friend Requests" blocks.  Friend Request block is already added in the page builder so it's best to go straight to communicator.php instead.  Also, you see the number (6) next to it. Please tell me how to make it count for people who requested you, not the people who requested you PLUS your requests. Example, 3 people requested me and i requested 3 different people. I want it to show (3) there NOT (6) as it's shown up there.   It's very confusing because once you click on it, you only see 3 people who are requesting YOU.  Is it possible to fix this somewhere? 

Quote · 1 Feb 2013

Good call! I would like to see this change as well.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2013

Ah I found where to change the link.  It's in template/base/view_friends_member_menu_friends_list.html

Look for communicator.php?person_switcher=to&communicator_mode=friends_request

Change it to communicator.php 

ahh much better!  now I see one friend request block.  :D  Can anyone please please tell me where to fix that number?  :/

Quote · 1 Feb 2013

The file you are looking for is:

 

/inc/classes/BxDolFriendsPageView.php

 

and the function in that is:

 

function get_member_menu_bubble_friend_requests($iMemberId, $iOldCount = 0)

 

It's a pretty complicated SQL statement but I THINK if you remove:

 

AND `tf`.`Check`='0'

 

It will just show the total that are requesting YOUR friendship... you might know more about SQL than I do though, have a look at it.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 2 Feb 2013

I would like to ad that in v 7.0.9 user have the possibility to check to whom he already sent Frend Request and if one trys to send it agin there was notification that Frend request is still pending.

Now in ver. 7.1 we do not have this function any more?? Or am I missing something??

"When things get tough the tough get going..."
Quote · 2 Feb 2013

 It looks like it's in the right page.  :)  

I think that function with SQL is only for the red bubble. I can be wrong. It's not quite clear.  The red bubble is showing "3" right now and it's the correct number but I still see (6) inside.

Looks like this is the code that will show the number inside of (x). 

$iFriendsRequests = getFriendNumber($iMemberId, 0) ;

If i make something like this... $iFriendsRequests = '3' ; it will show (3) but i don't know where that SQL coming from.    Undecided

The file you are looking for is:

 

/inc/classes/BxDolFriendsPageView.php

 

and the function in that is:

 

function get_member_menu_bubble_friend_requests($iMemberId, $iOldCount = 0)

 

It's a pretty complicated SQL statement but I THINK if you remove:

 

AND `tf`.`Check`='0'

 

It will just show the total that are requesting YOUR friendship... you might know more about SQL than I do though, have a look at it.

 

Quote · 2 Feb 2013

 Oh yeah, your right Embarassed

 

What I meant to say was look in:

 

/inc/profiles.inc.php

 

For:

 

function getFriendRequests($iID)

 

 

 It looks like it's in the right page.  :)  

I think that function with SQL is only for the red bubble. I can be wrong. It's not quite clear.  The red bubble is showing "3" right now and it's the correct number but I still see (6) inside.

Looks like this is the code that will show the number inside of (x). 

$iFriendsRequests = getFriendNumber($iMemberId, 0) ;

If i make something like this... $iFriendsRequests = '3' ; it will show (3) but i don't know where that SQL coming from.    Undecided

The file you are looking for is:

 

/inc/classes/BxDolFriendsPageView.php

 

and the function in that is:

 

function get_member_menu_bubble_friend_requests($iMemberId, $iOldCount = 0)

 

It's a pretty complicated SQL statement but I THINK if you remove:

 

AND `tf`.`Check`='0'

 

It will just show the total that are requesting YOUR friendship... you might know more about SQL than I do though, have a look at it.

 

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 2 Feb 2013

 

 Oh yeah, your right Embarassed

 

What I meant to say was look in:

 

/inc/profiles.inc.php

 

For:

 

function getFriendRequests($iID)

 

 

 It looks like it's in the right page.  :)  

I think that function with SQL is only for the red bubble. I can be wrong. It's not quite clear.  The red bubble is showing "3" right now and it's the correct number but I still see (6) inside.

Looks like this is the code that will show the number inside of (x). 

$iFriendsRequests = getFriendNumber($iMemberId, 0) ;

If i make something like this... $iFriendsRequests = '3' ; it will show (3) but i don't know where that SQL coming from.    Undecided

The file you are looking for is:

 

/inc/classes/BxDolFriendsPageView.php

 

and the function in that is:

 

function get_member_menu_bubble_friend_requests($iMemberId, $iOldCount = 0)

 

It's a pretty complicated SQL statement but I THINK if you remove:

 

AND `tf`.`Check`='0'

 

It will just show the total that are requesting YOUR friendship... you might know more about SQL than I do though, have a look at it.

 

 

 So does this work?

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 2 Feb 2013

No i'm still struggling.  Frown  

Quote · 2 Feb 2013

 

No i'm still struggling.  Frown  

 

Sorry, I thought you just needed to know where it was and you could do the rest. So if you want that number to ONLY show the number of requests people sent YOU then open:

 

/inc/profiles.inc.php

 

and remove this from the getfriendrequests function:

 

    if ($iCount > 0) {

        $sqlQuery = "SELECT count(*) FROM `sys_friend_list` as f LEFT JOIN `Profiles` as p ON p.`ID` = f.`ID` WHERE f.`Profile` = {$iID} AND f.`Check` = '0' AND p.`Status`='Active'";

        $iCount = (int)db_value($sqlQuery);

    }

 

When you're done the function should look like this:

 

function getFriendRequests($iID)

{

    $iID = (int)$iID;

    $sqlQuery = "SELECT count(*) FROM `sys_friend_list` WHERE `Profile` = {$iID} AND `Check` = '0'";

    $iCount = (int)db_value($sqlQuery);

    return $iCount;

}

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 2 Feb 2013

Is it working for you?  I tried this and I'm still seeing this "Friend Requests (6)".  When i click that link, it goes to the communicator.php page and I see 3 requests. (those who are requesting me). Number "3" is what I want to see in (3).  Maybe it's my cache issue.... Let me check.  hmmm

Quote · 3 Feb 2013

I was about to ask if you cleared the cache..

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 3 Feb 2013

No luck. :(  This is what it should be.. right?  

Quote · 3 Feb 2013

I even created a new account and requested "Patrick" to see if it would recalculate the number.  Now i see (7) but i see 4 requesting me in communicator.php.   Undecided

Quote · 3 Feb 2013

Ok, so I should NEVER assume the boonex functions are what they sound like. You would THINK getFriendRequests is where the number of friend requests would be pulled from but NO, it's coming from getFriendNumber...

 

So change this:

 

$sqlQuery = "SELECT COUNT(`f`.`ID`)

FROM 

(SELECT `ID` AS `ID` FROM `sys_friend_list` WHERE `Profile` = '{$iID}' AND `Check` = {$iFrStatus}

UNION

SELECT `Profile` AS `ID` FROM `sys_friend_list` WHERE `ID` = '{$iID}' AND `Check` = {$iFrStatus})

AS `f` 

    INNER JOIN `Profiles` AS `p` ON `p`.`ID` = `f`.`ID`

    WHERE 1 {$sqlAdd}";


To this:

 

$sqlQuery = "SELECT count(*) FROM `sys_friend_list` WHERE `Profile` = {$iID} AND `Check` = '0'";

 

I tested it this time, it should work Laughing

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 3 Feb 2013

haha i'm still seeing the same number!  I got excited and cleared cache like 1000 times!  still stuck!  Do you mind if you give me that profile.inc.php file and I'll replace it.  That way i know it SHOULD work. Undecided

Quote · 3 Feb 2013

never mind!!!!!  IT WORKS!  oh my god!  this is the way it SHOULD be.  you rock!!

Quote · 3 Feb 2013

You're welcome! Sorry about all the revisions, the Dolphin code confounds me sometimes.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 3 Feb 2013

 no no not at all!!  The Dolphin code is ALWAYS confusing!!  I think I see a little problem.  My other account requested "Patrick" and now I see "Friend Requests (4)".  Perfect! It's working but now i see "Online Friends (4)"  the same number from friend request. I'm the only one online right now.  haha  any ideas?

You're welcome! Sorry about all the revisions, the Dolphin code confounds me sometimes.

 

Quote · 3 Feb 2013

If this can't be done, i have a better idea.  I can just remove "Online Friends" for now and let them use Flashcoms Messager instead.  It has online friends there anyway.  :)

But seriously, i think boonex needs to FIX this.  I know it's not a bug but it makes no sense at all. 

Quote · 3 Feb 2013

Ok, so I just had one of those moments where I realized that there was a MUCH simpler way to do something I had just put a lot of work into, lol. 

 

I could be wrong but I think this might have all been because of an small miss-type on Boonex's part. To get the correct number of requests to show on the member menu you don't have to do any of the things I've suggested.. all you have to do is open /inc/classes/BxDolFriendsPageView.php and change this:

 

        // get all friends requests ;

        $iFriendsRequests = getFriendNumber($iMemberId, 0) ;

 

To this:

 

        // get all friends requests ;

        $iFriendsRequests = getFriendRequests($iMemberId, 0) ;

 

I could be wrong but I think they just typed the wrong function there. I was wondering why there was a function specifically to return the number of friend requests pending but they didn't use it, lol..

 

So long story short (too late) if you undo everything we've done and then make that small change everything should work. It also won't mess up the number of online friend showing or anywhere else the friends number is displayed. God I hope anyone trying to do this starts at the BOTTOM of the thread, lol.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 3 Feb 2013

Is this for D7.1? I cannot find $iFriendsRequests = getFriendNumber($iMemberId, 0) ; in /inc/profiles.inc.php.

Stuart

Ok, so I just had one of those moments where I realized that there was a MUCH simpler way to do something I had just put a lot of work into, lol. 

 

I could be wrong but I think this might have all been because of an small miss-type on Boonex's part. To get the correct number of requests to show on the member menu you don't have to do any of the things I've suggested.. all you have to do is open /inc/profiles.inc.php and change this:

 

        // get all friends requests ;

        $iFriendsRequests = getFriendNumber($iMemberId, 0) ;

 

To this:

 

        // get all friends requests ;

        $iFriendsRequests = getFriendRequests($iMemberId, 0) ;

 

I could be wrong but I think they just typed the wrong function there. I was wondering why there was a function specifically to return the number of friend requests pending but they didn't use it, lol..

 

So long story short (too late) if you undo everything we've done and then make that small change everything should work. It also won't mess up the number of online friend showing or anywhere else the friends number is displayed. God I hope anyone trying to do this starts at the BOTTOM of the thread, lol.

 

There are none so blind as those that will not see.
Quote · 3 Feb 2013

Stuart, it is for 7.1 but it's actually in /inc/classes/BxDolFriendsPageView.php..

 

Sorry, I'll get this straight eventually, lol. 

 

Is this for D7.1? I cannot find $iFriendsRequests = getFriendNumber($iMemberId, 0) ; in /inc/profiles.inc.php.

Stuart

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 3 Feb 2013

Many thanks!

Stuart

There are none so blind as those that will not see.
Quote · 3 Feb 2013

You're welcome, glad to help.

 

Many thanks!

Stuart

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 3 Feb 2013

Yes!  I think you got it!!  Man how can i thank you! Laughing

Edit:  too bad you can't go back and edit them.  lmao You're great.  ;)

Quote · 3 Feb 2013

 

I could be wrong but I think they just typed the wrong function there. I was wondering why there was a function specifically to return the number of friend requests pending but they didn't use it, lol..

 Does this not surprise you? Thanks!

This should be corrected by Boonex, no more confused members..

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 3 Feb 2013

Contact AlexT and request a ticket for this.

Geeks, making the world a better place
Quote · 3 Feb 2013

How can i load the friends request in the member top submenu instead of the link to .../communicator.php?person_switcher=to&communicator_mode=friends_requests?

Why use an extra step if it could much easier? Right?

Quote · 14 Jun 2014

When you join my site, you can allow others to auto-friend you if they wish. The friends mod is a site killer in Boonex....

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 16 Jun 2014

 how?

When you join my site, you can allow others to auto-friend you if they wish. The friends mod is a site killer in Boonex....

 

yes, I searched before asking....
Quote · 16 Jun 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.