Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
AndyF Posted November 8, 2008 Posted November 8, 2008 At the moment (with 2.3.x , not seen 3.0's ACP yet) , when you search for a member (or members) via management the "Optional Search Parameters" section, I was just thinking it could do with another option adding (drop down)Members Language Choice I can see it might help some boards (not mine) , just a suggestion anyway :)
tamplan Posted November 8, 2008 Posted November 8, 2008 Open '/sources/action_admin/member.php'. In the function 'search_form()', find : //----------------------------------------- // Start form //----------------------------------------- Add above : //----------------------------------------- // Member Language Choice //----------------------------------------- $lang_list = array( 0 => array( 'all', 'Any Language') ); $this->ipsclass->DB->simple_construct( array( 'select' => 'ldir, lname', 'from' => 'languages' ) ); $this->ipsclass->DB->simple_exec(); while ( $data = $this->ipsclass->DB->fetch_row() ) { $lang_list[]= array($data['ldir'], $data['lname']); } Find : $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Is in secondary group...</b>" , $this->ipsclass->adskin->form_dropdown( "mgroup_others", $mem_group, isset($_POST['mgroup_others']) ? $_POST['mgroup_others'] : '' ) ) ); Add below : //----------------------------------------- // Member Language Choice //----------------------------------------- $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Language choice is...</b>" , $this->ipsclass->adskin->form_dropdown( "language", $lang_list, isset($_POST['language']) ? $_POST['language'] : '' ) ) ); In the function 'search_results()', find : foreach( array('name', 'members_display_name', 'memberid', 'email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','mgroup_others') as $bit ) Replace with : foreach( array('name', 'members_display_name', 'memberid', 'email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','mgroup_others', 'language') as $bit ) Find : else if ($bit == 'mgroup') { if ($this->ipsclass->input['mgroup'] != 'all') { $query[] = $table_prefix."mgroup=".$this->ipsclass->input['mgroup']; } } Add above : else if ($bit == 'language') { if ($this->ipsclass->input['language'] != 'all') { $query[] = $table_prefix."language='".$this->ipsclass->input['language']."'"; } } Save, upload and enjoy ! Hope this help ;)
Adriano Faria Posted November 8, 2008 Posted November 8, 2008 Hey tamplan, I got this on page top:Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\f236\sources\lib\admin_skin.php on line 317 And the language select is empty.
tamplan Posted November 9, 2008 Posted November 9, 2008 I have change the first code box for added code in the function 'search_form()'.
Adriano Faria Posted November 9, 2008 Posted November 9, 2008 Sorry... my mistake! I wasn't using on search function! Works nice! Great addon.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.