I stole donxoops post and modified it do have pm's listed, as well as a link to yahoo messenger so you can send messages that way if they have an acct. As the previous poster stated, don't used this if you have a ton of users since it has no paging.
If anyone could show me how to modify it to add paging I'd be tickled, but at this time I'm not a good enough programmer to have a clue how to do that.
It shouldn't be too difficult to add an icq online/offline indicator as well as a yahoo one.
Hope this helps someone out
Oh BTW, I am using this with the TinyD module
global $xoopsDB;
$query = 'SELECT A.uid,uname AS U_Name, name AS Full_Name, user_from AS Location, A.user_yim AS Yahoo, A.uid AS User FROM xoops_users AS A LEFT JOIN xoops_groups_users_link AS B ON A.uid = B.uid
WHERE (
B.groupid =2
)
ORDER BY A.uname';
$result = mysql_query($query);
// Top message, and start of table including column heads
echo "<b>· Registered Members ·</b>
<li>Click on your name and edit your profile
<li>Click a yahoo id to send a message<hr />";
echo "<table cellpadding=0 border=0>
<tr>
<th>User Name</th>
<th>Full Name</th>
<th>PM</th>
<th>Yahoo</th>
<th>Location</th>
</tr>";
// loop through the data and echo each cell 1 row per loop
while ($data = mysql_fetch_object($result)) {
echo "<tr ><td><a href=\"/userinfo.php?uid=$data->uid\">$data->U_Name</a></td>";
echo "<td >$data->Full_Name</td>";
// I did the pm part in chunks rather than one big echo because I found it easier to
// see where I left stuff out or screwed things up ;)L.
echo "<td> <a href=\"http://hshs85.cloudy.biz/pmlite.php?send2=1&to_userid=$data->User\" target=_blank";
// This part should degrade nicely. If a user has javascript turned off
// it'll return false and open the window anyway though size may not be default 450 x 380
echo " onclick=\"window.open(this.href,'pms','width=450,height=380');return false;\"";
echo "><img src=\"http://hshs85.cloudy.biz/images/icons/pm.gif\" alt=\"Send Private Message to $data->U_Name\" /></a></td>";
if ($data->Yahoo !="") {
echo "<td ><center><A HREF=\"http://edit.yahoo.com/config/send_webmesg?.target=$data->Yahoo\">
$data->Yahoo</a></center></td>";
}
else {
echo "<td><center>Not Listed</center></td>";
}
if ($data->Location!="") {
echo "<td >$data->Location</td></tr>";
}
else {
echo "<td>Not Listed</td></tr>";
}
}
echo "</table>";