Page Index Toggle Pages: 1 2 3 [4] 
Topic Tools
Very Hot Topic (More than 25 Replies) Memberlist Sorting & Rebuild Members List (Read 12,986 times)
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Re: Memberlist Sorting & Rebuild Members List
Reply #12 - Nov 6th, 2006 at 12:07am
Post Tools
Just now ran it again.

- Recount membership was very fast.
- Rebuild memberlist and recount membership are still separate functions.
- It split the rebuild memberlist into steps, but it was only doing a few hundred at a time.  That made it take a very long time (20 minutes) to complete.  It should probably do more like 3,000 at a time versus 600 at a time.
- The sort by registered date is totally out of wack now.  Some 2001 at the end, 2006 all over the place (but in large blocks like other years), and months not in the right order for years that are in the right place.
« Last Edit: Nov 6th, 2006 at 12:07am by Corey Chapman »  

Back to top
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Memberlist Sorting & Rebuild Members List
Reply #11 - Nov 5th, 2006 at 5:16am
Post Tools
Bump... Undecided
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Memberlist Sorting & Rebuild Members List
Reply #10 - Oct 30th, 2006 at 11:33pm
Post Tools
@Corey: Did you run this yet? If so, was there a bug with it? (since I see many users with no regdate in the memberlist)
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Memberlist Sorting & Rebuild Members List
Reply #9 - Aug 8th, 2006 at 1:23pm
Post Tools
I split it into steps. New Admin/Admin.pl, Languages/English/Admin.lng in CVS now.
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Re: Memberlist Sorting & Rebuild Members List
Reply #8 - Jun 16th, 2006 at 2:58am
Post Tools
Ya, try that.  Because it doesn't seem like it's doing anything right now.  It just loads and never stops.
  

Back to top
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Memberlist Sorting & Rebuild Members List
Reply #7 - Jun 16th, 2006 at 2:39am
Post Tools
That sounds like a different issue to me. It worked fine on my testforum of 2 users + 1 garbage entry.

I can see about breaking it into steps like I did with the member history, if you'd like.
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Re: Memberlist Sorting & Rebuild Members List
Reply #6 - Jun 16th, 2006 at 1:52am
Post Tools
Not so sure this is fixed....  I clicked Rebuild Members List and it sat there loading for about 10 minutes.  Nothing happened, so I finally clicked stop.  The bad entries in the memberlist still exist and the sorting is still wrong.
  

Back to top
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Memberlist Sorting & Rebuild Members List
Reply #5 - Jun 15th, 2006 at 10:33pm
Post Tools
Fixed the problem with keeping bad entries. New Sources/System.pl in CVS
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Memberlist Sorting & Rebuild Members List
Reply #4 - May 31st, 2006 at 12:19am
Post Tools
Yeah. In fact, they use the same subroutine for the Recount part of it.

As for it not checking to see if a .vars file exists, well, it appears we can fix this by removing two lines in System.pl (lines are highlighted.)
Code
Select All
	if ($memaction eq "rebuild") {
		&is_admin_or_gmod;
		$regcounter = 0;
		opendir(MEMBERS, $memberdir) || die "$txt{'230'} ($memberdir) :: $!";
		@contents = grep { /\.vars$/ } readdir(MEMBERS);
		closedir(MEMBERS);
		&ManageMemberlist("load");
		&ManageMemberinfo("load");
		foreach $member (@contents) {
			chomp $member;
			$member =~ s/\.vars$//g;
			if ($member) {
				$grpdel   = 0;
				$grpexist = "";
				&UserCheck($member, "realname+email+regdate+position+addgroups+postcount");
				(@addigroups) = split(/\,/, $usercheck{'addgroups'});
				foreach $addigrp (@addigroups) {
					if (!exists $NoPost{$addigrp}) { $grpdel = 1; }
					else { $grpexist .= qq~$addigrp,~; }
				}
				$actposition = $usercheck{'position'};
				if (!exists $Group{$actposition} && !exists $NoPost{$actposition}) {
					$usercheck{'position'} = "";
					$grpdel = 1;
				}
				if ($grpdel) {
					if (!${$uid.$member}{'password'}) { &LoadUser($member); }
					$grpexist =~ s/,\Z//;
					${$uid.$member}{'addgroups'} = qq~$grpexist~;
					${$uid.$member}{'position'}  = $usercheck{'position'};
					&UserAccount($member, "update");
				}
				$regtime = stringtotime($usercheck{'regdate'});
				$formatregdate = sprintf("%010d", $regtime);
				if (!$usercheck{'position'}) { $usercheck{'position'} = &MemberPostGroup($usercheck{'postcount'}); }
				$memberlist{$member} = qq~$formatregdate~;
				$memberinf{$member}  = qq~$usercheck{'realname'}\|$usercheck{'email'}\|$usercheck{'position'}\|$usercheck{'postcount'}\|${$uid.$member}{'addgroups'}~;
				$regcounter++;
			}
		}
		&ManageMemberlist("save");
		&ManageMemberinfo("save");
		&MembershipCountTotal;
		return 0;
	}
 



