Conditional Statements

Conditional Statements

The responsive flag applies to the whole style, it is irrelevant which device is being used.

If your style is responsive then everyone is using it.
 
The responsive flag applies to the whole styleanyonerrlevant which device is being used.

If your style is responsive then everyone is using it.
I guess I should have been clearer. Im trying to work out a conditional so I only show ads to anyone who is using a mobile or tablet. Is there a way to check for screen width or something similar that might be of assistance? Thanks in advance mate.
 
For some reason, $post.position and $message.position are no longer available in the conversation view, which means the 0 is matching the NULL value for each message.

I'm not quite sure why that change was made, I will need to install an older version and check the code (or ask Mike).

Any idea if the $post.position and $message.position in conversations will be available in 1.3 or is it gone for good? Were you able to find a way around it to just show in first conversation message?

Thanks!
 
Hmm, well I just installed 1.1.5 and it isn't working there either.
I'm sure it did work at one point, but perhaps not.

Regardless, conversations don't use the position concept so it can't be done.
 
Hmm, well I just installed 1.1.5 and it isn't working there either.
I'm sure it did work at one point, but perhaps not.

Regardless, conversations don't use the position concept so it can't be done.

Thanks for looking into it. Since it cant be used I have the following so that it shows only after first post in the threads: "{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id} "
 
Yes, that's the way to do it.
I updated the resource this morning removing the references to conversations.
 
first thanks for ur tips it was really helpful

i just wana ask

about this template
ad_message_body

if i put some code there

its show for all post of the thread

so is there a condition to know if this is the first post show the code otherwise hide it ?!

i try the postid but not working
 
Code:
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
    <div style="min-height: 150px; margin-left: 10px; float: right">
        Ad code here
    </div>
</xen:if>
 
I had custom user fields with a dropdown list. This field i want to show in the member_view sidebar. But i couldn't get the value from the dropdown. Can anyone help me?
This is my conditional statement:
Code:
<xen:if is="{$user.customFields.modell}">
                        <dl><dt><span class="fa fa-road fa-fw Tooltip" title="{xen:phrase sc_custom_field_modell}"></span></dt>
                            <dd>{$user.customFields.modell}</dd></dl>
                    </xen:if>
 
I had custom user fields with a dropdown list. This field i want to show in the member_view sidebar. But i couldn't get the value from the dropdown. Can anyone help me?
This is my conditional statement:
Code:
<xen:if is="{$user.customFields.modell}">
                        <dl><dt><span class="fa fa-road fa-fw Tooltip" title="{xen:phrase sc_custom_field_modell}"></span></dt>
                            <dd>{$user.customFields.modell}</dd></dl>
                    </xen:if>
@Brogan Is there a statement for this ?
 
I know, but this custom field is a dropdown list with many entrys. What can i do to show the entry in this condition? The field_id is "modell".
When i use <xen:if is="{$user.customFields.modell}"> it shows me vn_800 but the entry is VN 800 ...
 
Top Bottom