Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Snippit:: Shows who has sent you pm's and how many you have.

Quote

Mod Name: Snippit:: Shows who has sent you pm's and how many you have. (User Info Panel Mod)
Filename: ---
Author: Dark Fusion
Version: v1.00 (PHP-Fusion V7.02)
Developer: DrunkeN
Site: http://www.dark-fusion.se

Quote

License:
This program is released as free software under the
Affero GPL license. You can redistribute it and/or
modify it under the terms of this license which you
can read by viewing the included agpl.txt or online
at http://www.gnu.org/licenses/agpl.html. Removal of this
copyright header is strictly prohibited without
written permission from the original author(s).

Quote

DESCRIPTION:
This modification will Show who has sent you pm's and how many you have in a list with the usernames and how many PM's you have from the user.

Quote

INSTALLATION:
Open infusions/user_info_panel/user_info_panel.php

Find
CodeDownload  
      
echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong>\n";
echo "</div>\n";




Add this after
CodeDownload  
      $result = dbquery("SELECT m.message_id, 
                   m.message_read,
               m.message_datestamp,
                u.user_id,
               u.user_name,
               u.user_status,
               u.user_avatar
               FROM ".DB_MESSAGES." m
                  LEFT JOIN ".DB_USERS." u ON m.message_from=u.user_id
               WHERE message_to='".$userdata['user_id']."' AND message_folder='0' AND message_read='0'
               GROUP BY u.user_id DESC LIMIT 0,10"
             
);
$senders = array();
if(dbrows($result)){
while ($pmdata = dbarray($result)) {
      $senders[] = array($pmdata['user_id'], $pmdata['user_name'], $pmdata['user_status']);
   }
if (count($senders)) {
   $i = 1;
   echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>\n";
   echo "<td class='tbl2'><strong>From</strong></td>";
   echo "<td align='right' class='tbl2'><strong>Messages</strong></td>";
   echo "</tr>";
   while (list($key, $sender) = each($senders)) {
       $pmcount = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_from='".$sender[0]."' AND message_read='0'");
      echo "<tr>\n<td>".profile_link($sender[0], $sender[1], $sender[2])."</td>\n<td align='right'>".$pmcount." ".($pmcount == 1 ? $locale['global_126'] : $locale['global_127'])."</td>\n</tr>\n";
      $i++;
   }
   echo "</table>";
}
   }



[/code]

Save and upload user_info_panel.php

Demo: See attached images.
DrunkeN attached the following file:
whoaspm.png [10.05kB / 47 Downloads]
pretty nice, and looks useful.
great!!!
Thread Information
Author
Replies
3 posts
Views
3,240 times
Last Post
Last updated on 6 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: PolarFox, DrunkeN, jikaka