[20/01/07] Admin Userlist

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!
398
72%
Very Good
98
18%
Good
38
7%
Fair
11
2%
Poor
11
2%
 
Total votes: 556

deadmonkey
Registered User
Posts: 6
Joined: Thu Sep 14, 2006 11:35 pm
Location: Bristol
Contact:

Post by deadmonkey »

Btw the box above the pull down menu at the bottom is the select / deselect buttons, and mine had disappeared too when the lang file was replaced.
User avatar
PhilEsq
Registered User
Posts: 117
Joined: Sun May 22, 2005 3:14 pm
Location: U.S.A.
Contact:

lang_admin

Post by PhilEsq »

I'm running v 2.021 and do not have the select all button. I checked the lang_admin file and do not know what to do with the file to make the select all button work.

deadmonkey wrote: Joseph, after I upgraded my phpbb, I only had one option in the pull down menu, which was because the upgrade overwrote my modified lang_admin file. I just re-added the section from the instructions and the options all reappeared, so check that file for references to userlist and the big chunk of text that follows.
Philip L. Franckel, Esq.
www.HURT911.org
deadmonkey
Registered User
Posts: 6
Joined: Thu Sep 14, 2006 11:35 pm
Location: Bristol
Contact:

Post by deadmonkey »

You need to look in admin_userlist_206.zip and read the install_userlist_206.mod file, which is a txt file you can open with notepad.

It's got a section

Code: Select all

#-----[ OPEN ]------------------------------------------ 
#
language/lang_english/lang_admin.php
You need to do what it says after that, ie. find Install_no_pcre and then add the chunk of text between the two /// sections.
deadmonkey
Registered User
Posts: 6
Joined: Thu Sep 14, 2006 11:35 pm
Location: Bristol
Contact:

Post by deadmonkey »

No need to thank me, I was just following the authors instructions, but there's a vote on page 1 where you can vote for this mod. I voted the highest because it saved me hours of really monotonous administration, so the author is fantastic in my book :D
sergeyka
Registered User
Posts: 4
Joined: Mon Sep 18, 2006 2:05 pm

Admin Userlist 2.0.6 Filter Addon

Post by sergeyka »

This addon for v2.0.6 makes it so that you can filter (find) result by username, website & email. You can to use '*' character in find pattern. Very usefull!!! :D

Code: Select all

##############################################################
## MOD Title: Admin Userlist filter add on
## MOD Author: Sergey Ksinishin <sergka@hotmail.com>
## MOD Description: This makes it so that you can filter (find) result by username, website & email
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: ~2 Minutes
## Files To Edit: admin/admin_userlist.php
##                templates/subSilver/admin/userlist_body.tpl
##                language/lang_english/lang_admin.php
## Included Files: none
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
## 
##   2006-09-18 - Version 1.0.0
##      - Initial Release
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

# 
#-----[ OPEN ]------------------------------------------ 
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
# Full Line:
#	$lang['Find_all_posts'] = 'Find All Posts';
# 
$lang['Find_all_posts'] =

# 
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Filter']='Filter';

# 
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/userlist_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<form action="{S_ACTION}" method="post">
<table width="100%" cellpadding="3" cellspacing="1" border="0">
	<tr>
		<td width="100%">&nbsp;</td>

# 
#-----[ AFTER, ADD ]------------------------------------------
#
		<td align="right" nowrap="nowrap"><span class="gen">{L_FILTER}</td>
		<td nowrap="nowrap"><input type="text" size="20" value="{S_FILTER}" name="filter"></td>
		<td nowrap="nowrap">{S_SELECT_FIND}</td>

# 
#-----[ OPEN ]------------------------------------------
#
admin/admin_userlist.php

#
#-----[ FIND ]------------------------------------------
#
else
{
	$alpahnum = '';
	$alpha_where = '';
}


# 
#-----[ AFTER, ADD ]------------------------------------------
#
// filter stuff
$filter = '';
$filter_where = '';
$find_by = 'find_username';
if ( isset($HTTP_GET_VARS['filter']) || isset($HTTP_POST_VARS['filter']) ) 
{
	$filter = ( isset($HTTP_POST_VARS['filter']) ) ? htmlspecialchars($HTTP_POST_VARS['filter']) : htmlspecialchars($HTTP_GET_VARS['filter']);
	if (!empty($filter))
	{
		$filter = preg_replace('/\*/', '%', phpbb_clean_username($filter));
		
		if (isset($HTTP_POST_VARS['find_by']))
			$find_by = htmlspecialchars($HTTP_POST_VARS['find_by']);
		elseif (isset($HTTP_GET_VARS['find_by']))
			$find_by = htmlspecialchars($HTTP_GET_VARS['find_by']);

		switch($find_by)
		{
		case 'find_user_email':
			$filter_where =" AND user_email LIKE '" . str_replace("\'", "''", $filter) . "'";
			break;
		case 'find_user_website':
			$filter_where =" AND user_website LIKE '" . str_replace("\'", "''", $filter) . "'";
			break;
		default:
			$filter_where =" AND username LIKE '" . str_replace("\'", "''", $filter) . "'";
		}

		$alpahnum = '';
		$alpha_where = '';
	}
}

#
#-----[ FIND ]------------------------------------------
#
			$select_sort .= '<option value="' . $select_sort_by[$i] . '"' . $selected . '>' . $select_sort_by_text[$i] . '</option>'; 
		} 
		$select_sort .= '</select>'; 


