FR: Add a Sort by Last Visit Option in the Member list
Posted: 04 June 2004 03:16 AM   [ Ignore ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12416
Joined  04-29-2002

Question: How can I add a Sort by Last Visit Option in the member list?

Answer: You’ll need to make changes to the following file:

system/modules/member/mod.member.php
Remember to make a backup copy of the file before adding any changes.

Look for the block of text arould line 1835

// ----------------------------------------
//  Create the "Order By" menu
// ----------------------------------------
...

Right before this line:

$this->content = str_replace(LD.'order_by_options'.RD, $menu, $this->content);

Add:

$selected = ($order_by == 'last_visit') ? " selected='selected' " : '';
$menu .= "<option value='last_visit'".$selected.">".$LANG->line('last_visit')."</option>\n";


Save the file, and open your Member List. You’ll now be allowed to search by Last Visit. I also suggest using in descending order.

I can do this by hand, but I’d rather it be added to the code base.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 04 June 2004 09:08 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32911
Joined  05-14-2004

thank you, Sue. =)

 Signature 
Profile
MSG
 
 
Posted: 01 March 2005 12:51 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  140
Joined  05-21-2004

Does this not work anymore? I just switched to 1.2.1 and this no longer works. It worked fine when I redid it for the last two upgrades, but I just finished adding it into that php file and after uploading, there’s no option for it. :(

Profile
 
 
Posted: 27 December 2005 05:53 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12416
Joined  04-29-2002
sdoucet - 01 March 2005 12:51 PM

Does this not work anymore? I just switched to 1.2.1 and this no longer works. It worked fine when I redid it for the last two upgrades, but I just finished adding it into that php file and after uploading, there’s no option for it. :(

I don’t know about 1.2.1, but I got it to work for 1.4—different file, though.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 27 December 2005 05:56 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12416
Joined  04-29-2002

If you need this functionality in 1.4:

Modify the file called mod.member_memberlist.php:

Around line 919, add the following code:

//------------------------------------
// Add sort by last visit date
//------------------------------------
    
$selected = ($order_by == 'last_visit') ? " selected='selected' " : '';
    
$menu .= "<option value='last_visit'".$selected.">".$LANG->line('last_visit')."</option>\n";

//-------------------------------------
// End added code
//-------------------------------------

As always, back up your file prior to editing, etc.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 07 April 2006 09:40 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32911
Joined  05-14-2004

oh oh oh, wait for it . .


wiki’d.

=)

 Signature 
Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65027 Total Logged-in Users: 40
Total Topics: 82116 Total Anonymous Users: 20
Total Replies: 441313 Total Guests: 193
Total Posts: 523429    
Members ( View Memberlist )