Ads Manager 2 by Siropu

Ads Manager 2 by Siropu [Paid] 2.4.22

No permission to buy (€49.99)
Siropu updated Ads Manager 2 by Siropu with a new update entry:

Improvements & Bug Fixes

Added the ability to upload attachments for promo threads (requires permission).
Added the ability to mass extend ad end date.
Added user criteria option "User is a guest and accepted cookies".
Added 3 new positions: Above BB Code attachment, Below BB Code attachment, Over BB Code video attachment.
Added "UGC" rel attribute option.
Added pagination in ACP ad list with the admin option to set how many ads to display per page.
Added two new admin options for ACP ad list: Display ad owner...

Read the rest of this update entry...
 
I have found what the problem is. You are using lazy loading and any AJAX requests require user login now due to some changes. Will release a fix soon.
 
A quick question for this thread from someone who has recently installed this add-on and is looking to start using it:

I currently have ads configured w/AdSense in a variety of positions (with one ad in each position, maximum). Historically we have worked with advertisers to sell them some of these positions directly, and in those cases we just remove the AdSense and add the bespoke banners, then swap back when we're done.

Ideally with this add-on what I would like to do is to be able to sell some of these positions directly, and in the case where an advertiser purchases them, their ads are essentially 'mixed in' with the AdSense ones automatically to fulfill the parameters of their order. So for instance, if someone orders an otherwise AdSense-filled position for 7,000 views per week, and that position is viewed 2,000 times a day, the add-on would simply show AdSense 1000x daily and the direct ad 1000x daily in order to fulfill the order whilst keeping the position filled at all times.

I may just be ignorant as a new user, but I'm unsure how to configure packages to do this.

