Ads Manager 2 by Siropu

Ads Manager 2 by Siropu [Paid] 2.4.22

No permission to buy (€49.99)
There is a composite index on ad_id, position_id and stats_date. It could have been primary but I have used a normal index for some reason. Not really an issue but you can change to primary if you want.
 
There is a composite index on ad_id, position_id and stats_date. It could have been primary but I have used a normal index for some reason. Not really an issue but you can change to primary if you want.

Thanks for the quick reply! Unfortunately even with that composite we are seeing duplicate records... I’m curious if that is not intended and if we could get away with just deleting the duplicate rows.
 
It works with thread posts, conversation messages, profile posts, XFRM resource description and AMS Articles add-on.
 
Very good add on.
A question: I need into FORUM VIEW POSITION - Above thread list item x container
Is there a way to have this one adv location?
 
@Siropu We followed your suggestion and simply wiped the table, and configured a primary key. We've been ok for about a week but just got this error:

Screen Shot 2020-12-08 at 8.43.41 AM.webp

XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '7-post_below_container_1-1607409417' for key 'xf_siropu_ads_manager_stats_click.PRIMARY'

src/XF/Db/AbstractStatement.php:228
Generated by: Unknown account

Dec 8, 2020 at 12:36 AM

Stack trace​

INSERT INTO xf_siropu_ads_manager_stats_click (ad_id, position_id, image_url, page_url, visitor, stats_date) VALUES (?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException()
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException()
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query()
#4 src/XF/Mvc/Entity/Entity.php(1463): XF\Db\AbstractAdapter->insert()
#5 src/XF/Mvc/Entity/Entity.php(1195): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/Siropu/AdsManager/Pub/Controller/Ad.php(405): XF\Mvc\Entity\Entity->save()
#7 src/XF/Mvc/Dispatcher.php(350): Siropu\AdsManager\Pub\Controller\Ad->actionTrackClick()
#8 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()
#9 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()
#10 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()
#11 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#12 src/XF.php(391): XF\App->run()
#13 index.php(20): XF::runApp()
#14 {main}

Request state​

array(4) {
["url"] => string(39) "/forum/index.php?sam-item/7/track-click"
["referrer"] => string(83) "https://ourforum.net/threads/threadname/"
["_GET"] => array(1) {
["sam-item/7/track-click"] => string(0) ""
}
["_POST"] => array(7) {
["position_id"] => string(22) "post_below_container_1"
["image_url"] => string(0) ""
["page_url"] => string(83) "https://ourforum.net/threads/threadname/"
["_xfRequestUri"] => string(56) "/threads/threadname/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}

I take it this is probably a bug?
 
This can probably happen if two users click on the same ad at the same exact time. How likely is that?
I will see what I can do about it.
 
Hello everyone,

I would like to add an ad in the frist post to the right of the post.
There are many different way to put an ad above, before, below, but I do not know how to put a 300x250 ad to the righ of the text in a post.
Is there a way to do this?

Thanks

David
 
I'm trying to get my head around the way packages work to understand if it's possible to do what I want…

In some nodes we want to display 'sponsored' adverts. In all other nodes, we want to display a 'fallback' advert.

I think the intended way to do this is to use packages, limited to 1 ad unit, with display order set to 'ad display order' and have the fallback advert have a higher display order.

Except:

1) The 'sponsored' adverts are images. I believe the only way to have responsive image adverts (different on mobile, tablet and desktop) is to have three different 'Banner' packages and three different ads (using media queries to show the appropriate package at different breakpoints).
2) But for the fallback adverts, we want to display responsive Google AdSense units, which are a single ad unit that displays in a single 'Banner' packages.

Is there anyway to make this work easily? The only solution I've come up with so far is manually excluding the nodes with specific adverts from the fallback ad. But this makes adding new adverts to specific forums rather complicated as you have to both include and exclude the same forums from the different packages.

(And, just to add further complications, some of the 'sponsored' adverts have alternate versions for different countries as well…)

Hoping I've missed a feature that solves this for me…! 🤪 🤞
 
Hi is there a way to set a limit on the number of ads per position? I want to randomly rotate ads between two positions on the forum but only have one in each position. Thanks for your help.
 
I believe the only way to have responsive image adverts (different on mobile, tablet and desktop) is to have three different 'Banner' packages and three different ads (using media queries to show the appropriate package at different breakpoints).
Banner ads are responsive so you don't need 3 packages.

You can have ads in the same package but not inherit its settings and use different criteria for each one accordingly.

Hi is there a way to set a limit on the number of ads per position?
Use a package. It has all the settings you need.
 
@Siropu

I've just changed to php7.4.13 and started to receive lots of the following errors:

  • ErrorException: [E_NOTICE] Trying to access array offset on value of type int
  • src/addons/Siropu/AdsManager/Entity/Ad.php:467


  • Code:
    Stack trace
    
    #0 src/addons/Siropu/AdsManager/Entity/Ad.php(467): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/maggotdro...', 467, Array)
    #1 src/addons/Siropu/AdsManager/Entity/Ad.php(425): Siropu\AdsManager\Entity\Ad->isIpBlocked()
    #2 src/addons/Siropu/AdsManager/Template/Ad.php(504): Siropu\AdsManager\Entity\Ad->canDisplay()
    #3 [internal function]: Siropu\AdsManager\Template\Ad->Siropu\AdsManager\Template\{closure}(Object(Siropu\AdsManager\Entity\Ad))
    #4 src/XF/Mvc/Entity/AbstractCollection.php(189): array_filter(Array, Object(Closure))
    #5 src/addons/Siropu/AdsManager/Template/Ad.php(509): XF\Mvc\Entity\AbstractCollection->filter(Object(Closure))
    #6 src/addons/Siropu/AdsManager/Template/Ad.php(336): Siropu\AdsManager\Template\Ad->prepareAdsForDisplay()
    #7 src/addons/Siropu/AdsManager/Template/Ad.php(327): Siropu\AdsManager\Template\Ad->setAds()
    #8 src/addons/Siropu/AdsManager/Listener.php(38): Siropu\AdsManager\Template\Ad->__construct(Object(XF\Pub\App), Object(XF\Mvc\Reply\View))
    #9 [internal function]: Siropu\AdsManager\Listener::templaterGlobalData(Object(XF\Pub\App), Array, Object(XF\Mvc\Reply\View))
    #10 src/XF/Extension.php(67): call_user_func_array(Array, Array)
    #11 src/XF/App.php(2797): XF\Extension->fire('templater_globa...', Array, NULL)
    #12 src/XF/App.php(2032): XF\App->fire('templater_globa...', Array)
    #13 src/XF/App.php(1903): XF\App->getGlobalTemplateData(Object(XF\Mvc\Reply\View))
    #14 src/XF/Pub/App.php(448): XF\App->preRender(Object(XF\Mvc\Reply\View), 'html')
    #15 src/XF/Mvc/Dispatcher.php(395): XF\Pub\App->preRender(Object(XF\Mvc\Reply\View), 'html')
    #16 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
    #17 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
    #18 src/XF.php(488): XF\App->run()
    #19 index.php(20): XF::runApp('XF\\Pub\\App')
    #20 {main}
    
    Request state
    
    array(4) {
    ["url"] => string(60) "/forums/threads/the-twilight-saga.224845/reply?quote=2609847"
    ["referrer"] => bool(false)
    ["_GET"] => array(1) {
    ["quote"] => string(7) "2609847"
    }
    ["_POST"] => array(0) {
    }
    }


    Do you have any idea what it relates to, everything runs well under php 7.3.25 ?

    Ads Manager 2.4.2
 
I've just changed to php7.4.13 and started to receive lots of the following errors...
For what it's worth, I had a very similar error appear after my own PHP upgrade, albeit with a different add-on. Turns out that in more recent PHP versions the language is stricter with this warning such that it started to actually appear in error logs. But it was occurring pre-upgrade, meaning that the newer PHP version didn't introduce the issue, it just made it visible.
 
I have been on 7.4.13 for a long time here with no errors, on a board with 1.1 million posts and almost 9000 users.
 
@Siropu

Can we display ADS as an overlay when guests/members visiting the forum?
The goal is prompting a banner on the middle of the page for new visits.
 
@Siropu just bought the addon, i LOVE IT!!!

Is there a way to make it where users can either pay for the ad space, or if they upgrade their account, they can upload an ad to the same space without having to pay?
 
Top Bottom