Let user decide about ads

  • Thread starter Thread starter Member 10517
  • Start date Start date
M

Member 10517

Guest
I want to give my user the choice to decide if they want to view ads or not.
Is there an addon to do this?
 
Great idea! I have defined two options for a drop down menü. But there is also a blank default value.
Can I define the default to one of my field values?
 
Use <xen:if is="{$user.customFields.field_id}"> to check if the option has been selected.

If not, apply the default.
 
Take a look here:

Bildschirmfoto 2014-01-06 um 13.33.55.webp

There are 3 options: "blank, ja and nein" - but I only want "ja, nein".
 
You could approach it using a simple check box instead of a dropdown

Then your conditional would simply be:

Code:
<xen:if is="{$visitor.customFields.adsshowing.on} == 'on'">
ads on
</xen:if>

I think that's right :D
 
Thank you guys - great support from you!

Perhaps one last thing:
Can you help me with a sql-query to count the forumusers who has checked this field?
 
Top Bottom