Log in

View Full Version : On/Off Switch user profile fields


lasto
03-30-2005, 01:55 AM
ok just installed photopost and on forum index it displays the featured photos and this is called by one line of code in forumhome which is

$photopostfeature

now some members prefer to see that box whereas others dont so im lookin for a way where i can add a new profile field or whatever it is so in their options they can tick a box to turn it on or turn it off.

Anyone know how to do this ?

Oblivion Knight
03-30-2005, 08:21 AM
First of all, set up a custom profile field..
Admin CP -> User Profile Fields -> Add New User Profile Field


Create it as a "Single-Selection Menu" type..

Title: Display Featured Photos
Description: By default, we display some featured photos from our gallery on the forum home. If you wish, you may turn these off.
Options: Yes, leave them on
No, turn them off
Set Default: Yes, but No First Blank Option

The rest of the options are up to you, and then click "Save".

Make a note of the field number on the "User Profile Field Manager" (ie. field5).


Now go and edit your FORUMHOME template and find:
$photopostfeatureReplace it with:
<if condition="$bbuserinfo['field5']!='No, turn them off'">$photopostfeature</if>Replacing field5 with your field number that you made a note of earlier..

lasto
03-30-2005, 08:41 AM
thanks a lot oblivion knight.

EDIT - tested and worked perfect - cheers again for your help

MathewC
05-09-2007, 07:49 PM
how would i get it so if you havent filled in a profile field it shows a message on forum home (or where ever i want to display message)

Sorry for bump :]