Conditionals in EXTRA.css

Ray

Active member
I want to hide videos from some media sites in plain view using css, not sure if it's possible but here is what I did:
EXTRA.css
HTML:
<xen:if is="!{$visitor.user_id}">
DIV.hidevideo
{
display:none
}
</xen:if>

From BB Code Media Sites, I wrapped the embed code with:
HTML:
<DIV class="hidevideo"> embed html code </DIV>

The video should be hidden from guests and viewable by members. Currently, no one can view them.
Maybe xf conditionals cannot be used in EXTRA.css?
 
The template that applies the BBCode. If there's no template, just apply the CSS to the page container (or any of the head files) with a conditional. You can use conditionals in templates, so you could use your conditional as long as it's in a template.
Code:
<xen:if is="!{$visitor.user_id}">
<style>
//code
</style>
</xen:if>
 
  • Like
Reactions: Ray
The template that applies the BBCode. If there's no template, just apply the CSS to the page container (or any of the head files) with a conditional. You can use conditionals in templates, so you could use your conditional as long as it's in a template.
Code:
<xen:if is="!{$visitor.user_id}">
<style>
//code
</style>
</xen:if>

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!!! Didn't think of that... Let me see if it works.
 
Top Bottom