However, I don't know if this would cause any other problems. Another dev might have a better answer, such as Ron or Loony.
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Re: Memberlist Sorting & Rebuild Members List
Reply #3 - May 31st, 2006 at 12:08am
Post Tools
So rebuild definitely does the 1 thing that recount does too?  I'd say remove the other then since they go hand in hand.

Is there any way to speed up the rebuild function?  Also, isn't the date registered required to be a specific date format?  It should check to see that it is.  However, I would assume that "rebuild" would re-create forgotten.passes, memberlist.txt, AND memberinfo.txt.  And any other related files if there are any.  If it's truly recreating, then it should find that those username.vars don't exist by reading the directory contents, so it shouldn't be able to put the user in any of those 3 files.  Am I wrong somewhere?  Maybe this function doesn't do as much as I thought or as it should?
« Last Edit: May 31st, 2006 at 12:09am by Corey Chapman »  

Back to top
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Memberlist Sorting & Rebuild Members List
Reply #2 - May 31st, 2006 at 12:05am
Post Tools
No idea about the date issue. I'll dive into it later if I get the chance, but date and time isn't my strongpoint.

Those user's should've been removed from the files, I agree, but here's the explanation:
Code
Select All
members/memberlist.txt:<username>	 0000000000 


The zero's are the registration time -- seems like it was corrupted.

As for combining it, that's a good idea. The "Recount membership" function could be removed entirely, it seems, as the "Rebuild Memberlist" covers the same things and more. The speed is the only issue -- Recount is fast but Rebuild is significantly slower.
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Re: Memberlist Sorting
Reply #1 - May 30th, 2006 at 11:53pm
Post Tools
In addition to this, the "Rebuild Members List" function does not work.  I manually removed 5 users' .vars files because they were 0 bytes and all dated January 17.  I ran recount membership then rebuild members list.  However, those 5 users still appear in the "Members" list here.

When I do a grep, I get these results still remaining for those now gone users.  And what is "0000000000" ??
Code
Select All
members/memberlist.txt:<username>	 0000000000
members/forgotten.passes:$pass{"<username>"} = '<password>';
members/memberinfo.txt:<username>	 ||YaBB Newbie|| 



Once this function is fixed, can it be combined with "Recount membership" ?  I see not reason to have two separate functions....
« Last Edit: May 30th, 2006 at 11:54pm by Corey Chapman »  

Back to top
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Memberlist Sorting & Rebuild Members List
May 16th, 2006 at 11:00pm
Post Tools
Sorting by date does not work in the memberlist.  It groups dates together for the most part (not fully correct), but some members are completely in the wrong spot.

See http://www.yabbforum.com/community/YaBB.pl?action=ml;sort=regdate;letter=;start=... for the example.  There are January 2001 entries after December 2001 entries and only one January 2002 entry in between where it should be (after December 2001).
« Last Edit: May 30th, 2006 at 11:54pm by Corey Chapman »  

Back to top
IP Logged
 
Page Index Toggle Pages: 1 2 3 [4] 
Topic Tools
 
  « Board Index ‹ Board  ^Top