View Full Version : Must have Photo in MemberSearch
T3MEDIA
12-25-2004, 04:53 PM
I get 1000 members aday (www.sprnch.com) and I get 60-70 notes asking how can they search for people with a photo only.
Woah... this is every day. I gota do soemthing!:devious:
any of you guys know how to do this? PLEASE... and CHEESE!
n_wattam
12-25-2004, 08:07 PM
This shouldnt be to dificult really, but using the IF CONSTANT command...
T3MEDIA
12-25-2004, 09:33 PM
This shouldnt be to dificult really, but using the IF CONSTANT command...
ok.
how? like what do you mean. I would love your input.
T3MEDIA
12-27-2004, 01:10 PM
Bump?
T3MEDIA
12-27-2004, 10:07 PM
:ermm:
:ermm:
Please don't bump several times in the same day. As for your question I really don't know how you would do this.
T3MEDIA
12-27-2004, 10:22 PM
Please don't bump several times in the same day. As for your question I really don't know how you would do this.
that was yesterday. And thank you for your response. Hopefully some one will know how.
that was yesterday. And thank you for your response. Hopefully some one will know how.
Actually they where only 9 hours apart
T3MEDIA
12-27-2004, 10:25 PM
Actually they where only 9 hours apart
Just to let you know it was yesterday.
Not the same day.
Look I said thanks for your help.
T3MEDIA
01-09-2005, 06:57 PM
bump...
any ideas?
T3MEDIA
01-11-2005, 03:18 PM
anyone? Why do they force you to come here if NO ONE will even try to help?
T3MEDIA
01-14-2005, 12:09 AM
Guys.. wtf... its that hard? I know I have no idea. OK tell me at least what points to the graphics on a profile field... I'll try myself.
T3MEDIA
01-18-2005, 12:40 AM
Helllp! Like Help!
sabret00the
01-18-2005, 02:49 PM
don't you want this for vB3 anyway?
Andreas
01-18-2005, 02:53 PM
For vB3 I'd modify the query to make a join on customprofilepic and check if a row does exist.
T3MEDIA
01-18-2005, 03:15 PM
For vB3 I'd modify the query to make a join on customprofilepic and check if a row does exist.Yes I want it for Vb3...
So Kirby you think this idea you said could work?
Andreas
01-18-2005, 03:27 PM
Yes, it does work (in theory, didn't write the code and test it)
T3MEDIA
01-21-2005, 03:22 AM
yeah.... looking for code.
Andreas
01-21-2005, 03:50 AM
OK, this is just spin-off and untested
In memberlist.php FIND
'usergroupid' => INT
REPLACE that with
'usergroupid' => INT,
'haspic' => INT
FIND
if ($vboptions['usememberlistadvsearch'])
{
BELOW that ADD
if ($haspic) {
$condition .= " AND NOT ISNULL(customprofilepic.userid) ";
}
FIND
$userscount = $DB_site->query_first("
SELECT COUNT(*) AS users
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield USING (userid)
WHERE $condition
AND user.usergroupid IN ($ids)
");
REPLACE that with
$userscount = $DB_site->query_first("
SELECT COUNT(*) AS users
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield USING (userid)
" . iif($haspic, "LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (customprofilepic.userid=user.userid)") . "
WHERE $condition
AND user.usergroupid IN ($ids)
");
FIND
" . iif($show['profilepiccol'], "LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid) ") . "
REPLACE that with
" . iif($show['profilepiccol'] OR $haspic, "LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid) ") . "
In Template memberlist_search create a checkbox named haspic with value 1 (whereever you want to have it):
<label for="cb_haspic"><input type="checkbox" name="haspic" value="1" id="cb_haspict" />Show only members who have a profile picture</label>
... I think that's it.
T3MEDIA
01-22-2005, 12:33 AM
crazy of me to test on my board but.... it works sometimes... LOL
I freaked at first but it started to only do it sometimes.
why would that happen?
Andreas
01-22-2005, 12:46 AM
Hmm, should always work.
But if there is more then one page of results it will not carry over the value of $haspic to the next page.
This would require some further code changes.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.