[RC1] PM Count MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
raygene
Registered User
Posts: 187
Joined: Fri Jan 19, 2007 11:29 pm
Location: Gatineau, QC, Canada

Re: [RC1] PM Count MOD

Post by raygene »

OK Doc, the problem is fixed.

Thanks for the great Mod, it sure will be handy for me, I'm working on a Dating board (click on my website button) and it'll be a great way for me to monitor users who abuse of the PM system.

Cheers,
Gene
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [RC1] PM Count MOD

Post by ErDrRon »

Thanks for the feedback. I'm glad it works for you.

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
cnebiker
Registered User
Posts: 3
Joined: Tue May 29, 2007 8:31 pm
Location: CH-Basel
Contact:

Re: [RC1] PM Count MOD

Post by cnebiker »

----
cnebiker
Registered User
Posts: 3
Joined: Tue May 29, 2007 8:31 pm
Location: CH-Basel
Contact:

Re: [RC1] PM Count MOD

Post by cnebiker »

ErDrRon wrote:
cnebiker wrote:Question over MOD: PM Count MOD v1.1.1

In the Memberlist the Count is "0" but in the profile is "1"
All other Users in the meberlist have "0", too.
What is wrong ? Do you have forgot code for file memberlist.php ?

Thanks for help
chrisian
Check to make sure you edited memberlist.php correctly.

Cheers!
Ron


what's wrong in the code in memberlist.php ? The count is "0" but in the profile is "1" !

I use version 2.0.19

Code: Select all

