• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Other Okay this is a bit of a long one

#1
So I have the YT template modification and I've been reading up on conditional statements but I can't get this to work. I might be making a mistake somewhere.

Some users want the video to autoplay as soon as they go on someone's page. Some would prefer to have the video paused.

This is the code in general which makes it autoplay for everyone.

Code:
<xen:if is="{$user.customFields.YouTube}">
<iframe width="192" height="156" src="http://www.youtube.com/embed/{$user.customFields.YouTube}?autoplay=1&cc_load_policy=1" frameborder="0" allowfullscreen></iframe>
</xen:if>
This is the code that has the video start off paused.

Code:
<xen:if is="{$user.customFields.YouTube}">
<iframe width="192" height="156" src="http://www.youtube.com/embed/{$user.customFields.YouTube}?" frameborder="0" allowfullscreen></iframe>
</xen:if>
What is the quickest method to show one or the other according to user preference? Would I make a user group? How would I make it so users can add and subtract themselves from that user group then?
 

Brogan

XenForo moderator
Staff member
#3
Spamming staff members in that manner is frowned upon.

Create another custom user field called Autopay and incorporate it into the conditional statement.