[2.0.12] Hide Zero Posters

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
13
65%
Very Good
2
10%
Good
0
No votes
Fair
2
10%
Poor
3
15%
 
Total votes: 20

NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

Thank you for that but pretend you are addressing someone who knows nothing of SQL commands or PHP coding.

If I leave the functions_post.php file as is (with the deleted code, as instructed on page 2) and do not query the database via phpmyadmin (with the 2nd and 3rd lines of the SQL commands), what will the end result be? It seems to be working now.

Thanks again,

Brian
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

I tried to run the command through PhpMyAdmin and this is what I got:
Error

SQL query:

UPDATE phpbb_users AS u,
phpbb_posts AS p1 LEFT OUTER JOIN phpbb_posts AS p2 ON p1.poster_id = p2.poster_id AND p2.post_time & lt;

MySQL said: Documentation
#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 1
NewGuy2006
Registered User
Posts: 64
Joined: Mon May 01, 2006 1:29 am

Post by NewGuy2006 »

Okay, it's working now. I was able to use "SQL" under PhpMyAdmin to add the 2nd and 3nd lines of command, I re-edited the functions_post.php file manually and everything is working beautifully.

Excellent mod: Thanks again!

Brian
Babadski
Registered User
Posts: 4
Joined: Thu Dec 29, 2005 5:57 pm

Post by Babadski »

I'm having the same exact problem the previous poster had. Failed on the 2nd of 4 sql statements using easymod to install the mod. Could someone talk me through how to fix this? I'd really like to add this mod to my forum.
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost »

Are you using MySQL 3.23 or sometihng like that?

If so, the following should help:

http://www.phpbb.com/phpBB/viewtopic.ph ... 45#1503445
terryallan
Registered User
Posts: 14
Joined: Thu Aug 19, 2004 10:33 am
Location: UK

MOD didn't work for me - what did I do wrong?

Post by terryallan »

Please ignore - I posted in the wrong topic and so have deleted the text - sorry

**********

Best wishes

Terry
User avatar
bacon tacon
Registered User
Posts: 286
Joined: Sun Oct 27, 2002 8:17 pm
Contact:

Post by bacon tacon »

I'm having a similar problem to some previous posters. When I executed db_update.php I got this error:
UPDATE phpbb_users SET (user_firstpost) = SELECT MIN(post_time) FROM phpbb_posts WHERE phpbb_posts.poster_id = phpbb_users.user_id
+++ Error: 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 '(user_firstpost) = SELECT MIN(post_time) FROM phpbb_posts WHERE


MySQL version 4.0.27-standard

I tried to delete the sections in functions_post.php as suggested, but they don't exist in my version. Maybe because of other Antispam mod and others?

I've edited all the other files as instructed. When I try to visit memberlist I get
Could not query users

DEBUG MODE

SQL Error : 1054 Unknown column 'user_firstpost' in 'field list'

SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_firstpost, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar FROM phpbb_users WHERE user_id <> -1 ORDER BY user_regdate ASC LIMIT 0, 50

Line : 151
File : memberlist.php


Any suggestions about how I should proceed?
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost »

That error, in particular, isn't going to be fixed by removing code snippets from any *.php file - it's only going to be fixed by doing the prerequired SQL queries.
pbellamy
Registered User
Posts: 51
Joined: Fri Apr 04, 2003 10:24 am
Location: West Sussex, UK
Contact:

Post by pbellamy »

I've tried to delete a post which is not someones first one and get the following error.

Code: Select all

Unable to update user_firstpost

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'AS u, phpbb_posts AS p1 INNER JOIN phpbb_posts AS p2 ON p2.post_id = 1' at line 1

UPDATE phpbb_users AS u, phpbb_posts AS p1 INNER JOIN phpbb_posts AS p2 ON p2.post_id = 113306 SET u.user_firstpost = 0 WHERE u.user_id = p2.poster_id AND u.user_firstpost = p2.post_time;

Line : 508
File : functions_post.php
Line 508 reads

Code: Select all

			message_die(GENERAL_ERROR, 'Unable to update user_firstpost', '', __LINE__, __FILE__, $sql);
fizz-ed
Registered User
Posts: 12
Joined: Tue Sep 07, 2004 3:28 am

Post by fizz-ed »

cutaia wrote: Hey...it's me again from the first half of this thread. :oops:

I reinstalled a forum recently and used this mod again, but this time it did something crazy weird.

http://forum.cutaia.net/memberlist.php

This is my memberlist. Those first three people actually used to be at the very end of the list. But suddenly when I re-added this mod. They've jumped before even me!

And they apparently joined in 1969. 8O

So...the question is...how did the mod do this, and how can I fix it?

(I've tested and new signups work like they should...going to the end of the list. So, maybe it's as simple as editing the database information for just those 3 people. But I don't know how. :( )

Any help would be great.


I am also running into this. How do I get it from 1969 to the correct year?
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost »

pbellamy - let me guess - you're using MySQL 3.23?

Anyway, try this:

http://www.phpbb.com/phpBB/viewtopic.ph ... 45#1503445

fizz-ed - my guess would be that you didn't run the SQL queries. Or rather, you didn't run the UPDATEs.
jayebirdblue
Registered User
Posts: 5
Joined: Sat Nov 18, 2006 4:08 am

Post by jayebirdblue »

If those 0 Posts users don't show up in the memberlist, how can Administrators see them? Or are they ghosts? There's got to be a place I can actually view *ALL* members.
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost »

I'd recommend installing wGEric's Admin Userlist mod to do that.

I used to include it with this mod but later stopped. Any updates of that mod would have meant that this mod would have to be updated, as well, which would (1) require it be a validated by the MOD Team a whole lot more and (2) if I lost interest in this mod (and in truth, I actually kinda have...), it'd become out-of-date with every subsequent release of the Admin Userlist mod.
mgby1
Registered User
Posts: 1
Joined: Mon Dec 04, 2006 1:27 am

Post by mgby1 »

I'm having an issue with this script (v2.0.0)

I do not like that the Memberlist is being sorted by First Post Date when you are trying to get it to sort by Join date. (Yes, I use auto-pruning on my forum).

Is it possible to have the Memberlist page sorted by true Join date while still filtering out users with zero posts? In other words - stop it from forcing the sort to be by date of first post.
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost »

Undoing the following changes you had to make to install this MOD should do the trick:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
memberlist.php

#
#-----[ FIND ]------------------------------------------
#
	case 'joined':
		$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;

#
#-----[ REPLACE WITH ]----------------------------------
#
	case 'joined':
		$order_by = ($board_config['zero_list'] ? "user_firstpost" : "user_regdate") . " $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
#
#-----[ FIND ]------------------------------------------
#
	default:
		$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;

#
#-----[ REPLACE WITH ]----------------------------------
#
	default:
		$order_by = ($board_config['zero_list'] ? "user_firstpost" : "user_regdate") . " $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;
#
#-----[ FIND ]------------------------------------------
#
		$joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']);

#
#-----[ IN-LINE FIND ]---------------------------------
#
$lang['DATE_FORMAT'],

#
#-----[ IN-LINE AFTER, ADD ]---------------------------
#
 $board_config['zero_list'] ? $row['user_firstpost'] :
Post Reply

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