vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Advanced Memberlist Search (https://vborg.vbsupport.ru/showthread.php?t=102405)

Andreas 12-06-2005 10:00 PM

Advanced Memberlist Search
 
Advanced Memberlist Searching

Description
This Hack adds the criteria "Profile Picture" (Only Users with/Only users without/Don't care) and "Age" (From/To) for memberlist searching.
Of course it does take care of birthday privacy settings: Only users who do allow their age to be displayed will be found if you search for age.

Details
1 Product XML (2 Plugins, 3 Phrases)

Important
This Hack requires at least vBulletin 3.5.2

This Hack is unsupported! All support requests except proven bugs will be ignored

AshokForums.com 12-07-2005 07:52 AM

Thanks.. good feature to have

SHANE-D-PAIN 12-07-2005 08:03 AM

Seems good, I reckon my members would like to be able to only search fro profiles with a picture. Brings us one step closer to a myspace style profiled site. ;)

Nice one Kirby/Andreas, why change to your real name anyway?

Andreas 12-07-2005 08:07 AM

Jelsoft staff policy :)

Developer 12-07-2005 08:45 AM

good hack

FleaBag 12-07-2005 09:31 AM

Yeah great little addition. Must admit 3.5.2 is news to me though... Back to the upgrade!

Nice to see that some people realise a forum is not only about threads and forums but members and community also! :)

JoergZ 12-07-2005 11:05 AM

*INSTALLED*



[EDIT] Can you please check this: It seems, the search for members with profilepicture is not working. Searching for members without picture is working correct. (I have installed your profile-pic-icon-hack) [/EDIT]


[EDIT2] uninstalled [/EDIT2]

moonclamp 12-07-2005 11:47 AM

I've been looking for something like this for ages.

One question though ... what is in it that makes 3.5.2 important?

I've just tested it on 3.5.0 and have found that it doesn't work ... But due to serious lack of time I would rather not upgrade just yet

mskgr 12-21-2005 10:11 PM

Search for Members with/without Profile Picture doesn't work correctly. No I don't have "profile picture icon hack", which is mentioned on the plugin. Age works fine though, but I guess I won't click on Install until the code is fixed :)

p.s. in my site, when clicking on members with profile picture enabled, it returns all of them, but in addition some others, who don't have a profile picture. Amongs 55.000 members, it returns about 292, while the correct number should be ~212 (based on the related entries on the table).

JoergZ 12-21-2005 10:30 PM

I told Anreas already exactly the same, but he says, the hack works for him fine (which I really doubt), and the hack is not supported, so he is not willed to look at this.

There is definitely a bug in the hack, because after changing some statements in the code it works correct.


Jörg

porschinho 12-22-2005 06:05 PM

Quote:

Originally Posted by JoergZ

There is definitely a bug in the hack, because after changing some statements in the code it works correct.


J?rg

and why don?t you post the code?

Andreas 12-23-2005 08:49 PM

It does work just fine for me - http://kirbydemos.ath.cx/forum
The profile picture icon hack is not installed.

I've added a checkbox to the advanced search form so you can run an explain.

JoergZ 12-23-2005 10:14 PM

Just tested on a fresh 3.5.2 installation. It is not working.

Maybe there is an old version of code in your plugin ?

Andreas 12-23-2005 10:28 PM

Reinstalled the product from the ZIP here - still works fine?

moonclamp 12-24-2005 12:53 AM

Quote:

Originally Posted by Andreas
Reinstalled the product from the ZIP here - still works fine?

Could there be a conflict with custom profile fields?

mskgr 12-25-2005 12:11 PM

Quote:

Originally Posted by Andreas
Reinstalled the product from the ZIP here - still works fine?

Hello Andreas,

It doesnt work.

I went through debugging your code, in order to find out whats wrong. After the installation of the script, Advanced Memberlist Searching adds itself as a plugin to Hook Location : memberlist_query_userscount .

All the variables are passed correctly into the memberlist.php.

Let's say we want to search for users with profile pic enabled

PHP Code:

if ($vbulletin->GPC['profilepic'] == 1

The script runs, and we have the following variables populated:

$hook_query_joins and $hook_query_where

Thats fine. The membercount of users with enabled avatars, appears correctly. But, what happens with the results in the list?

The results have nothing to do with the... truth.

On line 520 of memberlist.php we have the following line:

PHP Code:

    $hook_query_fields $hook_query_joins '';
    (
$hook vBulletinHook::fetch_hook('memberlist_fetch')) ? eval($hook) : false

As you can see, $hook_query_joins equals to NULL.

The query after that line gets "$hook_query_joins" and "$condition".

In the case of your script, $hook_query_joins pass as empty, and $condition doesnt contain our specific needs.

That's the problem.

I have added another plugin at Hook Location : memberlist_fetch,

PHP Code:

// search for users with profile pic
if ($vbulletin->GPC['profilepic'] == 1)
{
        
$hook_query_joins .= " LEFT JOIN " TABLE_PREFIX "customprofilepic AS customprofilepic ON (customprofilepic.userid=user.userid)";
        
$condition.= " AND NOT ISNULL(customprofilepic.userid)";

}
    
$urladd .= (($urladd != '') ? '&' '') .'profilepic=1'

Guess what? Now, everything works fine! :)

The above code is for searching on database with no profile pic hack installed. I am not using Andrea's other script :) It needs modification to cover both situations, but the purpose of posting this thing is to let Andrea's understand what was going wrong with his excellent plugin: Installed! :)

Andreas 12-25-2005 05:00 PM

Aaah! That's why it is working on my dev box, it does not have

PHP Code:

$hook_query_fields $hook_query_joins '';
    (
$hook vBulletinHook::fetch_hook('memberlist_fetch')) ? eval($hook) : false

but

PHP Code:

    ($hook vBulletinHook::fetch_hook('memberlist_fetch')) ? eval($hook) : false

I remember experimenting with hooks before memberlist_query_userscount was avialable ...

Gonna update the code, thanks.

ahmed-samara 12-26-2005 11:12 AM

Thanks.. good feature to have

mskgr 12-27-2005 12:35 AM

Quote:

Originally Posted by Andreas
Gonna update the code, thanks.

Not a problem at all Andreas, thanks for such a useful plugin :)

akanevsky 12-27-2005 12:45 AM

Screenshot, please.

Andreas 12-27-2005 03:21 PM

I don't have a screenshot and I am not going to take one :)
http://kirbydemos.ath.cx/forum/memberlist.php?do=search

PennylessZ28 12-27-2005 06:28 PM

I still can't make it work for all the tea in china

Nordinho 12-28-2005 11:27 AM

PHP Code:

Database error in vBulletin 3.5.2:

Invalid SQL:

        
SELECT user.*,usertextfield.*,userfield.*, user.useridoptions,
            IF(
displaygroupid=0user.usergroupiddisplaygroupid) AS displaygroupid
        
        
,avatar.avatarpath,NOT ISNULL(customavatar.userid) AS hascustomavatar,customavatar.dateline AS avatardatelinecustomavatar.width AS avwidthcustomavatar.height AS avheight
        
,customprofilepic.userid AS profilepiccustomprofilepic.dateline AS profilepicdatelinecustomprofilepic.width AS ppwidthcustomprofilepic.height AS ppheight
         
lastactivity AS lastvisittime 
        
        
journals.journal_id
        FROM user 
AS user
        LEFT JOIN usertextfield 
AS usertextfield ON(usertextfield.userid=user.userid)
        
