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.
Not a member yet? Click here to register.
Forgot Password?

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

Asked Modified Viewed 3,838 times
D
DrunkeN
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
asked
Member

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 (PHPFusion 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
      
echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong>\n";
echo "</div>\n";



Add this after
      $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.
Edited by DrunkeN on 16-09-2013 10:01,
DrunkeN attached the following file:
whoaspm.png [No information available / 102 Downloads]
0 replies

2 posts

P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

pretty nice, and looks useful.
0 replies
J
jikaka
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums
answered
Veteran Member

great!!!
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
D
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
J
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet