[2.0.21] User Shield

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
52
79%
Very Good
8
12%
Good
4
6%
Fair
1
2%
Poor
1
2%
 
Total votes: 66

RobinL
Registered User
Posts: 16
Joined: Wed Nov 16, 2005 12:03 am

Re: [2.0.21] User Shield

Post by RobinL »

Carrying on in the fine tradition of "When it rains, it pours," I have another error. We've been having trouble with our database, and when the owner fixed it, some of the MODded docs were replaced with "clean" ones. I've gone through the whole shebang, item by item, but...

Down at the bottom of the index page, it says:

We have XXX registered users and X non-active registered users

Now, instead of getting a list of the non-active users, we get the entire forum membership list! Oi!

What do I do to fix it?
Wo1f
Registered User
Posts: 2039
Joined: Fri Jan 28, 2005 3:20 am

Re: [2.0.21] User Shield

Post by Wo1f »

Can you link me to your "memberlist.php" file taking care to rename it with a "TXT extension such as --> "memberlist.txt". It would be very quick for me to do the review and test it on my demo board. Sounds good?

Or, you could also include the content of this file in a bbcode "code" tag and send it to me via pm. Sounds better?

I'll look it over as soon as you make it available either way.


Best regards
Wolf ;)
Wo1f
Registered User
Posts: 2039
Joined: Fri Jan 28, 2005 3:20 am

Re: [2.0.21] User Shield

Post by Wo1f »

@ RobinL

Here you go. There was only 1 edit out of place and you did a good job on the rest.
  • Link expired
1 ] Click on the above links and "Save" to your local computer
2 ] Rename to memberlist.php
3 ] Upload (copy) to your server and overwrite the old one

Hope this takes care of it. 8)


Best regards,
Wolf
Last edited by Wo1f on Fri May 18, 2007 7:47 pm, edited 1 time in total.
gtkuntz
Registered User
Posts: 21
Joined: Thu Mar 09, 2006 2:58 pm

Re: [2.0.21] User Shield

Post by gtkuntz »

..wrong forum..
RobinL
Registered User
Posts: 16
Joined: Wed Nov 16, 2005 12:03 am

Re: [2.0.21] User Shield

Post by RobinL »

Fantastic! Thank you very much!
PlayGod
Registered User
Posts: 38
Joined: Thu Jul 31, 2003 6:16 pm

Re: [2.0.21] User Shield

Post by PlayGod »

I know that under vanilla phpbb, the user is supposed to receive a 2nd email when the account is activated.
Welcome to *** Forums

Please keep this email for your records. Your account information is as follows:

----------------------------
Username: username
Password: pass
----------------------------

Your account is currently inactive, the administrator of the board will need to activate it before you can log in. You will receive another email when this has occured.
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account.

Thank you for registering.


Is this also the case when User Shield is installed? If so, I need to do some work on my forum, because the 2nd email is not being sent.
Last edited by PlayGod on Thu May 10, 2007 5:17 pm, edited 1 time in total.
PlayGod
Registered User
Posts: 38
Joined: Thu Jul 31, 2003 6:16 pm

Re: [2.0.21] User Shield

Post by PlayGod »

apparently the second email is *NOT* sent by phpbb, at least not by the two 2.0.22 installs I have that do not run User Shield. So much for troubleshooting, I suppose I will just edit the language for email #1.

***edit***

Activating the account via User Shield or via the ACP User Managment does NOT send the activation welcome email message.

The admin account activation via clicking the link in the new user email message, which hits
http://www.forum.com/forum/profile.php? ... er1cstr1ng
DOES send the user an email. I assume that this is not practical when you are activating a number of accounts at once via User Shield's activation method.

However, the initial registration email is misleading, because it promises the user a follow up email when their account is registered. Perhaps you should also include the appropriate language changes in the MOD so that the user & admin do not get confused about whether a second confirmation email will be sent.

Obviously, it would be preferable if the User Shield activation would send the confirmation email.
PlayGod
Registered User
Posts: 38
Joined: Thu Jul 31, 2003 6:16 pm

Re: [2.0.21] User Shield

Post by PlayGod »

I compromised by editing usercp_register.php and admin_activate.tpl to provide all user details to the admin in the New user account email message. Now it's easy to tell who to send to the dustbin.

/includes/usercp_register.php - edit at your own risk, around line 780

Code: Select all

						'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
						// new stuff
						'EMAIL_ADDRESS' => $email,
						'WEB_SITE' => $website,
						'FROM' => $location,
						'OCC' => $occupation,
						'INTERESTS' => $interests,
						'SIGNATURE' => $signature,
						// end of new stuff
						'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
/lang/english/email/admin_activate.tpl

Code: Select all

Subject: New user account
Charset: iso-8859-1

Hello,

The account owned by "{USERNAME}" has been deactivated or newly created, you should check the details of this user (if required) and activate it using the following link:

{U_ACTIVATE}

Username: {USERNAME}

Email: {EMAIL_ADDRESS}

From: {FROM}
Occupation: {OCC}
Interests: {INTERESTS}

ICQ Number: {ICQ}
AIM Address: {AIM}
MSN Messenger: {MSN}
Yahoo Messenger: {YIM}
User Signature: {SIGNATURE}

{EMAIL_SIG}
This will send admins a much more detailed New user account email message with all the info needed to weed out the nasties.
Wo1f
Registered User
Posts: 2039
Joined: Fri Jan 28, 2005 3:20 am

Re: [2.0.21] User Shield

Post by Wo1f »

Hi PlayGod,

Yes, you are correct. When "Enable account activation" is set to "Admin", you must use the activation link in the email you received (generated by a registration request) for a confirmation to be sent out to the new registered user. This is default phpBB behavior. As mentionned more than once in this thread (I know, it's very long... :wink:), User Shield v1.4.2 (new version which has not been validated yet) takes care of this situation and sends an "Account Activated" confirmation, which is also multiple-selection aware when using the "non-actives" memberlist filter.

Contrary to your solution though (admin. side of things), I include only the supplied email addy (which is usually bogus when dealing with automated spambots) and a link to the "non_actives" memberlist filter, where you can quickly review other submitted information. From there, you can manage any and all new registrations (which also includes a new feature... among many, in the form of quarantines). This new feature was specifically designed to help fight human spammers.

Hope this clarifies things for you, and that I managed to get you curious about User Shield v1.4.2!


Best regards,
Wolf 8)
PlayGod
Registered User
Posts: 38
Joined: Thu Jul 31, 2003 6:16 pm

Re: [2.0.21] User Shield

Post by PlayGod »

Thank you for this MOD and thank you for being so kind regarding the status of 1.4.2. Several months back, I did read the entire thread, but of course that info only gets stored in a temp cache, which has gotten somewhat volatile now, considering I'm over 40. ;)

I'll grab 1.4.2 and get it installed ASAP... however, I'm still going to keep the emailer changes because I have an admin on one of the forums who prefers the email activation method.

Wonderful MOD, great developer, excellent support! Thanks!
Benjymac
Registered User
Posts: 1
Joined: Sun May 13, 2007 8:44 am

Re: [2.0.21] User Shield

Post by Benjymac »

HELP.

I have just manually installed the mod and when i have tried to run the update config file I get the following error:

Parse error: syntax error, unexpected T_STRING in /home/******/public_html/phpBB2/includes/functions.php on line 47

Here is the code at that point:


41 case 'newestuser':
42 $sql = "SELECT user_id, username
43 FROM " . USERS_TABLE . "
44 WHERE user_id <> " . ANONYMOUS . " $hide_inactive_on ";
45 // User Stealth mod - added $hide_inactive_on above
46 $hide_inactive_on
47 ORDER BY user_id DESC
48 LIMIT 1";
49 // User Stealth mod - added $hide_inactive_on above
50 break;


Can anyone see what the problem is please.
Wo1f
Registered User
Posts: 2039
Joined: Fri Jan 28, 2005 3:20 am

Re: [2.0.21] User Shield

Post by Wo1f »

Hi Benjymac,
Benjymac wrote: I have just manually installed the mod and when i have tried to run the update config file I get the following error:

Parse error: syntax error, unexpected T_STRING in /home/******/public_html/phpBB2/includes/functions.php on line 47


No biggie, it's just an edit out of place. Here's what the code should look like once User Shield's edits are integrated in this file --> "includes/functions.php":

Code: Select all

function get_db_stat($mode)
{
	global $db, $board_config;
// User Stealth mod - added $board_config above


	switch( $mode )
	{
		case 'usercount':
// User Stealth mod - start
	$hide_inactive_on = ( $board_config['username_hide_inac'] ) ? 'AND user_active = 1' : 'AND user_active >= 0';
// User Stealth mod - end

			$sql = "SELECT COUNT(user_id) AS total
				FROM " . USERS_TABLE . "
				WHERE user_id <> " . ANONYMOUS . " $hide_inactive_on ";
// User Stealth mod - added $hide_inactive_on above

			break;

		case 'newestuser':
// User Stealth mod - start
	$hide_inactive_on = ( $board_config['username_hide_inac'] ) ? 'AND user_active = 1' : 'AND user_active >= 0';
// User Stealth mod - end

			$sql = "SELECT user_id, username
				FROM " . USERS_TABLE . "
				WHERE user_id <> " . ANONYMOUS . "
				$hide_inactive_on
				ORDER BY user_id DESC
				LIMIT 1";
// User Stealth mod - added $hide_inactive_on above

			break;

		case 'postcount':
		case 'topiccount':
			$sql = "SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total
				FROM " . FORUMS_TABLE;
			break;
// User Stealth mod - start
		case 'inactive_total':
			$sql = "SELECT COUNT(user_active) as fetched_rows
				FROM " . USERS_TABLE . "
				WHERE user_active = " . 0 . "
					AND user_id != " . ANONYMOUS ;
			break;
// User Stealth mod - end

	}

	if ( !($result = $db->sql_query($sql)) )
	{
		return false;
	}

	$row = $db->sql_fetchrow($result);

	switch ( $mode )
	{
		case 'usercount':
			return $row['total'];
			break;
		case 'newestuser':
			return $row;
			break;
		case 'postcount':
			return $row['post_total'];
			break;
		case 'topiccount':
			return $row['topic_total'];
			break;
// User Stealth mod - start
		case 'inactive_total':
			return $row['fetched_rows'];
			break;
// User Stealth mod - end

	}

	return false;
}
You should be good to go with this. If not, just let me know.


Best regards,
Wolf
neoaddict
Registered User
Posts: 9
Joined: Sun Jul 02, 2006 3:54 am

Re: [2.0.21] User Shield

Post by neoaddict »

For some unknown reason, the Javascript which selects all of the members won't work and the Active/Deactive buttons won't work. :?

Here's the memberlist_body.tpl file:

Code: Select all

<table width="100%" cellspacing="0">
	<tr>
		<th class="thLeft"></th>
		<th class="thCenter" nowrap="nowrap"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></th>
		<th class="thRight"></th>
	</tr>
</table>
<script language="javascript" type="text/javascript">
<!--
	function select_switch(status)
	{
		for (i = 0; i < document.inactive_list.length; i++)
		{
			document.inactive_list.elements[i].checked = status;
		}
	}
//-->
</script>
<form method="post" name="inactive_list" action="{S_MODE_ACTION}">
<table class="forumline" width="100%" cellspacing="0" cellpadding="2">
	<tr>
		<td align="center" class="row1">
		{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="button" />
		</td>
	</tr>
</table>
</form>
<table width="100%" cellspacing="0" class="bottom">
	<tr>
		<td class="back-3-1"></td>
		<td class="back-3-2" align="center">{S_TIMEZONE}</td>
		<td class="back-3-3"></td>
	</tr>
</table>

<table width="100%" cellspacing="0">
	<tr>
		<th class="thLeft"></th>
		<th class="thCenter"><a href="{U_MEMBERLIST}" class="nav">{L_MEMBERLIST}</a></th>
		<th class="thRight"></th>
	</tr>
</table>
<table width="100%" cellpadding="3" cellspacing="0" class="forumline">
	<tr>
	        <th height="25" class="thCornerL" nowrap="nowrap">{ROW_NUMBER_TITLE}</th>
		<!--<td class="cat" nowrap="nowrap">{ROW_NUMBER_TITLE}</td>-->
		<td class="cat" nowrap="nowrap">&nbsp;</td>
		<td class="cat" nowrap="nowrap">{L_USERNAME}</td>
		<td class="cat" nowrap="nowrap">{L_EMAIL}</td>
		<td class="cat" nowrap="nowrap">{L_FROM}</td>
		<td class="cat" nowrap="nowrap">{L_JOINED}</td>
		<td class="cat" nowrap="nowrap">{L_POSTS}</td>
		<td class="cat" nowrap="nowrap">{L_WEBSITE}</td>
	</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>{memberrow.DELETE_USER_IMAGE}</td>
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle">&nbsp;{memberrow.EMAIL_IMG}&nbsp;</td>
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.FROM}</span></td>
	  <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>
	  <td class="{memberrow.ROW_CLASS}" align="center">&nbsp;{memberrow.WWW_IMG}&nbsp;</td>
	</tr>
	<!-- END memberrow -->
	<!-- BEGIN no_inactive -->
	<tr> 
		<td class="row1" align="center" colspan="8"><span class="genmed"><b>{no_inactive.NO_DATA}</b></span></td>
	</tr>
	<!-- END no_inactive -->
	<!-- BEGIN full_tb -->
	<tr>
		<td class="row2" colspan="8">
			<table align="center" cellspacing="0" cellpadding="0" width="100%" border="0">
				<tr class="gensmall">
					<td class="row2">
						<a href="javascript:select_switch(true);">{L_SELECT_ALL}</a>
							{L_DIVIDER}
						<a href="javascript:select_switch(false);">{L_UNSELECT_ALL}</a>
					</td>
					<td class="row2" align="right">{L_NUM_OF_ROWS_RETURNED}</td>
				</tr>
			</table>
		</td>
	</tr>
	<!-- END full_tb -->
</table>
	  <td class="catBottom" colspan="8" height="28" align="center">{ACTIVATE_INACTIVE}{DELETE_INACTIVE}</td>
<table width="100%" cellspacing="0" class="bottom">
	<tr>
		<td class="back-3-1"></td>
		<td class="back-3-2" align="center"><a href="#top">{L_BACK_TO_TOP}</a></td>
		<td class="back-3-3"></td>
	</tr>
</table>

<table width="100%" cellspacing="0">
	<tr>
		<th class="thLeft"></th>
		<th class="thCenter" nowrap="nowrap"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></th>
		<th class="thRight"></th>
	</tr>
</table>
<table width="100%" cellspacing="0" class="forumline">
	<tr>
		<td align="left" width="50%" class="row1">{PAGE_NUMBER}<br />{PAGINATION}</td>
		<td valign="top" class="row1" align="right">{JUMPBOX}</td>
	</tr>
</table>
<table width="100%" cellspacing="0" class="bottom">
	<tr>
		<td class="back-3-1"></td>
		<td class="back-3-2" align="center">{S_TIMEZONE}</td>
		<td class="back-3-3"></td>
	</tr>
</table>
http://intensecogitation.info
IB and university help blog
Wo1f
Registered User
Posts: 2039
Joined: Fri Jan 28, 2005 3:20 am

Re: [2.0.21] User Shield

Post by Wo1f »

Hi neoaddict,
neoaddict wrote: For some unknown reason, the Javascript which selects all of the members won't work and the Active/Deactive buttons won't work. :?
[quote="The "form" closing tag"]
<table width="100%" cellspacing="0" class="forumline">
<tr>
<td align="left" width="50%" class="row1">{PAGE_NUMBER}<br />{PAGINATION}</td>
<td valign="top" class="row1" align="right">{JUMPBOX}</td>
</tr>
</table></form>
<table width="100%" cellspacing="0" class="bottom">
<tr>
<td class="back-3-1"></td>
<td class="back-3-2" align="center">{S_TIMEZONE}</td>
<td class="back-3-3"></td>
</tr>
</table>
[/quote]
Just relocate the "form" closing tag --> </form> near the bottom of the TPL file, as I've done above. This will take care of it (both problems - javascript and buttons). But do let me know if things don't work as they should.


Best regards,
Wolf :cool:
neoaddict
Registered User
Posts: 9
Joined: Sun Jul 02, 2006 3:54 am

Re: [2.0.21] User Shield

Post by neoaddict »

Excellent, thanks. 8-)
http://intensecogitation.info
IB and university help blog
Post Reply

Return to “[2.0.x] MOD Database Releases”