<?php
/***************************************************************************
 *                              memberlist.php
 *                            -------------------
 *   begin                : Friday, May 11, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: memberlist.php,v 1.36.2.8 2003/06/09 13:06:19 psotfx Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
$pagecounter = "3";
//
// End session management
//

$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;

if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
	$mode = ( isset($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : htmlspecialchars($HTTP_GET_VARS['mode']);
}
else
{
	$mode = 'joined';
}

if(isset($HTTP_POST_VARS['order']))
{
	$sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else if(isset($HTTP_GET_VARS['order']))
{
	$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else
{
	$sort_order = 'ASC';
}

//
// Memberlist sorting
//
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'],  $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');

$select_sort_mode = '<select name="mode">';
for($i = 0; $i < count($mode_types_text); $i++)
{
	$selected = ( $mode == $mode_types[$i] ) ? ' selected="selected"' : '';
	$select_sort_mode .= '<option value="' . $mode_types[$i] . '"' . $selected . '>' . $mode_types_text[$i] . '</option>';
}
$select_sort_mode .= '</select>';

$select_sort_order = '<select name="order">';
if($sort_order == 'ASC')
{
	$select_sort_order .= '<option value="ASC" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="DESC">' . $lang['Sort_Descending'] . '</option>';
}
else
{
	$select_sort_order .= '<option value="ASC">' . $lang['Sort_Ascending'] . '</option><option value="DESC" selected="selected">' . $lang['Sort_Descending'] . '</option>';
}
$select_sort_order .= '</select>';

//
// Generate page
//
$page_title = $lang['Memberlist'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
	'body' => 'memberlist_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);

$template->assign_vars(array(
	'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
	'L_EMAIL' => $lang['Email'],
	'L_WEBSITE' => $lang['Website'],
	'L_FROM' => $lang['Location'],
	'L_ORDER' => $lang['Order'],
	'L_SORT' => $lang['Sort'],
	'L_SUBMIT' => $lang['Sort'],
	'L_AIM' => $lang['AIM'],
	'L_YIM' => $lang['YIM'],
	'L_MSNM' => $lang['MSNM'],
	'L_ICQ' => $lang['ICQ'], 
	'L_JOINED' => $lang['Joined'], 
	'L_POSTS' => $lang['Posts'], 
	// PM Count MOD - Begin
	'L_PMS' => $lang['Pms'], 
	// PM Count MOD - End
	'L_PM' => $lang['Private_Message'],
	'S_MODE_SELECT' => $select_sort_mode,
	'S_ORDER_SELECT' => $select_sort_order,
	'S_MODE_ACTION' => append_sid("memberlist.$phpEx"))
);

switch( $mode )
{
	case 'joined':
		$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
	case 'username':
		$order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
	case 'location':
		$order_by = "user_from $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
	case 'posts':
		$order_by = "user_posts $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
	case 'email':
		$order_by = "user_email $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
	case 'website':
		$order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
	case 'topten':
		$order_by = "user_posts $sort_order LIMIT 10";
		break;
	default:
		$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
}

$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar 
	FROM " . USERS_TABLE . "
	WHERE user_id <> " . ANONYMOUS . "
	ORDER BY $order_by";
if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}

if ( $row = $db->sql_fetchrow($result) )
{
	$i = 0;
	do
	{
		$username = $row['username'];
		$user_id = $row['user_id'];

		$from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;';
		
		// Begin Map Mod
		$sql = 'SELECT *
			FROM ' . MAP_MOD_USER_TABLE . '
			WHERE user_id='.$user_id;
		if(!$map_result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, "Couldn't obtain map information.", "", __LINE__, __FILE__, $sql);
		}
		$map_row = $db->sql_fetchrow($map_result);
		if ((intval($map_row['user_id'])<>0) && ((float)$map_row['longitude']<>0.0) && ((float)$map_row['latitude']<>0.0))
		{
			$map_highlight_id=$row['user_id'];
		}
		else
		{
			$map_highlight_id=0;
		}
		$db->sql_freeresult($map_result);
		// End Map Mod

		$joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']);
		$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
		// PM Count MOD - Begin
		$total_pms = ( $row['user_pms'] ) ? $row['user_pms'] : 0;
		// PM Count MOD - End

		$poster_avatar = '';
		if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] )
		{
			switch( $row['user_avatar_type'] )
			{
				case USER_AVATAR_UPLOAD:
					$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
					break;
				case USER_AVATAR_REMOTE:
					$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : '';
					break;
				case USER_AVATAR_GALLERY:
					$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
					break;
			}
		}

		if ( !empty($row['user_viewemail']) || $userdata['user_level'] == ADMIN )
		{
			$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $user_id) : 'mailto:' . $row['user_email'];

			$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
			$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
		}
		else
		{
			$email_img = '&nbsp;';
			$email = '&nbsp;';
		}

		$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
		$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
		$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';

		$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$user_id");
		$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
		$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';

		$www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
		$www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';

		if ( !empty($row['user_icq']) )
		{
			$icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
			$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
			$icq =  '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
		}
		else
		{
			$icq_status_img = '';
			$icq_img = '';
			$icq = '';
		}

		$aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
		$aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';

		$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
		$msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
		$msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';

		$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
		$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';

		$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=posts");
		$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
		$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

		$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
		$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

		$template->assign_block_vars('memberrow', array(
			// Begin Map Mod
			'U_USER_MAP' => append_sid("map.$phpEx?highlight=".$map_highlight_id),
			// End Map Mod
			'ROW_NUMBER' => $i + ( $HTTP_GET_VARS['start'] + 1 ),
			'ROW_COLOR' => '#' . $row_color,
			'ROW_CLASS' => $row_class,
			'USERNAME' => $username,
			'FROM' => $from,
			'JOINED' => $joined,
			'POSTS' => $posts,
			// PM Count MOD - Begin
			'TOTAL_PMS' => $total_pms,
			// PM Count MOD - End
			'AVATAR_IMG' => $poster_avatar,
			'PROFILE_IMG' => $profile_img, 
			'PROFILE' => $profile, 
			'SEARCH_IMG' => $search_img,
			'SEARCH' => $search,
			'PM_IMG' => $pm_img,
			'PM' => $pm,
			'EMAIL_IMG' => $email_img,
			'EMAIL' => $email,
			'WWW_IMG' => $www_img,
			'WWW' => $www,
			'ICQ_STATUS_IMG' => $icq_status_img,
			'ICQ_IMG' => $icq_img, 
			'ICQ' => $icq, 
			'AIM_IMG' => $aim_img,
			'AIM' => $aim,
			'MSN_IMG' => $msn_img,
			'MSN' => $msn,
			'YIM_IMG' => $yim_img,
			'YIM' => $yim,			
			'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
		);		
		// PM Count MOD - Begin
		if ($userdata['user_level'] == 1 || $userdata['user_level'] == 2 )
		{
			$template->assign_block_vars('memberrow.switch_admin_mod_yes', array());
		}
		// PM Count MOD - End
		
		if ($map_highlight_id<>0) {
			$template->assign_block_vars('memberrow.switch_user_map', array());
		}
		else {
			$template->assign_block_vars('memberrow.switch_user_no_map', array());
		}
		$i++;
	}
	while ( $row = $db->sql_fetchrow($result) );
}

if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )
{
	$sql = "SELECT count(*) AS total
		FROM " . USERS_TABLE . "
		WHERE user_id <> " . ANONYMOUS;

	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
	}

	if ( $total = $db->sql_fetchrow($result) )
	{
		$total_members = $total['total'];

		$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $board_config['topics_per_page'], $start). '&nbsp;';
	}
}
else
{
	$pagination = '&nbsp;';
	$total_members = 10;
}

$template->assign_vars(array(
	'PAGINATION' => $pagination,
	'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )), 
	'L_GOTO_PAGE' => $lang['Goto_page'])
);
// PM Count MOD - Begin
if ($userdata['user_level'] == 1 || $userdata['user_level'] == 2 )
{
	$template->assign_block_vars('switch_admin_mod_yes', array());
}
// PM Count MOD - End

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
memberlist_body.tpl

Code: Select all

<form method="post" action="{S_MODE_ACTION}">
  <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
	<tr> 
	  <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
	  <td align="right" nowrap="nowrap"><span class="genmed">{L_SELECT_SORT_METHOD}:&nbsp;{S_MODE_SELECT}&nbsp;&nbsp;{L_ORDER}&nbsp;{S_ORDER_SELECT}&nbsp;&nbsp; 
		<input type="submit" name="submit" value="{L_SUBMIT}" class="liteoption" />
		</span></td>
	</tr>
  </table>
  <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
	<tr> 
	  <th height="25" class="thCornerL" nowrap="nowrap">#</th>
	  <th class="thTop" nowrap="nowrap">&nbsp;</th>
	  <th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
	  <th class="thTop" nowrap="nowrap">{L_EMAIL}</th>
	  <th class="thTop" nowrap="nowrap">{L_FROM}</th>
	  <th class="thTop" nowrap="nowrap">{L_JOINED}</th>
	  <th class="thTop" nowrap="nowrap">{L_POSTS}</th>
	  <!-- PM Count MOD - Start -->
	  <!-- BEGIN switch_admin_mod_yes -->
	  <th class="thTop" nowrap="nowrap">{L_PMS}</th>
	  <!-- END switch_admin_mod_yes -->
	  <!-- PM Count MOD - End -->
	  <th class="thCornerR" nowrap="nowrap">{L_WEBSITE}</th>
	</tr>
	<!-- BEGIN memberrow -->
	<tr> 
	  <td class="{memberrow.ROW_CLASS}" align="center"><span class="gen">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</span></td>
	  <td class="{memberrow.ROW_CLASS}" align="center">&nbsp;{memberrow.PM_IMG}&nbsp;</td>
	  <td class="{memberrow.ROW_CLASS}" align="center"><span class="gen"><a href="{memberrow.U_VIEWPROFILE}" class="gen">{memberrow.USERNAME}</a></span></td>
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle">&nbsp;{memberrow.EMAIL_IMG}&nbsp;</td>
	  <!-- BEGIN switch_user_map -->
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen"><a href="{memberrow.U_USER_MAP}" class="gen">{memberrow.FROM}</a></span></td>
	  <!-- END switch_user_map -->
	  <!-- BEGIN switch_user_no_map -->
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.FROM}</span></td>
	  <!-- END switch_user_no_map -->
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.JOINED}</span></td>
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>
	  <!-- PM Count MOD - Start -->
	  <!-- BEGIN switch_admin_mod_yes -->
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.TOTAL_PMS}</span></td>
	  <!-- END switch_admin_mod_yes -->
	  <!-- PM Count MOD - End -->
	  <td class="{memberrow.ROW_CLASS}" align="center">&nbsp;{memberrow.WWW_IMG}&nbsp;</td>
	</tr>
	<!-- END memberrow -->
	<tr> 
	  <!-- PM Count MOD - Start -->
	  <td class="catBottom" colspan="9" height="28">&nbsp;</td>
	  <!-- PM Count MOD - End -->
	</tr>
  </table>
  <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
	<tr> 
	  <td align="right" valign="top"></td>
	</tr>
  </table>

<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr> 
	<td><span class="nav">{PAGE_NUMBER}</span></td>
	<td align="right"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
  </tr>
</table></form>

<table width="100%" cellspacing="2" border="0" align="center">
  <tr> 
	<td valign="top" align="right">{JUMPBOX}</td>
  </tr>
</table>
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [RC1] PM Count MOD

Post by ErDrRon »

It looks like you missed the following edit in memberlist.php:

Code: Select all

#
#-----[ FIND ]-------------------------------------------- 
#
# approximately line 149
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar 

#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_posts

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_pms
Let me know if you're still having trouble with this.

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
raygene
Registered User
Posts: 187
Joined: Fri Jan 19, 2007 11:29 pm
Location: Gatineau, QC, Canada

Re: [RC1] PM Count MOD

Post by raygene »

Hi Doc,

Due to certain problems, I had to restore my site along with my database. The backup I had (3 weeks old) didn't have the PM count installed so I'm about to reisntall it. Can it be installed for Admin userlist only? I do most of my users management using it and if so, do I install the code in privmsg.php and the admin userlist files only?

I also have the New then Unread PM mod installed and was wondering if your Mod could interfere with it for they both modify the privmsg.php file. http://www.phpbb.com/community/viewtopic.php?t=435712

Thanks,
Gene
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [RC1] PM Count MOD

Post by ErDrRon »

Yes, you can install the changes in privmsg.php and the Admin Userlist files alone. Make sure you make the database changes as well. It should not interfere with your other MOD.

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
raygene
Registered User
Posts: 187
Joined: Fri Jan 19, 2007 11:29 pm
Location: Gatineau, QC, Canada

Re: [RC1] PM Count MOD

Post by raygene »

ErDrRon wrote:Yes, you can install the changes in privmsg.php and the Admin Userlist files alone. Make sure you make the database changes as well. It should not interfere with your other MOD.

Cheers!
Ron
Thanks Doc, btw, your stethoscope is darn cold... :mrgreen:

Cheers,
Gene
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [RC1] PM Count MOD

Post by ErDrRon »

LOL .. I warm my stethoscope before using it. :shock:
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
raygene
Registered User
Posts: 187
Joined: Fri Jan 19, 2007 11:29 pm
Location: Gatineau, QC, Canada

Re: [RC1] PM Count MOD

Post by raygene »

ErDrRon wrote:LOL .. I warm my stethoscope before using it. :shock:
With a blowtorch? LOL

Sorry to be off topic but I logged on to your board and really liked that statistics Mod you have (accessible from the top menu), what would be that mod?

Thanks Doc,
Gene
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [RC1] PM Count MOD

Post by ErDrRon »

That's the Statistics MOD (oddly enough). A quick search here will find it for you.

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
peterm69
Registered User
Posts: 127
Joined: Tue Feb 14, 2006 10:30 pm
Location: Devon

Re: [RC1] PM Count MOD

Post by peterm69 »

Hi, great mod but I have a small problem. Where it states allows administrators and moderators to see pms sent, everyone can see the pm details in the memberlist & profile.

Can I hide the stats from registered and group members?

Regards

Pete
Pete
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [RC1] PM Count MOD

Post by ErDrRon »

I would have you go back through the installation instructions again to make sure you didn't miss any of the modifications, particularly the following lines:

Code: Select all

templates/subsilver/memberlist_body.tpl

# 
#-----[ FIND ]--------------------------------------------
#
# approximately line 19
#
	  <th class="thTop" nowrap="nowrap">{L_POSTS}</th>

# 
#-----[ AFTER, ADD ]--------------------------------------
#
<!-- PM Count MOD - Start -->
	  <!-- BEGIN switch_admin_mod_yes -->
	  <th class="thTop" nowrap="nowrap">{L_PMS}</th>
	  <!-- END switch_admin_mod_yes -->
<!-- PM Count MOD - End -->

# 
#-----[ FIND ]--------------------------------------------
#
# approximately line 35
#
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>

# 
#-----[ AFTER, ADD ]--------------------------------------
#
<!-- PM Count MOD - Start -->
	  <!-- BEGIN switch_admin_mod_yes -->
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.TOTAL_PMS}</span></td>
	  <!-- END switch_admin_mod_yes -->
<!-- PM Count MOD - End -->

# 
#-----[ FIND ]--------------------------------------------
#
# approximately line 45
#
	  <td class="catBottom" colspan="8" height="28">&nbsp;</td>

#
#-----[ REPLACE WITH ]------------------------------------
#
# the goal is to increment the colspan by 1; if it is 8 make it 9, etc.
#
<!-- PM Count MOD - Start -->
	  <td class="catBottom" colspan="9" height="28">&nbsp;</td>
<!-- PM Count MOD - End -->

# 
#-----[ OPEN ]-------------------------------------------- 
# 
# You need to make this edit to any additional templates you have installed as well
#
templates/subsilver/profile_view_body.tpl

# 
#-----[ FIND ]--------------------------------------------
#
# approximately line 25
#
		  <td valign="top"><b><span class="gen">{POSTS}</span></b><br /><span class="genmed">[{POST_PERCENT_STATS} / {POST_DAY_STATS}]</span> <br /><span class="genmed"><a href="{U_SEARCH_USER}" class="genmed">{L_SEARCH_USER_POSTS}</a></span></td>
		</tr>

# 
#-----[ AFTER, ADD ]--------------------------------------
#
<!-- PM Count MOD - Begin -->
		<!-- BEGIN switch_admin_mod_yes -->
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_TOTAL_PMS}:&nbsp;</span></td>
		  <td><b><span class="gen">{PMS}</span></b></td>
		</tr>
		<!-- END switch_admin_mod_yes -->
<!-- PM Count MOD - End -->
If you use templates other than subSilver make sure you make the edits in those themes as well.

Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [RC1] PM Count MOD

Post by ErDrRon »

Submitted to MODs database .. let's keep our fingers crossed.

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
Post Reply

Return to “[2.0.x] MODs in Development”