Log in

View Full Version : Using a custom profile field in an "if" statement


Darat
03-25-2006, 04:05 PM
I want to add the ability for posters to not see threads started by people on their ignore list.

I know I can surround the threadbit (as per this hack: https://vborg.vbsupport.ru/showthread.php?t=97902) with

<if condition="! $ignore[ $thread['postuserid'] ]">

</if>

But I want to let the posters decide if they want this so I thought to add a user option e.g. "Ignore ignore list members threads - Yes/No" as a new custome user profile field then use that in the "if" statement e.g.

<if condition="! $ignore[ $thread['postuserid'] ] AND userfieldx == "No">

So my question is how do I read the value of a custom profile field and use it as part of the condition of the if statement in the threadbit template?