Ads Manager 2 by Siropu

Ads Manager 2 by Siropu [Paid] 2.4.22

No permission to buy (€49.99)
@Siropu, could you tag me when you put a out a fix for the current errors. I've had to completely disable Resource Manager until the issue is resolved.

Edit: I also don't believe the table optimization is working like it should. Prior to update to 2.4.12 my stats_click table had 425,000 rows at 117mb. At some point in the last 24 hours the cron ran to reduce this table to the last 180 days, it then reported 130,000 rows at 119mb and at the time the table wasn't reporting optimization needed. I knew pruning 75% of the rows and size not reducing that optimization was definitely needed and I manually ran it. The table now reports 130,000 rows at 37mb.
 
Last edited:
@Siropu

Any chance there is a way to disable URL unfurling for affiliate links? Trying to replace some URL's but the original js-unfurl-desc and contentRow-minor--hideLinks information is still shown.
 
Is it possible for ads to refresh/rotate on an interval if a user doesn't navigate away from a page? For example, every 60 seconds I want ads to refresh on the page.
 
Any chance there is a way to disable URL unfurling for affiliate links?
The affiliate link is added after the post is parsed, so no.

Is it possible for ads to refresh/rotate on an interval if a user doesn't navigate away from a page?
Individual code ads have a lazy load option with auto refresh every x seconds feature. To rotate multiple ads, you can use the package carousel feature.
 
Firstly great job, this is an amazing addon, thank you.

Secondly, can you clarify what 'Maximum active ads allowed' in the Package>Advertising settings means?

I've been grouping my ads together in Packages to keep things tidy (all keyword ads together, adsense code ads together), would this mean only one of those ads from each package would appear on a single page together or is this only for reselling to users purposes.

Is there any issue with using Packages to organise the ads from an admin point of view?

Thanks in advance.
 
can you clarify what 'Maximum active ads allowed' in the Package>Advertising settings means?
If you are selling ads, the value you set there will be the maximum number of ads that can be active at the same time for that package. It doesn't affect you as admin when you manage your own ads via ACP.
 
@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 just upgraded to 7.4.29 from 7.3 and am also having this issue. Wondering what might be the fix. I am using the most recent versions of XenForo and Ads Manager 2.

  • ErrorException: [E_NOTICE] Trying to access array offset on value of type int
  • src/addons/Siropu/AdsManager/Entity/Ad.php:483
  • Generated by: Unknown account
  • May 18, 2022 at 7:36 AM

Stack trace​

#0 src/addons/Siropu/AdsManager/Entity/Ad.php(483): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/site/...', 483, Array)
#1 src/addons/Siropu/AdsManager/Entity/Ad.php(441): Siropu\AdsManager\Entity\Ad->isIpBlocked()
#2 src/addons/Siropu/AdsManager/Template/Ad.php(533): 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(197): array_filter(Array, Object(Closure))
#5 src/addons/Siropu/AdsManager/Template/Ad.php(538): XF\Mvc\Entity\AbstractCollection->filter(Object(Closure))
#6 src/addons/Siropu/AdsManager/Template/Ad.php(365): Siropu\AdsManager\Template\Ad->prepareAdsForDisplay()
#7 src/addons/Siropu/AdsManager/Template/Ad.php(356): Siropu\AdsManager\Template\Ad->setAds()
#8 src/addons/Siropu/AdsManager/Listener.php(36): Siropu\AdsManager\Template\Ad->__construct(Object(XF\Pub\App), Object(XF\Mvc\Reply\View))
#9 src/XF/Extension.php(69): Siropu\AdsManager\Listener::templaterGlobalData(Object(XF\Pub\App), Array, Object(XF\Mvc\Reply\View))
#10 src/XF/App.php(2854): XF\Extension->fire('templater_globa...', Array, NULL)
#11 src/XF/App.php(2077): XF\App->fire('templater_globa...', Array)
#12 src/XF/App.php(1947): XF\App->getGlobalTemplateData(Object(XF\Mvc\Reply\View))
#13 src/XF/Pub/App.php(450): XF\App->preRender(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/Mvc/Dispatcher.php(397): XF\Pub\App->preRender(Object(XF\Mvc\Reply\View), 'html')
#15 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#17 src/XF.php(524): XF\App->run()
#18 index.php(20): XF::runApp('XF\\Pub\\App')
#19 {main}

Request state​

array(4) {
["url"] => string(75) "/forum/threads/example-title-of-discussion.14916/page-51"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Last edited:
I'm trying to understand the error (6 pages of it) as it seems to relate to Xenforo, via your addon. Help?

  • ErrorException: Template error: [E_USER_WARNING] Function sam_counter is unknown
  • src/XF/Template/Templater.php:1106
  • Generated by: Unknown account
  • May 26, 2022 at 1:50 PM

It happened yesterday only once, at 1:50 PM, from an unknown account (?). Although there is this:

["referrer"] => string(23) "https://www.google.com/"

Does it mean a Google bot caused this error, or...
 
Does it mean a Google bot caused this error, or...
Bots/crawlers access the site all the time so I don't think that's the issue. sam_counter is a custom template function and if it says "unknown" that means that the function was not applied at that time which is strange. I don't know why you would get that out of the blue.
 
Bots/crawlers access the site all the time so I don't think that's the issue. sam_counter is a custom template function and if it says "unknown" that means that the function was not applied at that time which is strange. I don't know why you would get that out of the blue.

Thank you, I did a templates search for the term sam_counter but found nothing.

There are other entries happening at the exact same time, in case this may help you identify its origin:
  • Filter sam_keyword_ads is unknown
  • ErrorException: Template error: [E_USER_WARNING] Method showReadMore is not callable on the given object (XF\Entity\Post) src/XF/Template/Templater.php:1186
  • Error: Macro public:tic_ignore_content_macros :: ignore_button() error: Call to undefined method XF\Entity\User::canTICIgnoreContent() src/addons/Truonglv/IgnoreContent/Callback.php:103
  • ErrorException: Template error: [E_USER_WARNING] Method canViewModeratorPanel is not callable on the given object (XF\Entity\User) src/XF/Template/Templater.php:1186

Cheers and thank you in advance,

Andre
 
Hi,
I am planning to move my XenForo website to XenForo hosting. This solution make not possible anymore to use ftp. But that’s the way I manage my ads.txt file.
It would be great to have the ability to edit ads.txt file directly from Siropu or at least having upload/download ability from the soft.
Is it something planned in a new release?
Thanks
David
 
Top Bottom