custom profile fields mod

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

custom profile fields mod

Post by neuropass »

Hey Stoker,

I would like to display icons in the custom profile filed. basically what I want to have is dropdpwn menu where user select their Operative system and then it displays it in posts just as a Icon.

I remember seeing something about displaying icons but I cant find anything. any suggestion?

Thanks

custom profile fields mod

Post by Stoker »

Go create the profile field in acp with dropbox.
Name each OS you want to have in the dropbox.

Then take a look here to see how to order fields: viewtopic.php?f=45&t=1297&p=7959
Upload all OS icons to the images folder.
The html to use for displaying icons would the be something like this:

Code: Select all

<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "OS Icon" -->
<img src="{ROOT_PATH}images/{postrow.custom_fields.PROFILE_FIELD_VALUE}.png" alt="" />
<!-- ENDIF -->
Note you have to name the CPF this exactly: OS Icon
Note you have to name each entry in the dropdown in acp exactly the same as the image is named.
Note that the file extension used in my code is png. If you use jpg, gif or something else you need to change it in the code.

custom profile fields mod

Post by neuropass »

great this is what I wanted. Thanks again. This is what I came across earlier: https://www.phpbb.com/community/viewtop ... 1&t=582444


EDIT
I wanted to ask you something else. Is it possible to add the title on mouse over the icon?
Last edited by neuropass on 30 Dec 2012, 02:39, edited 1 time in total.

custom profile fields mod

Post by Stoker »

Sure, you can use:

Code: Select all

<img src="{ROOT_PATH}images/{postrow.custom_fields.PROFILE_FIELD_VALUE}.png" alt="{postrow.custom_fields.PROFILE_FIELD_VALUE}" title="{postrow.custom_fields.PROFILE_FIELD_VALUE}" />

custom profile fields mod

Post by neuropass »

Brilliant! everything works. Thanks again.