conditional statement

  1. D

    XF 2.2 Show HTML widget only to logged out visitors

    We are trying to create a 'sign up' button on the sidebar for users who are not logged in and wish to hide it for anyone who is logged in. We tried to use this statement in the display condition box of the HTML widget: <xf:if is="$xf.visitor.isMemberOf([1])"></xf:if> But it isn't working. Any...
  2. ActorMike

    XF 1.5 Conditional Statements- register/register page

    We use the following conditional statement to prevent google ads from showing on certain pages and to certain users of the site. <xen:if is="!{xen:helper ismemberof, $visitor, 3, 5, 12, 15, 10, 11} AND !in_array({$contentTemplate}, array('message_page', 'error', 'search_form'...
  3. ActorMike

    XF 1.5 Conditional Statement for Guests + User Groups

    Is there a way to add guests to this conditional statement too? I don't want the content to be shown to guests OR the member groups listed. Any help is greatly appreciated! I only want logged in, non paying members to see the content. <xen:if is="!{xen:helper ismemberof, $visitor, 3, 5, 12, 15...
  4. Freelancer

    Trouble with video file attachments

    I extended the file attachment template to recognize if audio or video files are shown. It adds an html5 player and works great with MP3 audio attachments. Files can be played as an attachment. However I am not able to get .mp4 or any other video files to be shown. The player is displayed but...
  5. A

    XF 1.5 Can't get a conditional statement to work in CSS template

    I need to set a condition for applying padding to an element. The template in question is "public.css". My current CSS code is as follows: .message.horizontal .messageUserBlock a.username { margin-left: -24px; padding-left: 9px; } I need "padding-left: 9px;" to...
  6. Michael

    XF 1.5 Conditional Help Needed

    Hi guys, I currently use this conditional: <xen:if is="{xen:helper ismemberof, $message, 19}"> If I wanted to include multiple usergroups in this conditional how would I format it? Thank you.
  7. Dadparvar

    XF 1.5 Two conditional statements (mobile detector and plugins status detector)

    Hi, I want to show a link, in profile page, just when: Cometchat plugin is enable. User is using desktop version, not visiting with mobile. Which conditional statements I should use? Any opinion will be appreciated. Regards, Hamed
  8. R

    XF 1.4 User-specific content - conditional statement

    I'm trying to make a template where I want to display different values depending on the user group. So basically this is the part of the template which fails: <xen:if is="{$visitor.is_admin}"> <p>admin</p> <xen:elseif is="{$visitor.is_moderator}"> <p>mod</p> <xen:elseif...
Top Bottom