LEFT JOIN userfield AS userfield ON(userfield.userid=user.userid)
        
        
LEFT JOIN avatar AS avatar ON(avatar.avatarid user.avataridLEFT JOIN customavatar AS customavatar ON(customavatar.userid user.userid)
        
LEFT JOIN customprofilepic AS customprofilepic ON (user.userid customprofilepic.userid
        
         
LEFT JOIN journals AS journals ON (journals.journalist_id=user.useridLEFT JOIN customprofilepic AS customprofilepic ON (customprofilepic.userid=user.userid)
        
WHERE 1=AND user.showbirthday AND IFNULL(YEAR(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(user.birthday_search))), 0) >= 15 AND IFNULL(YEARFROM_DAYS(TO_DAYS(NOW())-TO_DAYS(user.birthday_search))), 0) <= 36 AND ISNULL(customprofilepic.userid)
            AND 
user.usergroupid IN (-1,6,7,9,120,2,5,81,123)
        
ORDER BY user.username asc 
        LIMIT 0
30;

MySQL Error  Not unique table/alias'customprofilepic' 

Getting this error now...uninstalled the old product and reimported the new one

edit: get this error by email when installing

PHP Code:

Invalid SQL:
DELETE FROM productrequirement WHERE product='' 

;

and when the product installs it gives these errors

PHP Code:

Warningmysql_query(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 395

Warning
mysql_error(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 837

Warning
mysql_errno(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 855

There seems 

but the script redirects too fast to copy the whole error...

Nordinho 12-29-2005 08:10 PM

Quote:

Originally Posted by Nordinho
PHP Code:

Database error in vBulletin 3.5.2:

Invalid SQL:

        
SELECT user.*,usertextfield.*,userfield.*, user.useridoptions,
            IF(
displaygroupid=0user.usergroupiddisplaygroupid) AS displaygroupid
        
        
,avatar.avatarpath,NOT ISNULL(customavatar.userid) AS hascustomavatar,customavatar.dateline AS avatardatelinecustomavatar.width AS avwidthcustomavatar.height AS avheight
        
,customprofilepic.userid AS profilepiccustomprofilepic.dateline AS profilepicdatelinecustomprofilepic.width AS ppwidthcustomprofilepic.height AS ppheight
         
lastactivity AS lastvisittime 
        
        
journals.journal_id
        FROM user 
AS user
        LEFT JOIN usertextfield 
AS usertextfield ON(usertextfield.userid=user.userid)
        
LEFT JOIN userfield AS userfield ON(userfield.userid=user.userid)
        
        
LEFT JOIN avatar AS avatar ON(avatar.avatarid user.avataridLEFT JOIN customavatar AS customavatar ON(customavatar.userid user.userid)
        
LEFT JOIN customprofilepic AS customprofilepic ON (user.userid customprofilepic.userid
        
         
LEFT JOIN journals AS journals ON (journals.journalist_id=user.useridLEFT JOIN customprofilepic AS customprofilepic ON (customprofilepic.userid=user.userid)
        
WHERE 1=AND user.showbirthday AND IFNULL(YEAR(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(user.birthday_search))), 0) >= 15 AND IFNULL(YEARFROM_DAYS(TO_DAYS(NOW())-TO_DAYS(user.birthday_search))), 0) <= 36 AND ISNULL(customprofilepic.userid)
            AND 
user.usergroupid IN (-1,6,7,9,120,2,5,81,123)
        
ORDER BY user.username asc 
        LIMIT 0
30;

MySQL Error  Not unique table/alias'customprofilepic' 

Getting this error now...uninstalled the old product and reimported the new one

edit: get this error by email when installing

PHP Code:

Invalid SQL:
DELETE FROM productrequirement WHERE product='' 

;

and when the product installs it gives these errors

PHP Code:

Warningmysql_query(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 395

Warning
mysql_error(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 837

Warning
mysql_errno(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 855

There seems 

but the script redirects too fast to copy the whole error...

any idea's about this one...also receiving dberrors now

'mysql_connect(): Too many connections
/mydir/includes/class_core.php on
line 273'

moonclamp 01-16-2006 02:08 AM

It's working for me now.

However, I'm cheating. I can't get the time to upgrade from 3.5.0 so I just uploaded the memberlist.php from 3.5.3 ... not sure if I messed anything else up but it works just fine now :)

sensimilla 01-19-2006 06:28 AM

Quote:

Invalid SQL:

SELECT COUNT(*) AS users
FROM user AS user
LEFT JOIN userfield AS userfield USING (userid)

WHERE 1=1 AND field12 LIKE 'Female' AND field8 & 128
AND user.usergroupid IN (-1,10,6,7,12,2,5)
AND user.showbirthday > 0 AND IFNULL(YEAR(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(user.birthday_search))), 0) >= 25 AND IFNULL(YEAR( FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(user.birthday_search))), 0) <= 35 AND NOT ISNULL(customprofilepic.userid);

MySQL Error : Unknown table 'customprofilepic' in where clause Error Number : 1109
any ideas ?

Rukas 02-19-2006 10:38 PM

^^ Same exact problem, running 3.5.3, clean install.

quanvo81 02-22-2006 06:25 PM

nice shot, nice hack, clicked installed

quanvo81 02-22-2006 06:27 PM

Quote:

Originally Posted by Rukas
^^ Same exact problem, running 3.5.3, clean install.

I have no problem running it, I am running 3.5.3 :rolleyes:

Rukas 02-28-2006 11:44 PM

^^ What other hacks do you have installed?

Everything works fine apart from searching by profile pic.

noonespecial 03-07-2006 05:11 AM

it bothers me that this is in this site's database when it doesn't work.

moonclamp 03-07-2006 08:20 AM

Quote:

Originally Posted by noonespecial
it bothers me that this is in this site's database when it doesn't work.

Works fine for me

Andreas 03-17-2006 03:18 AM

Quote:

Originally Posted by noonespecial
it bothers me that this is in this site's database when it doesn't work.

I am using this in a production board since several month and it works just fine.

noonespecial 03-17-2006 06:15 PM

The age works fine, the Profile Picture checkbox doesn't at all.

Andreas 03-17-2006 06:44 PM

<a href="http://kirbydemos.ath.cx/forum/memberlist.php?do=search&styleid=11&langid=6" target="_blank">http://kirbydemos.ath.cx/forum/membe...id=11&langid=6</a>

No other products, plugins or file edits except this hack are installed.

Though I wonder which checkbox you mean ... this hack does not have any checkbox?

hiiped 03-17-2006 11:40 PM

Quote:

Originally Posted by Andreas
http://kirbydemos.ath.cx/forum/membe...id=11&langid=6

No other products, plugins or file edits except this hack are installed.

I just searched on that link for users WITH pic and 2 came up

Kirby
Testpicuser

but I dont see any pic in their profile


?????

Andreas 03-17-2006 11:47 PM

Well ... guests wern't allowed to view profile pictures.
Now they are.

hiiped 03-17-2006 11:52 PM

Quote:

Originally Posted by Andreas
Well ... guests wern't allowed to view profile pictures.
Now they are.

OK

I thought about that after I posted..LOL

but the hack DOES WORK, major credit for this

thanks

< clicks install >

pcoskat 03-28-2006 08:55 PM

Could this hack be re-worked to produce the advanced memeber search seen here:

http://www.njnyc.com/
www.tampaforums.com

foulplay 04-20-2006 07:52 AM

Nice! *clicks install*


All times are GMT. The time now is 05:50 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.01616 seconds
  • Memory Usage 1,895KB
  • 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
  • (11)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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