(Relatedly, is there any meaningful documentation for this add-on? I'm sure in time I will get comfortable with it, but very little of the concepts/ placements/options/etc. are explained, and reading 1000+ posts in this forum thread would be a bit tedious and incomplete as a substitute.)

Thanks!
 
You can achieve that with "Impressions distribution" and "Enable placeholder" in package Advertising options.
 
Hi Siropu,

First off, GREAT addon, thank you! I am running into a slight issue. It appears with the Fixed Footer that it is inserting the ad code twice on my site. It seems it is playing off of the copyright for Xenforo code and copyright for PixelExit code. Any suggestion on a fix for this? It looks like the addon is searching for "<div class="p-footer-inner">" as a hook and PixelExit is using that for their copyright code as well as XF's.
 
Try replacing the "Find" value with: <footer class="p-footer" id="footer"> instead.
Thanks, I actually had Pixel Exit change their code. What's odd now is, the ad doesn't display at all. The overlay X does, but no ad. I just tested the ad code on a test page and it loads fine, but once it's in the sticky footer, it's not loading.

If you want to check my site out, here's a link.
 
Ok, just noticed something. When I shrink my browser window down to where there is no sidebar navigation, I get the ad but I don't see the X to close the ad. If I open the browser all the way and collapse the sidebar, I don't get the ad, but I get the X. It's almost like the elements aren't aligning properly.

I just tested the option to display without wrapper and the ad doesn't show up at all no matter what I try with browser size.
 
<div class="p-footer-inner"> is used different in that style. I suggest trying the above change and see if it makes any difference.
 
You can achieve that with "Impressions distribution" and "Enable placeholder" in package Advertising options.

Ah, the AdSense ads aren't part of a package presently. So I would need to add them to one? Or only the ads whose positions are the same as positions I do want to sell?

I suppose I don't quite fully understand 'packages' as a concept yet, but I will continue to study.

Unrelatedly: the ability to define custom positions is a fantastic feature. One quick question, however - the "[Forum view positions] Below every 5th thread list item container" position includes stickied threads when tabulating every fifth; however, that leads to awkward placement of ads when any stickied threads are present, since the total number is both arbitrary (changing across forums) and almost always not a multiple of 5. On my forum for instance, I always display 20 threads, and then all stickied threads at the top in addition to that. Is there a way to re-jigger this behavior to only consider non-stickied threads?

(I've already made some other 'new' positions by added the generated macros to the right template file, so I am comfortable editing code, I'm unsure of how to make it work in this case.)
 
Hi,
We see a lot of errors in the ACP after upgrading from Adsmanager 2.13.3 tot 2.13.5.
We're useing a dedicated Ubuntu 16.x LTS server.
Same copy-paste of the errors below. Do you have any clue?
Server error log
ErrorException: Template error: Cannot call method hasPermission on a non-object (NULL) src/XF/Template/Templater.php:984
Generated by: Bram1967 Jan 3, 2020 at 7:57 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Cannot call met...', '/var/www/vhosts...', 984, Array)
#1 src/XF/Template/Templater.php(984): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s6/public/siropu_ads_manager_ad_macros.php(14): XF\Template\Templater->method(NULL, 'hasPermission', Array)
#3 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array, Array)
#4 internal_data/code_cache/templates/l1/s6/public/bb_code_tag_attach.php(89): XF\Template\Templater->callMacro('siropu_ads_mana...', 'ad_unit', Array, Array)
#5 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array)
#6 src/XF/BbCode/Renderer/Html.php(485): XF\Template\Templater->renderTemplate('bb_code_tag_att...', Array)
#7 [internal function]: XF\BbCode\Renderer\Html->renderTagAttach(Array, Array, Array, Array, Object(XF\BbCode\Renderer\EmailHtml))
#8 src/XF/BbCode/Renderer/Html.php(295): call_user_func(Array, Array, Array, Array, Array, Object(XF\BbCode\Renderer\EmailHtml))
#9 src/XF/BbCode/Traverser.php(61): XF\BbCode\Renderer\Html->renderTag(Array, Array)
#10 src/XF/BbCode/Traverser.php(37): XF\BbCode\Traverser->renderSubTree(Array, Array)
#11 src/XF/BbCode/Traverser.php(20): XF\BbCode\Traverser->renderAst(Array, Object(XF\BbCode\RuleSet), Array)
#12 src/XF/SubContainer/BbCode.php(219): XF\BbCode\Traverser->render('Ik heb twee nes...', Object(XF\BbCode\Parser), Object(XF\BbCode\RuleSet), Array)
#13 src/XF/Template/Templater.php(2035): XF\SubContainer\BbCode->render('Ik heb twee nes...', 'emailHtml', 'post', Object(XFMG\XF\Entity\Post), Array)
#14 src/XF/Template/Templater.php(2040): XF\Template\Templater->fnBbCode(Object(XF\Mail\Templater), false, 'Ik heb twee nes...', 'post', Object(XFMG\XF\Entity\Post), Array, 'emailHtml'
wink

#15 [internal function]: XF\Template\Templater->fnBbCodeType(Object(XF\Mail\Templater), false, 'emailHtml', 'Ik heb twee nes...', 'post', Object(XFMG\XF\Entity\Post))
#16 src/XF/Template/Templater.php(936): call_user_func_array(Array, Array)
#17 internal_data/code_cache/templates/l1/s6/email/watched_forum_thread.php(17): XF\Template\Templater->func('bb_code_type', Array, false)
#18 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array)
#19 src/XF/Mail/Mailer.php(155): XF\Template\Templater->renderTemplate('watched_forum_t...', Array)
#20 src/XF/Mail/Mail.php(319): XF\Mail\Mailer->renderMailTemplate('watched_forum_t...', Array, Object(XF\Language), Object(SV\WhoReplied\XF\Entity\User))
#21 src/XF/Mail/Mail.php(375): XF\Mail\Mail->renderTemplate()
#22 src/XF/Mail/Mail.php(406): XF\Mail\Mail->getSendableMessage()
#23 src/XF/Notifier/Post/AbstractWatch.php(128): XF\Mail\Mail->queue()
#24 src/XF/Service/AbstractNotifier.php(92): XF\Notifier\Post\AbstractWatch->sendEmail(Object(SV\WhoReplied\XF\Entity\User))
#25 src/XF/Service/AbstractNotifier.php(44): XF\Service\AbstractNotifier->notifyType(Object(XF\Notifier\Post\ForumWatch), Array, G)
#26 src/XF/Service/AbstractNotifier.php(56): XF\Service\AbstractNotifier->notify(3)
#27 src/XF/Service/Thread/Creator.php(328): XF\Service\AbstractNotifier->notifyAndEnqueue(3)
#28 src/XF/Pub/Controller/Forum.php(593): XF\Service\Thread\Creator->sendNotifications()
#29 src/XF/Pub/Controller/Forum.php(751): XF\Pub\Controller\Forum->finalizeThreadCreate(Object(XF\Service\Thread\Creator))
#30 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Forum->actionPostThread(Object(XF\Mvc\ParameterBag))
#31 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Forum', 'PostThread', Object(XF\Mvc\RouteMatch), Object(SV\RedisCache\XF\Pub\Controller\Forum), NULL)
#32 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\RedisCache\XF\Pub\Controller\Forum), NULL)
#33 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#34 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#35 src/XF.php(391): XF\App->run()
#36 index.php(20): XF::runApp('XF\\Pub\\App'
wink

#37 {main}
Request state
array(4) {
["url"] => string(32) "/forums/aangeboden.3/post-thread"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(12) {
["title"] => string(26) "L134 nakweek van wildvang "
["message_html"] => string(316) "<p>Ik heb twee nestjes van wildvang L134. Een nestje van 2,5 cm deze zijn te jong voor de verkoop. Ik heb ook nog enkele jongen voor de verkoop<img src="/attachments/20191228_180932-jpg.286467/?hash=efcde59629be2540882826fe90ae10bd" data-attachment="full:286467" alt=""> van inmiddels circa 5 cm.</p><p><br></p>"
["attachment_hash"] => string(32) "efcde59629be2540882826fe90ae10bd"
["attachment_hash_combined"] => string(81) "{"type":"post","context":{"node_id":3},"hash":"efcde59629be2540882826fe90ae10bd"}"
["tags"] => string(0) ""
["watch_thread"] => string(1) "1"
["watch_thread_email"] => string(1) "1"
["_xfSet"] => array(1) {
["watch_thread"] => string(1) "1"
}
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(32) "/forums/aangeboden.3/post-thread"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
 
I suppose I don't quite fully understand 'packages' as a concept yet, but I will continue to study.
You need packages in order to sell ads. If you create a package, you will see an "Advertising" tab where you set price and other things. There, you will also have the option to enable placeholder and use it as a backup ad. When you enable this option, you will see the placeholder in ACP > Ads Manager > List ads where you can edit it and palce you AdSense code in it.

Regarding stickies, I will see what I can do about it.

Do you have any clue?
Will be sorted out soon. Until that, you can edit siropu_ads_manager_ad_macros template and replace:
Code:
<xf:if is="$xf.visitor.hasPermission('siropuAdsManager', 'viewAds')">
With:
Code:
<xf:if is="$xf.visitor AND $xf.visitor.hasPermission('siropuAdsManager', 'viewAds')">
 
Hello I'm getting this warnings

Code:
    ErrorException: Template error: in_array() expects parameter 2 to be array, null given src/addons/Siropu/AdsManager/Criteria/Position.php:47

    Generado por: Cuenta desconocida 4 Enero 2020 a la(s) 00:07

Seguimiento

#0 [internal function]: XF\Template\Templater->handleTemplateError(2, 'in_array() expe...', '/home/admin/web...', 47, Array)
#1 src/addons/Siropu/AdsManager/Criteria/Position.php(47): in_array(12, NULL)
#2 src/XF/Criteria/AbstractCriteria.php(55): Siropu\AdsManager\Criteria\Position->_matchThreadPrefix(Array, Object(ThemeHouse\XLink\XF\Entity\User))
#3 src/addons/Siropu/AdsManager/Entity/Ad.php(350): XF\Criteria\AbstractCriteria->isMatched(Object(ThemeHouse\XLink\XF\Entity\User))
#4 src/addons/Siropu/AdsManager/Template/Ad.php(434): Siropu\AdsManager\Entity\Ad->matchesPositionCriteria(Array)
#5 src/addons/Siropu/AdsManager/Template/Ad.php(322): Siropu\AdsManager\Template\Ad->matchesPositionCriteria(Object(Siropu\AdsManager\Entity\Ad), 'container_conte...')
#6 [internal function]: Siropu\AdsManager\Template\Ad->getAds('container_conte...')
#7 src/XF/Template/Templater.php(999): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l4/s11/public/siropu_ads_manager_ad_macros.php(21): XF\Template\Templater->method(Object(Siropu\AdsManager\Template\Ad), 'getAds', Array)
#9 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l4/s11/public/PAGE_CONTAINER.php(3416): XF\Template\Templater->callMacro('siropu_ads_mana...', 'ad_unit', Array, Array)
#11 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array)
#12 src/XF/Pub/App.php(547): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#13 src/XF/App.php(1995): XF\Pub\App->renderPageHtml('
 
Top Bottom