Ads Manager 2 Lite by Siropu

Ads Manager 2 Lite by Siropu [Paid] 1.2.13

No permission to buy (€29.99)
Try this code:

JavaScript:
<xf:js>
$(function()
{
     var unit = $('div[data-position="container_content_above"]');
     var stickyPoint = 0;

     if (unit.length)
     {
          $(window).scroll(function()
          {
               var unitScrollOffset = unit.offset().top;
               var scrollTop = $(document).scrollTop();

               if (unitScrollOffset - scrollTop <= 0 && stickyPoint == 0)
               {
                    unit.css({position: 'fixed', top: $('.p-nav').height() + 10, width: 'auto', 'z-index': 99});
                stickyPoint = scrollTop;
               }
               else if (stickyPoint >= scrollTop)
               {
                    unit.css({position: '', top: '', width: ''});
                stickyPoint = 0;
               }
          });
     }

     $(window).resize(function()
     {
           unit.css({position: '', top: '', width: ''});
     });
});
</xf:js>

It is based on the sidebar fixed code here: https://xenforo.com/community/resources/ads-manager-2-by-siropu.6153/field?field=faq
Thanks for this, it works great on mobile but on desktop the ad moves to the left of the screen upon scroll.
 
Try adding a value for right alignment in the code above (you can play with the value to match your website):

unit.css({position: 'fixed', top: $('.p-nav').height() + 10, width: 'auto', 'z-index': 99, right: 100});
 
Try adding a value for right alignment in the code above (you can play with the value to match your website):

unit.css({position: 'fixed', top: $('.p-nav').height() + 10, width: 'auto', 'z-index': 99, right: 100});
Thanks for that, I got it to work only to discover that scrolling upwards makes the page very jagged/jumpy and the ad flashes on and off, which is not a nice experience for my users who are used to a smooth scroll.

Thanks again for taking the time to look at this, I was so close to having this working but it's not fair to keep asking you for help with it so I don't mind if we just stop trying. (y)
 
Hello @Siropu,

i got the newest version of the lite version.

I would like to add a link to Amazon right after the first post and search there exactly as the title of the post is called and display the ad in XF's post layout.

Example:

Can you help me pls?
 
@oxygeno2, regarding "post style": just made a screenshot for you. As stated in the update, you have to use the "Settings" tab in the package (you can then assign your ads to that package):

Bildschirmfoto 2023-03-20 um 23.48.39.png
 
don't work for me
First, create a code type package with the position "Below first thread post container". When you select a Thread view position, a new option will show up in the package settings called "Display in post layout" where you can specify the thread author, avatar and title.

Create an ad that inherits the package settings and you are done.
 
Thanks @Siropu i just found it ;) (y).

Can you tell me how to program the following situation?

Code:
Hello "Threadstarter",

Have a look here: "Link: Threadtitle". Everyone will find what they are looking for there!

thanks in advance :)
 
Can you tell me how to program the following situation?
I tested this and it does not work:
HTML:
<xf:if is="$xf.visitor.user_id">
    Hello {{ $xf.visitor.username}},
<xf:else />
    Hello Guest,
</xf:if>
<br />
Go here <a href="https://google.com/?q={{ $thread.title|urlencode }}">{{ $thread.title }}</a>
You can display the user name, but you don't have access to $post or $thread, so you can not display the thread title easily. :(

Maybe Siropu can help you.
 
You can access the thread via {$xf.samParams.thread.title}
Oh, cool (y)

Tested, works:

HTML:
<xf:if is="$xf.visitor.user_id">
    Hello {{ $xf.visitor.username}},
<xf:else />
    Hello Guest,
</xf:if>
<br />
Go here <a href="https://google.com/?q={{ $xf.samParams.thread.title|urlencode }}">{{ $xf.samParams.thread.title }}</a>
 
Siropu updated Ads Manager 2 Lite by Siropu with a new update entry:

Improvements & Bug Fixes

Added a workaround for boards who are using page caching. The admin option is called "Bypass page cache" in Ads Manager [General] and it works with the "lazy loading" feature only.

Can now use html in text ad description.

Bugs Fixed
MaxMind Geo criteria admin log error for unknown IPs.
404 errors for links under "Rel attribute" options on Google docs.
Deleting the image when creating a clone of a banner ad, it will delete the image from the original ad as well.

Read the rest of this update entry...
 
Due to new regulations, some advertisements (gambling ads) may only be shown when you are 24 years or older in the Netherlands. Is there a way to let people confirm that they are 24 years or older and if not, that the ads will not be shown to them? Like a popup or something?

I confirm that I am 24 years or older > show the gambling ads
I am younger than 24 years > don't show these specific gambling ads, only the other ads.
 
So I want to display different ads that will just display on Mobile. I know how to do this but what is the best size?
 
Like a popup or something?
There isn't in the add-on itself. You can use the custom user field criteria to create a choice for that and use that as a criteria in ads manager.

I know how to do this but what is the best size?
 
Top Bottom