Page 4 of 9

Posted: Fri May 19, 2006 8:10 am
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

Posted: Fri May 19, 2006 8:21 am
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

Posted: Fri May 19, 2006 8:37 am
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

Posted: Thu Aug 31, 2006 7:00 pm
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.

Posted: Thu Aug 31, 2006 7:05 pm
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

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

Posted: Sun Sep 17, 2006 4:23 pm
by terryallan
Please ignore - I posted in the wrong topic and so have deleted the text - sorry

**********

Best wishes

Terry

Posted: Tue Oct 31, 2006 9:24 pm
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?

Posted: Tue Oct 31, 2006 11:39 pm
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.

Posted: Tue Nov 07, 2006 8:03 pm
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);

Posted: Fri Nov 24, 2006 10:06 pm
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?

Posted: Sat Nov 25, 2006 8:32 pm
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.

Posted: Fri Dec 01, 2006 4:22 am
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.

Posted: Fri Dec 01, 2006 4:43 am
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.

Posted: Mon Dec 04, 2006 1:32 am
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.

Posted: Mon Dec 04, 2006 5:46 am
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'] :