Ads Manager 2 by Siropu

Ads Manager 2 by Siropu [Paid] 2.4.22

No permission to buy (€49.99)
$template is not defined. To access template name you have to use $xf.reply.template

I would use two separate ads for this with page criteria Content template is NOT: forum_list for the "Below top breadcrumb" ad.
If you want to use a single ad instead, try this:
Code:
<xf:if is="$positionId == 'forum_overview_top' || $positionId == 'container_breadcrumb_top_below' && $xf.reply.template != 'forum_list'">
     code here
</xf:if>
That code didn't work. It removed the bottom ad for "Above bottom breadcrumb" and "'forum_overview_bottom".

To clarify: I want the "Below top breadcrumb" and "Above bottom breadcrumb" ads to NOT display on Forum_List only!
 
$template is not defined. To access template name you have to use $xf.reply.template

I would use two separate ads for this with page criteria Content template is NOT: forum_list for the "Below top breadcrumb" ad.
If you want to use a single ad instead, try this:
Code:
<xf:if is="$positionId == 'forum_overview_top' || $positionId == 'container_breadcrumb_top_below' && $xf.reply.template != 'forum_list'">
     code here
</xf:if>
I went ahead and created two ads and followed your simple guide above and worked wonderfully. I think this is a better way of doing it anyway.

Many thanks!
 
Is this responsive?
In XF1 when I added adsense, I had to use a variety of code to determine which ad to show based on the screen size. Does this do it automatically or would I still need to add a varirty of ads depending on screen size?
Were you using responsive ad units? If you are not using responsive units, Ads Manager won't make them responsive.

That code didn't work. It removed the bottom ad for "Above bottom breadcrumb" and "'forum_overview_bottom".
You did not mentioned those positions. :)
You can use this instead:
Code:
<xf:if is="in_array($positionId, ['forum_overview_top', 'forum_overview_bottom']) || in_array($positionId, ['container_breadcrumb_top_below', 'container_breadcrumb_bottom_above']) && $xf.reply.template != 'forum_list'">
     code here
</xf:if>
 
Were you using responsive ad units? If you are not using responsive units, Ads Manager won't make them responsive.


You did not mentioned those positions. :)
You can use this instead:
Code:
<xf:if is="in_array($positionId, ['forum_overview_top', 'forum_overview_bottom']) || in_array($positionId, ['container_breadcrumb_top_below', 'container_breadcrumb_bottom_above']) && $xf.reply.template != 'forum_list'">
     code here
</xf:if>
Thank you but I decided to create two ads and use the "Content template is NOT: forum_list" for "Below top breadcrumb" ad and worked like a charm.

Many thanks for your help!
 
Enable Carousel in package settings.

I created a "Code" package and moved over my two ads I created but it's cleared the "Content template is NOT:" and every time I try to add "forum_list" to the box and saving it for the below breadcrumb ad, it keeps deleting it.
 
When using packages with ads that inherit its settings, you have to set any criteria in the package.
But I have both ads in different places on the forum_list under that package, so if I put forum_list in "Content template is NOT:" then both of the ad positions will get removed. How do I go about doing what I want doing?

What I am trying to do is have ALL the ads in two different positions: (top and bottom breadcrumb) and (top and bottom forumview) to rotate. However, I have "Content template is NOT:" for breadcrumb position to not display on forum_list. So if I have the two ads under one package it would then inherit all the setting of that package which will make it hard to alter one ad position. So I assuming I will need to create two packages to cater for this?
 
Can I just say that with the lazy loading enabled, sometimes the ads do not load at all. I have disabled this feature for now as it doesn't work very well in some cases.
 
Changing the Unit size is not responsive on all devices. For example, I have "728x90" for the unit size but the ads over lap the sidebar and is not responsive on tablets. It should really stay within it's container shouldn't it?
 

Attachments

  • this.webp
    this.webp
    68.1 KB · Views: 13
Any chance you can add an option to block adblockers by device? I allow Adblockers only because of the number of people visiting from a work computer that has an adblocker, and they are unable to whitelist a site. I'd like to allow the adblockers for desktops for this reason, but force phones and tablets to whitelist my site.
 
Top Bottom