Ads Manager 2 Lite by Siropu

Ads Manager 2 Lite by Siropu [Paid] 1.4.4

No permission to buy (€30.00)
Open siropu_ads_manager_ad_macros template and post here the first line please.
 
Code:
<xf:macro name="ad_unit" arg-position="!" arg-wrapper="{{ true }}" arg-ads="{{ [] }}">

That is the first line.
 
Any suggestions?
Sorry, I've looked in the wrong place. The error is from the email ad_macros template which requires ads params.

This is how it is done in the original email ads:

Code:
<xf:set var="$samAds" value="{{ sam_mail_ads($xf.toUser) }}" />
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-ads="{{ sam_mail_position_ads($samAds, 'mail_above_content') }}" arg-position="mail_above_content" />
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-ads="{{ sam_mail_position_ads($samAds, 'mail_below_content') }}" arg-position="mail_below_content" />

It is designed to work with those positions only.
 
Sorry, I've looked in the wrong place. The error is from the email ad_macros template which requires ads params.

This is how it is done in the original email ads:

Code:
<xf:set var="$samAds" value="{{ sam_mail_ads($xf.toUser) }}" />
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-ads="{{ sam_mail_position_ads($samAds, 'mail_above_content') }}" arg-position="mail_above_content" />
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-ads="{{ sam_mail_position_ads($samAds, 'mail_below_content') }}" arg-position="mail_below_content" />

It is designed to work with those positions only.
So I replace that first line I posted with what you posted in siropu_ads_manager_ad_macros?
 
First, you can try adding arg-ads="{$xf.samAds}" to the ad position code you added in ACTIVITY_SUMMARY_CONTAINER.
 
Still getting this error:
Code:
[LIST]
[*][LIST]
[*]LogicException: Macro email:siropu_ads_manager_ad_macros :: ad_unit() error: Macro argument ads is required and no value was provided
[*]src/XF/Template/Templater.php:907
[*]Generated by: 
[*]Jun 10, 2026 at 9:42 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/Template/MacroState.php(60): XF\Template\Templater->mergeMacroArguments(Array, Array, Array)
#1 src/XF/Template/Templater.php(800): XF\Template\MacroState->getAvailableVars(Object(XF\Mail\Templater), Array, Array)
#2 internal_data/code_cache/templates/l6/s14/email/MAIL_CONTAINER.php(63): XF\Template\Templater->callMacro('siropu_ads_mana...', 'ad_unit', Array, Array)
#3 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array, NULL)
#4 src/XF/Mail/Mailer.php(176): XF\Template\Templater->renderTemplate('MAIL_CONTAINER', Array)
#5 src/XF/Mail/Mail.php(411): XF\Mail\Mailer->renderMailTemplate('conversation_re...', Array, Object(XF\Language), Object(SV\ElasticSearchEssentials\XF\Entity\User))
#6 src/XF/Mail/Mail.php(480): XF\Mail\Mail->renderTemplate()
#7 src/XF/Mail/Mail.php(590): XF\Mail\Mail->getSendableMessage()
#8 src/XF/Service/Conversation/Notifier.php(123): XF\Mail\Mail->queue()
#9 src/addons/Truonglv/Api/XF/Service/Conversation/Notifier.php(29): XF\Service\Conversation\Notifier->_sendNotifications('reply', Array, Object(SV\ConversationEssentials\XF\Entity\ConversationMessage), Object(SV\ElasticSearchEssentials\XF\Entity\User))
#10 src/XF/Service/Conversation/Notifier.php(67): Truonglv\Api\XF\Service\Conversation\Notifier->_sendNotifications('reply', Array, Object(SV\ConversationEssentials\XF\Entity\ConversationMessage))
#11 src/XF/Service/Conversation/Replier.php(198): XF\Service\Conversation\Notifier->notifyReply(Object(SV\ConversationEssentials\XF\Entity\ConversationMessage))
#12 src/XF/Service/Conversation/Replier.php(177): XF\Service\Conversation\Replier->sendNotifications()
#13 src/XF/Service/ValidateAndSavableTrait.php(42): XF\Service\Conversation\Replier->_save()
#14 src/XF/Pub/Controller/Conversation.php(523): XF\Service\Conversation\Replier->save()
#15 src/addons/SV/ConversationEssentials/XF/Pub/Controller/Conversation.php(140): XF\Pub\Controller\Conversation->actionAddReply(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(352): SV\ConversationEssentials\XF\Pub\Controller\Conversation->actionAddReply(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Conversation', 'AddReply', Object(XF\Mvc\RouteMatch), Object(SV\ConversationEssentials\XF\Pub\Controller\Conversation), NULL)
#18 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ConversationEssentials\XF\Pub\Controller\Conversation), NULL)
#19 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(2513): XF\Mvc\Dispatcher->run()
#21 src/XF.php(524): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}
[*]
[/LIST]
Here's my insertion code in the Activity_Summary email:
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-position="email_below_content" arg-ads="{$xf.samAds}" />

