PDA

View Full Version : Help with a Seperate Page for Custom Profile Field


Starscream
11-18-2004, 01:41 AM
I've searched the forums and a couple of people have asked for this hack or one similar to it. Basically, I want to create a seperate page that just shows usernames and a custom profile field - something similar to the memberlist page.

The only difference is, I only want the Username and profile field to show up if someone has filled in that certain profile field.

I've tried a few different approaches to this and none of them have really worked out for me yet. On this attempt I've basically hacked memberlist.php to only show the things I want. Then, I renamed it and uploaded it to my forum - works (pic included below). However, it shows two custom fields (only want 1) and also shows users who didn't fill in the field. I have not modified any of the templates that the memberlist uses (nor do I really want to).

What do I need to do to make the memberlist.php (or renamed file) accomplish my goals? Is it something I can do with just the .php file or do I need to create new templates.

Any help would be much appreciated.

-note: I had a similar post a while back, but I decided to create another post as I'm trying to go in a different direction than before and didn't want to confuse the old coding with this one.

Starscream
11-19-2004, 12:15 AM
Wouldn't this hack be just a simple conditional sort of like what's below or is this like a big hack that I need professional (paid) help on?

Something like if ($profilefieldX = True or whatever
Then show 'Username'
else
Don't show 'username' or 'profilefield'


I didn't think something like this was a big undertaking, but that just may be because of my limited knowledge of php. It's times like these that I wish I knew how to code php.

SVTBlackLight01
11-19-2004, 10:40 AM
Here is what the template conditional should look like.

<if condition="$userinfo['fieldX']">
$userinfo[fieldX]
</if>