The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Memberlist: Only show members who have an entry in a certain profilefield.
Hello,
The story (you can skip this if you like).... I've been hacking away at my forums, and trying to make what is basically a 'second' profile for each user. My site is car enthusiasts site, and I have completed most of the work to make this happen. The registration works, and I have integrated another hack on here (search custom fields) to enable searching of these 'car profiles'. I now have two member.php and memberlist.php files. I want to keep it that way, I have member_mini.php and memberlist_mini.php (and they have some unique templates). EVERYTHING works, apart from one snag. The plea for help! For the memberlist_mini.php to work (i.e. list ONLY members who have completed their car profiles) I need to add to the condition on "getall" (it think) so that it only ever lists users who have completed at least one of the customfields, field22. I can get this to work using this code: PHP Code:
PHP Code:
There MUST be a way to do this (I need to check they are not searching for this particular field, hence the first 'if' statement). I used the hack to show process times at the bottom of the page, and it takes about 33 seconds with the above solutions, and 90ish% is MySQL. Anyone help at all? |
#2
|
||||
|
||||
This problem is probably due to the user and userfield tables no longer matching. There should be one entry for each user in both tables. You can verify this by using phpMyAdmin to access and view your database. If they don't match then you can use the script posted here to fix the problem:
http://www.vbulletin.com/forum/showt...984#post248984 |
#3
|
|||
|
|||
I'll check that out, but it proceses nice and fast if I remove that required userfield. ie If it's just a pure list of all users.
I'll let you know... |
#4
|
|||
|
|||
That's not the problem.
How would others here code the memberlist so it ONLY shows people who have a certain usefield filled in, ie !="" or contains something! It just seems to take forever. www.mini2.com/forum/memberlist.php works www.mini2.com/forum/memberlist_mini.php takes an age. (Don't too many look at once, or you'll kill my site?!). Paul |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|