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.
It works with custom fields. There are two admin options (Ads Manager [General]) to enable it for both keywords and affiliate links. I have to make some changes to make it work with all thread types.I need it to work with the custom thread fields macros
I will add it in the next release.Is there a way to have this one adv location?
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 INTOxf_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"
}
}
Use position "Above first thread post content" with Settings > Alignment set to "Right".Is there a way to do this?
Banner ads are responsive so you don't need 3 packages.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).
Use a package. It has all the settings you need.Hi is there a way to set a limit on the number of ads per position?
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) {
}
}
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've just changed to php7.4.13 and started to receive lots of the following errors...
We use essential cookies to make this site work, and optional cookies to enhance your experience.