[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

User avatar
Olka
Registered User
Posts: 5
Joined: Tue Nov 11, 2003 9:31 pm

Post by Olka » Sat Jul 02, 2005 7:31 am

puntorojo wrote: When i delete multiple users:

Code: Select all

Error General
Could not delete group for this user
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2
DELETE FROM phpbb_groups WHERE group_id = 
Line : 293
File : admin_userlist.php
Thx


I use phpbb 2.0.16.

What can i do??

User avatar
BoardHost
Registered User
Posts: 242
Joined: Mon Aug 30, 2004 9:05 am

Re: Sort bug for users that have NEVER logged in.

Post by BoardHost » Sun Jul 03, 2005 9:28 am

I think I'm having the same problem, also the "Sort By" seems to want to default to 'Used ID' no matter what I select.


:?: :?: :?: :?: :?:

Running board version .15

petes wrote: Have version 2.02 installed with sort order bug fix applied.

If I sort the user list by Last post/Descending, I get all the "nevers" starting at the bottom of a full page. Then I get a partial page of "nevers", but some are missing, and th esorrt oder is reversed. This took me a little experimenting to figure out, but...

The problem is that on the first full page with (some, but not all) "nevers" on it, that it sorts the "nevers" by ID number DEscending (since there is no last activity); but on the next partial page (which is all "nevers") it sorts them by ID number AScending... therefore you never see some of the last "nevers", see example below. (I didn't look at the actual code to see what it sorting and what is defaulting to DB table order, but this is what I observe on the output page.)

......................


Of course if the original sort was AScending then this is not an issue. This logic issue may effect other DEscending order searches where some users have no data, and therefore some of the "no-data users" will be left out and others listed twice. (IE number of posts. But since actual number of posts doesn't display it's not possible to test w/o modifying the Mod to display that data.)

-Pete
If electricity comes from electrons, does morality come from morons?

User avatar
BoardHost
Registered User
Posts: 242
Joined: Mon Aug 30, 2004 9:05 am

Post by BoardHost » Mon Jul 04, 2005 6:05 am

.


Anybody?


.
If electricity comes from electrons, does morality come from morons?

Tjomme76
Registered User
Posts: 8
Joined: Tue Nov 23, 2004 11:03 am

!

Post by Tjomme76 » Wed Jul 20, 2005 11:11 pm

This is really the best phpbb-mod their is... but still so many errors?

So, any plans to get all working?

User avatar
EverettB
Registered User
Posts: 326
Joined: Fri Aug 01, 2003 7:11 pm
Location: North America

Post by EverettB » Sat Jul 23, 2005 5:44 pm

I installed this MOD today and found that the </form> tag is in the wrong place:

Here's the fix:

Code: Select all

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

# 
#-----[ FIND ]------------------------------------------ 
# 
</table>

<table width="100%" cellpadding="3" cellspacing="1" border="0">
	<tr>
		<td align="left" width="50%"><span class="gen">{PAGE_NUMBER}</span></td>
		<td align="right" width="50%"><span class="gen">{PAGINATION}</span></td>
	</tr>
</table>
</form>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
</table>
</form>

<table width="100%" cellpadding="3" cellspacing="1" border="0">
	<tr>
		<td align="left" width="50%"><span class="gen">{PAGE_NUMBER}</span></td>
		<td align="right" width="50%"><span class="gen">{PAGINATION}</span></td>
	</tr>
</table>
I don't know if this affects many people but it affected me because I have another MOD that lets me jump to any page I want and it broke that MOD due to multiple <form> tags.

User avatar
EverettB
Registered User
Posts: 326
Joined: Fri Aug 01, 2003 7:11 pm
Location: North America

Re: Sort bug for users that have NEVER logged in.

Post by EverettB » Sat Jul 23, 2005 10:03 pm

BoardHost wrote: I think I'm having the same problem, also the "Sort By" seems to want to default to 'Used ID' no matter what I select.

Looking at the code and using it, it seems like it sorts correctly but the dropdown boxes get reset every time so they don't look right to the user.

User avatar
EverettB
Registered User
Posts: 326
Joined: Fri Aug 01, 2003 7:11 pm
Location: North America

Post by EverettB » Sat Jul 23, 2005 10:39 pm

Here's a fix for the dropdowns so they keep their state:

Code: Select all

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

# 
#-----[ FIND ]------------------------------------------ 
#
		$hidden_fields = '<input type="hidden" name="start" value="' . $start . '">';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
		$select_sort_by = array('user_id', 'user_active', 'username', 'user_regdate', 'user_session_time', 'user_level', 'user_posts', 'user_rank', 'user_email');
		$select_sort_by_text = array($lang['User_id'], $lang['Active'], $lang['Username'], $lang['Joined'], $lang['Last_activity'], $lang['User_level'], $lang['Posts'], $lang['Rank'], $lang['Email']);

		$select_sort = '<select name="sort" class="post">';
		for($i = 0; $i < count($select_sort_by); $i++)
		{
			$selected = ($sort == $select_sort_by[$i]) ? ' selected="selected"' : '';
			$select_sort .= '<option value="' . $select_sort_by[$i] . '"' . $selected . '>' . $select_sort_by_text[$i] . '</option>';
		}
		$select_sort .= '</select>';

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

# 
#-----[ FIND ]------------------------------------------ 
#
			'S_SORT' => $lang['Sort'],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
			'S_SELECT_SORT' => $select_sort,
			'S_SELECT_SORT_ORDER' => $select_sort_order,

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

# 
#-----[ FIND ]------------------------------------------ 
#
		<td nowrap="nowrap"><select name="sort" class="post">
			<option value="user_id">{L_USER_ID}</option>
			<option value="user_active">{L_ACTIVE}</option>
			<option value="username">{L_USERNAME}</option>
			<option value="user_regdate">{L_JOINED}</option>
			<option value="user_session_time">{L_ACTIVTY}</option>
			<option value="user_level">{L_USER_LEVEL}</option>
			<option value="user_posts">{L_POSTS}</option>
			<option value="user_rank">{L_RANK}</option>
			<option value="user_email">{L_EMAIL}</option>
		</select></td>
		<td nowrap="nowrap"><select name="order" class="post">
			<option value="ASC">{L_ASCENDING}</option>
			<option value="DESC">{L_DESCENDING}</option>
		</select></td>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
		<td nowrap="nowrap">{S_SELECT_SORT}</td>
		<td nowrap="nowrap">{S_SELECT_SORT_ORDER}</td>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 

# EoM
Thanks to viewtopic.php for the "select" box logic.
Last edited by EverettB on Sun Jul 24, 2005 5:36 am, edited 1 time in total.

User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Post by uncle.f » Sun Jul 24, 2005 1:45 am

For those who are getting SQL errors after deleting some users with this mod please read this:

http://www.phpbb.com/phpBB/viewtopic.ph ... 63#1471863

I have already pointed this out long time ago, but my comment went kind of ignored. Let me repeat myself: there is a bug that incorrectly deletes a user who is a group moderator, and that screws up SQL queries afterwards.

FoulFoot
Registered User
Posts: 261
Joined: Mon Jun 23, 2003 1:04 am
Location: Honolulu, HI
Contact:

Post by FoulFoot » Sun Jul 24, 2005 3:11 am

EverettB wrote: Here's a fix for the dropdowns so they keep their state:

I'm getting the following error after applying your fix:

Code: Select all

SQL Error : 1054 Unknown column 'Active' in 'order clause'

SELECT * FROM phpbb_users WHERE user_id <> -1 AND username LIKE '%' ORDER BY Active LIMIT 0, 20

Line : 804
File : admin_userlist.php
Incidentally, there was another sort-bug fix posted some time ago:

http://mods.best-dev.com/viewtopic.php?p=16662

That one worked *partially*; the first sort parameter would "stick", but it would always revert back to "ascending".

Foul

User avatar
EverettB
Registered User
Posts: 326
Joined: Fri Aug 01, 2003 7:11 pm
Location: North America

Post by EverettB » Sun Jul 24, 2005 5:39 am

FoulFoot wrote:
EverettB wrote:Here's a fix for the dropdowns so they keep their state:

I'm getting the following error after applying your fix:

Code: Select all

SQL Error : 1054 Unknown column 'Active' in 'order clause'

SELECT * FROM phpbb_users WHERE user_id <> -1 AND username LIKE '%' ORDER BY Active LIMIT 0, 20

Line : 804
File : admin_userlist.php
Incidentally, there was another sort-bug fix posted some time ago:

http://mods.best-dev.com/viewtopic.php?p=16662

That one worked *partially*; the first sort parameter would "stick", but it would always revert back to "ascending".

Foul


I apologize, I pasted in the code above before I fully tested it and did not paste my final code before submitting the message.

The original posting above has been corrected. Please replace the code that was pasted into admin/admin_userlist.php with the new code above.

FoulFoot
Registered User
Posts: 261
Joined: Mon Jun 23, 2003 1:04 am
Location: Honolulu, HI
Contact:

Post by FoulFoot » Sun Jul 24, 2005 6:08 am

Well, we're getting closer. :) The sort works again, but it will only sort Ascending (selecting "Descending" does nothing... it resorts, but the list is ascending). Also, neither drop-down box remembers its settings (they are reverting to "Joined" and "Ascending")

Foul

User avatar
EverettB
Registered User
Posts: 326
Joined: Fri Aug 01, 2003 7:11 pm
Location: North America

Post by EverettB » Sun Jul 24, 2005 6:20 am

Did you make the change to templates/subSilver/admin/userlist_body.php ?

It is working for me.

FoulFoot
Registered User
Posts: 261
Joined: Mon Jun 23, 2003 1:04 am
Location: Honolulu, HI
Contact:

Post by FoulFoot » Sun Jul 24, 2005 6:42 am

Yep, made the changes in both files (and I just verified that I did so).

Foul

User avatar
EverettB
Registered User
Posts: 326
Joined: Fri Aug 01, 2003 7:11 pm
Location: North America

Post by EverettB » Sun Jul 24, 2005 6:46 am

I'm not sure what's wrong.

You already fixed the problem from this post, right?
http://www.phpbb.com/phpBB/viewtopic.ph ... 595#686595

FoulFoot
Registered User
Posts: 261
Joined: Mon Jun 23, 2003 1:04 am
Location: Honolulu, HI
Contact:

Post by FoulFoot » Sun Jul 24, 2005 6:59 am

Ack. Not sure how I missed that... I applied it at one time, but somehow, my current file was missing that fix.

Well, that fixed the problem with ascending/descending sorts. But it still isn't "sticking" (either box). They still revert to "Joined" and "Ascending" (this is the exact same problem I'm having with the previous fix that I linked to above. I just re-checked it, and neither box is sticking with that fix either).

I'm a complete novice when it comes to php -- I've tried looking at the code myself, and quickly lose my grip on what's going on -- but is it possible that the boxes aren't sticking for me due to a browser setting?

Foul

Post Reply

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