I created a new location called "email_below_content" and am trying to get the ads to display in that location. They do not. If I change the location back to the standard "below_email_content" in that template the ads will display in the email, but I still get errors about the arguments.
 
Try this instead:
Code:
<xf:set var="$samAds" value="{{ sam_mail_ads($xf.toUser) }}" />
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-position="email_below_content" arg-ads="{$samAds}" />
 
Try this instead:
Code:
<xf:set var="$samAds" value="{{ sam_mail_ads($xf.toUser) }}" />
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-position="email_below_content" arg-ads="{$samAds}" />
I will try that. Since I'm calling the position in that template, does it matter if the Ad Package has the custom position selected or not? Or does the position have to be both selected in the Ad Package and specified in the template?
 
Try this instead:
Code:
<xf:set var="$samAds" value="{{ sam_mail_ads($xf.toUser) }}" />
<xf:macro template="siropu_ads_manager_ad_macros" name="ad_unit" arg-position="email_below_content" arg-ads="{$samAds}" />
Getting errors with that code too:
Code:
[LIST]
[*]LogicException: Macro email:siropu_ads_manager_ad_macros :: ad_unit() error: Macro argument ads is required and no value was provided
[*]src/XF/Template/Templater.php:907
[*]Generated by: Unknown account
[*]Jun 11, 2026 at 10:56 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/Template/MacroState.php(60): XF\Template\Templater->mergeMacroArguments(Array, Array, Array)
#1 src/XF/Template/Templater.php(800): XF\Template\MacroState->getAvailableVars(Object(XF\Mail\Templater), Array, Array)
#2 internal_data/code_cache/templates/l6/s14/email/MAIL_CONTAINER.php(63): XF\Template\Templater->callMacro('siropu_ads_mana...', 'ad_unit', Array, Array)
#3 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array, NULL)
#4 src/XF/Mail/Mailer.php(176): XF\Template\Templater->renderTemplate('MAIL_CONTAINER', Array)
#5 src/XF/Mail/Mail.php(411): XF\Mail\Mailer->renderMailTemplate('watched_thread_...', Array, Object(XF\Language), Object(SV\ElasticSearchEssentials\XF\Entity\User))
#6 src/XF/Mail/Mail.php(480): XF\Mail\Mail->renderTemplate()
#7 src/XF/Mail/Mail.php(590): XF\Mail\Mail->getSendableMessage()
#8 src/XF/Notifier/Post/AbstractWatch.php(137): XF\Mail\Mail->queue()
#9 src/addons/SV/PersistentAlerts/XF/Notifier/Post/PersistentWatchTrait.php(171): XF\Notifier\Post\AbstractWatch->sendEmail(Object(SV\ElasticSearchEssentials\XF\Entity\User))
#10 src/XF/Service/AbstractNotifier.php(94): SV\PersistentAlerts\XF\Notifier\Post\ThreadWatch->sendEmail(Object(SV\ElasticSearchEssentials\XF\Entity\User))
#11 src/XF/Service/AbstractNotifier.php(46): XF\Service\AbstractNotifier->notifyType(Object(SV\PersistentAlerts\XF\Notifier\Post\ThreadWatch), Array, 1.7812E+9)
#12 src/addons/SV/UserMentionsImprovements/XF/Service/Post/Notifier.php(100): XF\Service\AbstractNotifier->notify(8)
#13 src/XF/Job/Notifier.php(45): SV\UserMentionsImprovements\XF\Service\Post\Notifier->notify(8)
#14 src/XF/Job/Manager.php(260): XF\Job\Notifier->run(8)
#15 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#16 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#17 job.php(43): XF\Job\Manager->runQueue(false, 8)
#18 {main}
 
