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:


All times are GMT. The time now is 09:27 PM.

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.01120 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete