vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Must have Photo in MemberSearch (https://vborg.vbsupport.ru/showthread.php?t=73294)

T3MEDIA 12-25-2004 04:53 PM

Must have Photo in MemberSearch
 
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

Quote:

Originally Posted by n_wattam
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:

Dan 12-27-2004 10:10 PM

Quote:

Originally Posted by T3MEDIA
: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

Quote:

Originally Posted by Dan
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.

Dan 12-27-2004 10:23 PM

Quote:

Originally Posted by T3MEDIA
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

Quote:

Originally Posted by Dan
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

Quote:

Originally Posted by KirbyDE
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

PHP Code:

'usergroupid' => INT 

REPLACE that with
PHP Code:

'usergroupid' => INT,
'haspic' => INT 


FIND
PHP Code:

if ($vboptions['usememberlistadvsearch'])


BELOW that ADD
PHP Code:

if ($haspic) {
  
$condition .= " AND NOT ISNULL(customprofilepic.userid) ";


FIND

PHP Code:

$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

PHP Code:

$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
PHP Code:

" . iif($show['profilepiccol'], "LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid customprofilepic.userid") . " 

REPLACE that with
PHP Code:

" . 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):

HTML Code:

<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.


All times are GMT. The time now is 12:05 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.02603 seconds
  • Memory Usage 1,769KB
  • 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
  • (1)bbcode_html_printable
  • (8)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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