vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Search members by custom profile fields (https://vborg.vbsupport.ru/showthread.php?t=35423)

Admin 02-24-2002 10:00 PM

Search members by custom profile fields
 
Here's another quick hack, allows your users (you can already do this in the Admin CP) to find other members using custom profile fields.
This hack will use all the fields you have set up, except those that are marked as "Hidden".

For a demo, I attached a screen shot of this in post #2.

Have fun! :)

Admin 02-25-2002 06:28 AM

Demo...
(What do you say about my drawing skills, eh? :D)

TECK 02-25-2002 06:52 AM

lol.. anyway, sheila will be happy right? another happy user :D

Reeve of shinra 02-25-2002 12:08 PM

Out of idle curiousity, if you happen to have alot of custom fields, will this add any lag time?

Admin 02-25-2002 12:23 PM

No.

neal 02-25-2002 03:10 PM

lookng great, another good one chen!

incursio 02-25-2002 07:46 PM

If the search produces more than 1 page of results, the hack doesn't work for subsequent pages - FYI.

incursio 02-25-2002 08:08 PM

An easy fix (adds another query, but I don't care):

in memberslist.php, find

PHP Code:

 $pagenav getpagenav($totalusers,"memberlist.php?s=$session[sessionhash]&action=$action&what=$what&ltr=$ltr&perpage=$perpage&orde
rby=
$orderby&ausername=$ausername&ahomepage=$ahomepage&aicq=$aicq&aaim=$aaim&ayahoo=$ayahoo&joindateafter=$joindateafter&joindatebef
ore=
$joindatebefore&lastpostafter=$lastpostafter&lastpostbefore=$lastpostbefore&postslower=$postslower&postsupper=$postsupper&direct
ion=
$direction$extra_stuff"); 

First, add the "$extra_stuff" to the end. Then right above this line, add:

PHP Code:

  $bgcounter=0;
  
$tmprc=$DB_site->query("SELECT profilefieldid FROM profilefield WHERE hidden=0");

  while (
$profilefield=$DB_site->fetch_array($tmprc) and ++$bgcounter) {
    
$fldname "fields[" $bgcounter "]";
    
$realfld "$fields[$bgcounter]";
    
$extra_stuff .= "&" $fldname "=" urlencode($realfld);
  }
  if(
$tmprc$DB_site->free_result($tmprc); 

Seems to work for me.

rx7forums.com 02-26-2002 08:14 PM

Just installed and nothing happens when I search via a locaton. What could be wrong take a look here. http://www.rx7forums.com/forums/memb...?action=search

KuraFire 05-06-2002 07:30 PM

Thanks man, this hack is great, and seems to work just fine :):up:

Takara 05-07-2002 11:27 AM

I modified this just a bit so that it only searches one extra profile feild, and it works great.

Thanks ^_^ :bunny:

roxics 07-02-2002 09:22 AM

Hey this is great. Thanks

Just curious though. How could I integrate some of these search fields into a table on the front page of my website?

Admin 07-02-2002 01:48 PM

I'm not sure what you mean, roxics.

roxics 07-02-2002 04:47 PM

Well lets say I go into Advanced members search on the board. But I want to take a few of these seach fields and stick them on the front page of the site. So that when people arrive at the site they see some fields on the left in a table called "Seach members by location"

Just a way of making the seach fields more accessable.

Admin 07-02-2002 06:03 PM

Copy the form you see in the search page, and remove the fields you don't need.

roxics 07-02-2002 06:49 PM

Wow that was super easy. Thanks. I don't know why I thought it would be more complicated then that. :)

Keith 09-10-2002 07:42 PM

Hi Chen,

A long time ago I requested a hack similar to this. The actual request was for admin level only, to be able to search and find members based on a custom profile field, and generate a mail list for it.

It was based on identifying members with boats under 24 feet for instance so we could send a custom email. But I think it may have been posted before VBulletin.Org started. May have posted the request on VBulleting.com.

Anyways, how can I edit this code to simply allow the admin only to do the search on custom fields to generate an email list?

cobradude 09-11-2002 05:14 AM

Works like a charm on 2.2.7

Thanks FireFly!

aadvani 10-01-2002 02:40 AM

For which vB version is this hack?
I have vB 2.2.7 and the memberlist.php file does NOT contain any code such as what is mentioned in your [FireFly] attached file "search_mlist_2.0.txt".
AA

aadvani 10-10-2002 12:06 PM

Figured it out, finally!
GREAT hack, FireFly - thanks!
AA

telc 10-29-2002 03:30 AM

will this be part of v3

USODJA 12-17-2002 04:13 PM

Is there a working version for 2.2.9 .... some parts of the code are different

zimmerm 01-09-2003 04:59 AM

is there anyway to modify this so that you can access a new search page that will allow you to only search one of the custom fields?

Gutspiller 01-18-2003 10:57 PM

I have an older board and I got all the way through the instructions, but the last step:

In the "memberlistsearch" template, add $customfields right *above* this:

PHP Code:

<tr>
    <
td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}"><b>Options</b></normalfont></td>
</
tr

I don't have a "memberlistsearch" template. Can anybody help me on where I might add this last step on an older board?

Please Help. :(

lemarsu 04-06-2003 06:57 PM

It is a bit unrelated to this thread... but in another way it is very much so related.....

Is there a way to add the custom profile fields in the search of Email Users in the admin section ?

Thanks
LeMarsu

floridaideal 04-08-2003 07:43 AM

Hi all

I have set this great hack up but would like the users to be able to search just one profile field, can anyone tell me what I need to change to do this.

Thank you

Stuart

themonarch 08-24-2003 08:25 PM

Got a parse error on vBulletin 2.3.2.

gmarik 11-04-2003 06:46 PM

Oh, I would love to have it working on 2.3 as well. Chen?!

Robert Basil 11-13-2003 02:03 PM

Quote:

Originally Posted by gmarik
Oh, I would love to have it working on 2.3 as well. Chen?!

(In my best AOL voice)..... Me too! ;)

Tilmanitou 01-12-2004 10:48 PM

Quote:

Originally Posted by Sportbikeworld
(In my best AOL voice)..... Me too! ;)

Me too! seems it is not working on v2.3.? Please let us know Chen! :nervous:

ricker 01-27-2004 07:12 PM

GOOD STUFF
*installs*

Tilmanitou 01-29-2004 06:45 PM

Quote:

Originally Posted by ricker
GOOD STUFF
*installs*

did you get it to run on vb 2.3.3 ?
please let us know!

Emmy2 03-14-2004 01:32 AM

I just installed this on vb2.3.4 and it works perfectly.

John Diver 03-05-2007 12:15 PM

Sorry to bring up such an old thread, is this available for vb3?


All times are GMT. The time now is 05:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01261 seconds
  • Memory Usage 1,787KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete