Log in

View Full Version : Images in Members List - Custome User Profile Fields


Lostnode
11-04-2004, 05:28 PM
Ok, I am a webmaster for a clan that has 2 divisions... CStrike CZ and America's Army. Now I have it set up so that I can select which division each memver is apart of, either CZ, AA or both. WHat I would like however is to have it replaced by Images in stead, I tried placing it in there as HTML, it didn't work, came up as Code. How else can I do this?

Lostnode
11-04-2004, 05:46 PM
Also, I would like to to show up not just on the Memberslist, but on Show Groups as well, and I cannot seem to do it cozmeticaly (via editing temoplates)

Lostnode
11-05-2004, 07:43 AM
Someone point me in the right direction, please.

Andreas
11-05-2004, 07:59 AM
*Untested*


Set this field to not show up on memberlist
Edit template MEMBERLIST, add a column for the image
Edit template memberlist_resultsbit as well and place the following code there where you want to have the image:

<if condition="$userinfo['fieldx'] == 'AA'">
<img src="aa.jpg" alt="Image for AA" />
<else />
<if condition="$userinfo['fieldx'] == 'CZ'">
<img src="aa.jpg" alt="Image for CZ" />
<else />
<img src="both.jpg" alt="Image for Both" />
</if>
</if>

Lostnode
11-05-2004, 03:20 PM
Thx I will test this out as soon as I can.

Lostnode
11-06-2004, 01:38 AM
Ok, This is weird.... It actuly puts a number in field6, 1 for AA, 2 for CZ, 3 for Both...
But when I do the code above, nothing shows up, even if I put == "1", == "2", == "3"

Any more help?

Lostnode
11-06-2004, 03:19 AM
What I have now is

<if condition="$userinfo['field6'] == 2">
<img src="/forums/afterdark/misc/aadiv.gif" alt="Americas Army" />
</if>
<if condition="$userinfo['field6'] == 1">
<img src="/forums/afterdark/misc/czdiv.gif" alt="Condition Zero" />
</if>
<if condition="$userinfo['field6'] == 3">
<img src="/forums/afterdark/misc/czdiv.gif" alt="Condition Zero" /><img src="/forums/afterdark/misc/aadiv.gif" alt="Americas Army" />
</if>
<if condition="$userinfo['field6'] == ''">
&nbsp;
</if>

Note, the last line is two single quotes denoting a Blank

All I get is the Space (the last option)

Am I on the right track?

Lostnode
11-06-2004, 06:01 AM
I have even tried using $profilefield['value'] instead of $userinfo['field6']

which is has to display the info on the Members page, but that doesn't work wither... any ideas?

Lostnode
11-06-2004, 06:03 AM
I am trying to do this for the Show Groups list... I have desided to take it off the Members list as only a few will have it.

Lostnode
11-06-2004, 06:15 AM
CLose but no cigar
Ok, I am missing something... I usedd $bbuserinfo['field6'] and it replaced ALL the images with what ever I had in my field6.... So I am getting there, but do I need anything in the PHP file itself for the use of $userinfo['field6']?? If so, what?

I thnka you all in advance for your time and patience...

Andreas
11-06-2004, 06:38 AM
Hmm ... $userinfo['field6'] should work out of the box, at least it does seem to work for me.

Lostnode
11-06-2004, 07:18 AM
It leave it all blank. This isnlt for MEMBERSLIST though, its or showgroups_usergroupbit
Here is the most info I can give.
In the SQL Database, it places a number for eash option... 1, 2 or 3 (1=CZ, 2=AA, 3=CZ, AA)
Theoreticaly, I should be able to put

<if condition="$userinfo['field6'] == '#'>
<img src=/path to image/div.gif>
</if>


However this does nothing, it dose not put in my image...
Now if I put in

<if condition="$bbuserinfo['field6'] == '#'>
<img src=/path to image/div.gif>
</if>

That puts my Division in everyones slot, so atleast i know $bbuserinfo works ok...
But I want everyone's individual division beside their name... I would show you the site, but the domain points to their current site...

if you add the following to your host file you will be able to see it.
69.93.0.188 evolutionclan.com
69.93.0.188 www.evolutionclan.com

then go to http://www.evolutionclan.com/forums

Andreas
11-06-2004, 07:43 AM
For Template showgroups_usergroupbit it is most likely $user['field6']

Lostnode
11-06-2004, 07:56 AM
I replied to the other post, that doesn't seem to work either.

Andreas
11-06-2004, 08:11 AM
Well ... showgroups.php does not load profilefields except location ;)

FIND

SELECT $locationfieldselect user.*, usergroup.usergroupid, usergroup.title, user.options


REPLACE WITH

SELECT $locationfieldselect userfield.field6, user.*, usergroup.usergroupid, usergroup.title, user.options

Lostnode
11-06-2004, 08:38 AM
Cool... I will test it out when I get home, can't access my SSH from work...
Once again, Thank you Kirby for your time and patience, you've been a great help.

Lostnode
11-06-2004, 12:44 PM
It worked, but with userfield.field6, not profilefield :) thank you very much