By default only the owner of a profile can see a link to his own friends:
This is the code for this function:
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "[b]Buddies:[/b] $nob[0]
";
example: My Buddies: 10
Now I want, that everybody can see, who is my friend. I want to use a link to my friends, which is shown to everybody in my profil, but it doesn't work
//////////////////////////////friends edit///////////////////////////
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "[b]1 [/b]buddies : <a accesskey=\"1\" href=\"lists.php?action=buds&sid=$sid;uid=$nob[0]\">$nob[0]</a>
";
//////////////////////////////////////////////////////////////////////////
By default only the owner of a profile can see a link to his own friends:
This is the code for this function:
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: $nob[0]
";
example: My Buddies: 10
Now I want, that everybody can see, who is my friend. I want to use a link to my friends, which is shown to everybody in my profil, but it doesn't work
//////////////////////////////friends edit///////////////////////////
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "1 buddies : <a accesskey=\"1\" href=\"lists.php?action=buds&sid=$sid;uid=$nob[0]\">$nob[0]</a>
";
//////////////////////////////////////////////////////////////////////////
good code..maybe the link to see buddies it don't works because there is somethin'wrong in php variables
i don't have idea..i got my trubles trying to put hour/date in chatrooms message..
sometmes it's real hard making changes in others one script
I want to test your script, but it's a little bit difficult. The first part of your script must be put in index.php and the second one in lists? What kind of error is that?
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: <a href=\"lists.php?action=ubuds&who=$who&sid=$sid\">$nob[0]</a>
";
the error is that it shows the user aswell as there buddies lol
it doesnt really matter to me so i havent bothered to code it out lol
I think actually, there is no way to show users' buddies.
@Inca
Can you tell me, where I must paste your code? First part of code in index.php und the secound one in lists.php?
I edited my lists.php, but the script don't work. It's such the same as my simple link does. If I klick to a user, nothing else as users name is show in his buddy-list. Why do you have a second lists-file? A few links go to lists2.php
edit: script works now, but why the second lists.php? Is this a must have oder can I edit the code from lists2.php in list.php in the links?
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mw_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: <a href=\"../friends/".$swsid."action=member&who=$who\">$nob[0]</a>
";
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mw_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: <a href=\"../friends/".$swsid."action=member&who=$who\">$nob[0]</a>
";
this is my code :P
but you need having a folder called "friends" to use it..
so u want every1 2 see ur buddy list lol thats kinda weird but not that hard buddylist runs off ur own uid jus make another n run it off the users uid easy lol
where ever it says list2.php change to list.php :)
I have done this directly after I add your code in my lists.php, but still I thought I ask you about lists2.php.
I had a little problem with your code. The default value of items_per_page is 5. Now one of my users have 10 buddies. The system will only show 5 buddies per page. This is almost correctly, but the link "next" (next page) doesn't shown. I check your code a few times, but I cannot detect a bug in code. Everthing seems to be ok. What is wrong with the code?