View Full Version : User has "X" Friends.
g354u2nv
11-26-2005, 11:23 PM
I added a line in profile_index that displays where the [ADD ME] link is. It basically pulls the total amount of friends. However, when a user is not logged in it displays 0 for friends. Here is the code I used.
Content visible to registered users only.
and..
Content visible to registered users only.
What do I need to add to allow the total to show up for users not logged in? Thanks in advance AGAIN! =)
Yeah you could use that code just switch the $VAR[4] to $c[user] if you want it to display on a persons profile.
In the site you will see $VAR[4] in many areas and is used to called the user who is logged in, so when adding that to the profile page your a calling how many friends the one who is online has not the actual person you are viewing.
Also the nextpage() function is used to display the "Prev - Next" page which you can find in the browse,poll section etc... and uses alot of extra resource that you dont need if you just want to find the total friends for a user.
If you just want to find out how many total friends a user has you can use something like this:
Content visible to registered users only.
and then add
Content visible to registered users only.
i think this is what you had in mind, not to sure. :D
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.