Amin Sabet
Well-known member
Is it possible to do s conditional for words on page? I'd like to have an ad show if there are more than 500 words on the page.
Trying to add content using this in ad_message_body:
33. How can I show content in more than one post?
<xen:if is="in_array({$post.post_id}, array(x, y, z))">
This content will show in posts x, y, and z
</xen:if>
Or rather this:
<xen:if is="in_array({$post.post_id}, array(1, 5, 10))">
This content will show in posts x, y, and z
</xen:if>
But it doesn't appear to be showing.
If I use other conditionals it does work. So guests conditional or whatever.
What am I doing wrong?
Add this to ad_message_belowsame here. any idea, why this doesn't work with xf 1.5?
thank you
And this one will show an ad in post 5 if there are 7 or more posts, and to people with less than 50 posts.
thx, donny.
i want show ads after post 1, 5, and 10 on every page in a thread. i can't find a solution for that. a good example i saw on macuser:
http://www.macuser.de/threads/partition-fuer-altes-system-erstellen.753577/
By logo block I mean the logo_block.css which is a template in the master style and all of my subsequent styles. That is where I have placed my "banners" for each sub forum.I'm not sure what you mean by "logo block" but the node ID likely isn't exposed to whatever template you have added the code to.
You may be able to pass it in using xen:container - see this guide: https://xenforo.com/community/resources/using-variables-in-templates.5034/update?update=18416
I think I am misunderstanding the difference in the template area.You can't use conditional statements in css templates.
16. How can I show content after the first post in a thread?
<xen:if is="{$post.position} == 0 AND !{$message.conversation_id}">
This content will show after the first post on the first page only
</xen:if>
That doesn't work though.Can you not use that, replacing 0 with 4?
{$thread.reply_count} > 5
Yes it checks all user groupsI want to ask does ismemberof check both primary usergroup & secondary usergroup?
We use essential cookies to make this site work, and optional cookies to enhance your experience.