Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 952

PostPosted: Tue Feb 15, 2005 12:47 am Reply with quote

Hack: Add Last Visited Sort to Member List
PHP-Nuke Version: 7.5
Patchset: 2.8
Theme: fisubsilversh [if appropriate]
Mods: Approve Membership Module 6.0
Files to Modify:
- modules/Members_List/index.php

After having added the Last Visited field to the Members List I wanted a way to bring the most recently visited member to the top of the list with a Descending sort.

Updates to Make to: modules/Members_List/index.php

Code:

####Find####
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'],  $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joined', 'username', 'location', 'posts', 'email', 'website', 'topten');

####Replace With####
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'],  $lang['Sort_Website'], $lang['Sort_Top_Ten'], $lang['Sort_Last_Visit']);
$mode_types = array('joined', 'username', 'location', 'posts', 'email', 'website', 'topten', 'lastvisit');

####Find####
case 'topten':
                $order_by = "user_posts $sort_order LIMIT 10";
                break;

####Add After####
        case 'lastvisit':
                $order_by = "user_lastvisit $sort_order LIMIT $start, " . $board_config['topics_per_page'];
                break;


Updates to Make to: modules/Forums/language/lang_english/lang_main.php

Code:

####Find####
//
// Memberslist
//

####Add at the bottom of this sections' list of defines####
$lang['Sort_Last_Visit'] = 'Last Visit Date';


That about does it! Works like a champ and you can now sort ascending or descending on this added field.

Enjoy,
montego
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 952

PostPosted: Tue Feb 22, 2005 6:47 am Reply with quote

Same as the above!

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
Forum - Join the conversation on the Thoughts.com forums
Executive Resumes - providing complimentary resume analysis
PhpNuke Themes
Lobo Links Web Directory
linear-bunch