Jump to content

[Suggestion] Member search via language option


Guest AndyF

Recommended Posts

Posted

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 :)

Posted

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 ;)

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...