# 
#-----[ AFTER, ADD ]------------------------------------------
#
		$select_find_by = array('find_username', 'find_user_email', 'find_user_website'); 
		$select_find_by_text = array( $lang['Username'], $lang['Email'], $lang['Website']); 

		$select_find = '<select name="find_by" class="post">'; 
		for($i = 0; $i < count($select_find_by); $i++) 
		{ 
			$selected = ($find_by == $select_find_by[$i]) ? ' selected="selected"' : ''; 
			$select_find .= '<option value="' . $select_find_by[$i] . '"' . $selected . '>' . $select_find_by_text[$i] . '</option>'; 
		} 
		$select_find .= '</select>'; 
		
#
#-----[ FIND ]------------------------------------------
#
			'L_ADD_GROUP' => $lang['Add_group'],
					

# 
#-----[ AFTER, ADD ]------------------------------------------
#
			'L_FILTER' => $lang['Filter'],
			'S_FILTER' => preg_replace('/%/', '*', $filter),
			'S_SELECT_FIND' => $select_find,

					
#
#-----[ FIND ]------------------------------------------
#
			$sql = "SELECT * 
			FROM " . USERS_TABLE . "
			WHERE user_id <> " . ANONYMOUS . " 
				$alpha_where 
# 
#-----[ AFTER, ADD ]------------------------------------------
#
				$filter_where

#
#-----[ FIND ]------------------------------------------
#
			WHERE user_id <> " . ANONYMOUS . " $alpha_where";

#
#-----[ REPLACE WITH ]------------------------------------------
#
			WHERE user_id <> " . ANONYMOUS . " $alpha_where $filter_where";

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Last edited by sergeyka on Thu Sep 21, 2006 1:19 pm, edited 1 time in total.
User avatar
warmweer
Jr. Extension Validator
Posts: 4510
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Admin Userlist 2.0.6 Filter Addon

Post by warmweer »

sergeyka wrote: This addon makes it so that you can filter (find) result by username, website & email. You can to use '*' character in find pattern. Very usefull!!! :D

I agree : very useful (I mean that) BUT

1. It hasn't been tested or verified so I would say use at you own risk until then (not that I've seen any mistakes).
2.I suggest you try to release this as a mod as such (and include something stating what other mod (and which version) it's an addon for.
We should embrace problems, without which there wouldn't be any solutions.
delicata
Registered User
Posts: 143
Joined: Sat Apr 24, 2004 12:49 am
Location: South Yorkshire
Contact:

Post by delicata »

If I may be so bold as to make a suggestion for this mod!

When anything was being done to users (eg deleting), when the question ask 'are you sure?' would it be possible to have the users listed so that you could amend the selection before hitting 'yes'?

I think I inadvertanly deleted a load of users by selecting the wrong check box. I have managed to recover them from a backup.

Am I making sense? TIA
John - Delicata Designs
Tel: +44 (0) 7930 343276 | Fax: +44 (0) 7092 004104


Supporter of:
Independent Web Designers Portal | Mini Tutorials

Image
sergeyka
Registered User
Posts: 4
Joined: Mon Sep 18, 2006 2:05 pm

Re: Admin Userlist 2.0.6 Filter Addon

Post by sergeyka »

warmweer wrote: 1. It hasn't been tested or verified so I would say use at you own risk until then (not that I've seen any mistakes).


I use mod with this small changes 3 month already and this work for me. I tested and verified this.
warmweer wrote: 2.I suggest you try to release this as a mod as such (and include something stating what other mod (and which version) it's an addon for.


IMHO not need release this mod of mod as release. This is small changes. If somebody try this and will use, then i be happy :)
DR@CE
Registered User
Posts: 2
Joined: Tue Sep 19, 2006 1:46 pm

Post by DR@CE »

hi
I'm usin' phpbb v.2.0.21 and I wanted to install the Userlist-Mod.

I've uploaded the userlist_body.tpl and userlist_group.tpl to the folder: root/templates/subSilver/admin and the admin_userlist.php file to the directory: root/admin/

What I've to do now, because on my Admin-Index page I only see this: "Template->make_filename(): Error - file admin/userlist_body.tpl does not exist" ???
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52001
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

are you using the subSilver template?
DR@CE
Registered User
Posts: 2
Joined: Tue Sep 19, 2006 1:46 pm

Post by DR@CE »

no...but in the admin-index it's the subSilver template or not? and on the over hand I also uploaded the tpl files to my over template
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52001
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

No. The admin-index does not always use subSilver. It uses whatever template you have selected in your profile. Therefore, anytime you do a Mod, you have to copy/change files in your other templates too.
andyan
Registered User
Posts: 6
Joined: Fri Sep 23, 2005 10:54 pm

Help! I can not find this code

Post by andyan »

I would like to add this addon to my new mod "userlist" version.202 but I could not find the following block in the file /admin/admin_userlist.php
Any seggestio/help?
$select_sort .= '<option value="' . $select_sort_by[$i] . '"' . $selected . '>' . $select_sort_by_text[$i] . '</option>';
}
$select_sort .= '</select>';


Thanks
Andy
Vancouver, Canada
maxdrown
Registered User
Posts: 14
Joined: Tue Nov 26, 2002 7:10 pm
Location: St. Louis, MO
Contact:

Post by maxdrown »

How do I change the results shown from 20 to some other by default?
- Max
sergeyka
Registered User
Posts: 4
Joined: Mon Sep 18, 2006 2:05 pm

Re: Help! I can not find this code

Post by sergeyka »

andyan wrote: I would like to add this addon to my new mod "userlist" version.202 but I could not find the following block in the file /admin/admin_userlist.php
Any seggestio/help?
$select_sort .= '<option value="' . $select_sort_by[$i] . '"' . $selected . '>' . $select_sort_by_text[$i] . '</option>';
}
$select_sort .= '</select>';


Thanks


This mod for v2.0.6. In this version its line 822.

News about last version:
http://www.phpbb.com/phpBB/viewtopic.php?p=2429164

To download:
http://deathmonkeighs.com/files/Admin_Userlist_206.zip
Post Reply

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