Selecting users search by Profield Fields created

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Anti-Spam Guide
Post Reply
User avatar
karbiko
Registered User
Posts: 74
Joined: Thu Jul 24, 2008 8:47 pm
Location: La Palma, Canary Islands, Spain

Selecting users search by Profield Fields created

Post by karbiko » Wed Nov 15, 2017 8:30 am

I have seen @javiexin ext Advanced Profile Fields Pack (viewtopic.php?f=456&t=2327001)

But with that one, it is not posible to search users selecting them by one of the profile fields created.

Do you know any other ext to get that option?
Is it posible to develop that one for this purpose?

Does anyone know how to do that?


thanks in advance!
Last edited by karbiko on Sat Feb 10, 2018 9:37 am, edited 1 time in total.

User avatar
karbiko
Registered User
Posts: 74
Joined: Thu Jul 24, 2008 8:47 pm
Location: La Palma, Canary Islands, Spain

Re: Selecting users by Profield Fields created

Post by karbiko » Tue Feb 06, 2018 9:56 pm

Can anyone try to develop one ext for this?

I have found one development (by Zoby in www.phpbb-es.com) that worked in 3.1.x, but in 3.2.x it doesn't because of the SQL question..

It's this one:

open: /styles/prosilver/template/memberlist_search.html
Search:

Code: Select all

	<dl>
		<dt><label for="username">{L_USERNAME}:</label></dt>
		<dd><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" /></dd>
	</dl>
Add in a new line after:

Code: Select all

	<dl>
		<dt><label for="phpbb">phpBB:</label></dt>
		<dd><input type="text" name="phpbb" id="phpbb" value="" class="inputbox" /></dd>
	</dl>	
Open: /memberlist.php
Search:

Code: Select all

$search_params = array('username', 'email', 'icq', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
Inline

Code: Select all

'username',
Add after (in the same line)

Code: Select all

 'phpbb',
Search:

Code: Select all

$username	= request_var('username', '', true);
Add after in a new line:

Code: Select all

			$phpbb		= request_var('phpbb', '');
Search:

Code: Select all

			$sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
Add after in a new line:

Code: Select all

			$sql_where .= ($phpbb) ? ' AND fd.pf_phpbb ' . $db->sql_like_expression(str_replace('*', $db->any_char, $phpbb)) . ' ' : '';
Search:

Code: Select all

FROM ' . USERS_TABLE . " u$sql_from
Replace with:

Code: Select all

FROM (' . USERS_TABLE . " u$sql_from) LEFT JOIN " . PROFILE_FIELDS_DATA_TABLE . " fd ON (u.user_id = fd.user_id)
Search:

Code: Select all

FROM " . USERS_TABLE . " u
				$sql_from
Replace with:

Code: Select all

FROM (" . USERS_TABLE . " u
                 $sql_from)
			LEFT JOIN " . PROFILE_FIELDS_DATA_TABLE . " fd ON (u.user_id = fd.user_id)
After than, clean cache



As I said, this is not working now... Perhaps someone could develop the request ext begining with Zoby's previous dev!!

User avatar
3Di
Registered User
Posts: 12685
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Selecting users by Profield Fields created

Post by 3Di » Tue Feb 06, 2018 11:37 pm

karbiko wrote:
Tue Feb 06, 2018 9:56 pm
but in 3.2.x it doesn't because of the SQL question..
Wich SQL question ¿
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
karbiko
Registered User
Posts: 74
Joined: Thu Jul 24, 2008 8:47 pm
Location: La Palma, Canary Islands, Spain

Re: Selecting users by Profield Fields created

Post by karbiko » Wed Feb 07, 2018 7:58 am

Sorry, I didn't mean question, but SELECT syntax and the sql_where condition !!

My fault, by translating directly from my language to english!!

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: nou nou and 11 guests