Or does the position have to be both selected in the Ad Package and specified in the template?
Try using the original email positions and select them in Package. mail_above_content mail_below_content
Update code as well
 
Try using the original email positions and select them in Package. mail_above_content mail_below_content
Update code as well
Did that and now the errors just have the username specified.
Code:
[LIST]
[*]LogicException: Macro email:siropu_ads_manager_ad_macros :: ad_unit() error: Macro argument ads is required and no value was provided
[*]src/XF/Template/Templater.php:907
[*]Generated by: 
[*]Jun 11, 2026 at 4:47 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/Template/MacroState.php(60): XF\Template\Templater->mergeMacroArguments(Array, Array, Array)
#1 src/XF/Template/Templater.php(800): XF\Template\MacroState->getAvailableVars(Object(XF\Mail\Templater), Array, Array)
#2 internal_data/code_cache/templates/l1/s7/email/MAIL_CONTAINER.php(65): XF\Template\Templater->callMacro('siropu_ads_mana...', 'ad_unit', Array, Array)
#3 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array, NULL)
#4 src/XF/Mail/Mailer.php(176): XF\Template\Templater->renderTemplate('MAIL_CONTAINER', Array)
#5 src/XF/Mail/Mail.php(411): XF\Mail\Mailer->renderMailTemplate('watched_thread_...', Array, Object(XF\Language), Object(SV\ElasticSearchEssentials\XF\Entity\User))
#6 src/XF/Mail/Mail.php(480): XF\Mail\Mail->renderTemplate()
#7 src/XF/Mail/Mail.php(590): XF\Mail\Mail->getSendableMessage()
#8 src/XF/Notifier/Post/AbstractWatch.php(137): XF\Mail\Mail->queue()
#9 src/addons/SV/PersistentAlerts/XF/Notifier/Post/PersistentWatchTrait.php(171): XF\Notifier\Post\AbstractWatch->sendEmail(Object(SV\ElasticSearchEssentials\XF\Entity\User))
#10 src/XF/Service/AbstractNotifier.php(94): SV\PersistentAlerts\XF\Notifier\Post\ThreadWatch->sendEmail(Object(SV\ElasticSearchEssentials\XF\Entity\User))
#11 src/XF/Service/AbstractNotifier.php(46): XF\Service\AbstractNotifier->notifyType(Object(SV\PersistentAlerts\XF\Notifier\Post\ThreadWatch), Array, 1.78122E+9)
#12 src/XF/Service/AbstractNotifier.php(58): XF\Service\AbstractNotifier->notify(3)
#13 src/XF/Service/Thread/Replier.php(252): XF\Service\AbstractNotifier->notifyAndEnqueue(3)
#14 src/XF/Pub/Controller/Thread.php(459): XF\Service\Thread\Replier->sendNotifications()
#15 src/XF/Pub/Controller/Thread.php(618): XF\Pub\Controller\Thread->finalizeThreadReply(Object(XF\Service\Thread\Replier))
#16 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Thread->actionAddReply(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'AddReply', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#18 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#19 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(2513): XF\Mvc\Dispatcher->run()
#21 src/XF.php(524): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}
 
Back
Top Bottom