1
deka87
user profiles search results
  • 2008/9/10 13:15

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Hi,

Ho do I save search (via modules/profile/search.php) results? I don't need it to be static but updated as new users register. Or is there such a module to do so?

thanks in advance
Mind anchors

2
ghia
Re: user profiles search results
  • 2008/9/11 0:05

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Can you tell more and give an example of what you want to accomplish.

3
deka87
Re: user profiles search results
  • 2008/9/11 3:37

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


I have added several lines to the registration form e.g. native language. And I want to make a list of users whose native language is Russian for example. But I don't want users to do the searach to get a list of those users, but I want to put a link in the custom block that would look like Russian, Spanish, German etc. Hope it's clear no. If not, please let me know.
Mind anchors

4
ghia
Re: user profiles search results
  • 2008/9/11 8:22

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


OK, You want to make a link which include the search criteria.

You have to know the databasefield name of your profile field eg. language.
Depending on it being a text field or a choice, you specify a text or number as search argument.
/modules/profile/search.php?language=German&op=results

or
/modules/profile/search.php?language[]=3&op=results

You can add other parameters eg:
/modules/profile/search.php?uname_match=0&uname=&name_match=0&name=&email_match=0&email=&user_regdate_larger=YYYY%2FMM%2FDD&user_regdate_smaller=YYYY%2FMM%2FDD&posts_larger=&posts_smaller=&actkey_match=0&actkey=&last_login_larger=YYYY%2FMM%2FDD&last_login_smaller=YYYY%2FMM%2FDD&user_aim_match=0&user_aim=&user_icq_match=0&user_icq=&user_from_match=0&user_from=&user_yim_match=0&user_yim=&user_msnm_match=0&user_msnm=&user_intrest_match=0&user_intrest=&user_occ_match=0&user_occ=&url_match=0&url=&newemail_match=0&newemail=&sortby=13&order=0&limit=&submit=Submit&skipValidationJS=0&op=results

Of course you use all your custom fields by adding them.

5
deka87
Re: user profiles search results
  • 2008/9/11 8:52

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Thank you! So if I get it right, if I need to list the users based on the following criteria: 'target_language' = russian, 'source_language'=english (both are text fileds), the code will look like:
/modules/profile/search.php?target_language=Russian&source_language=English&op=results
Right?

And one more question, is the result case sensitive?
Mind anchors

6
ghia
Re: user profiles search results
  • 2008/9/11 9:30

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:

Right?
Yes, you got the idea. You can experiment with this in your browser URL field.
Quote:
is the result case sensitive

The result ordering depends on your database collation.

You can also look up with partial names.
For that you add &fieldname_match=matchnumber
The matchnumbers are:
0 starting with
1 ending with
2 equal (this is the default and not needed to specify)
3 containing
eg
/modules/profile/search.php?target_language=Rus&target_language_match=0&source_language=English&op=results

will find Russian and Rusky, while matchnr 3 will find also BelaRusian.

Login

Who's Online

1260 user(s) are online (59 user(s) are browsing Support Forums)


Members: 0


Guests: 1260


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits