[TH] Monetize Pro with DFP & Affiliate Link support [Deleted]

After saving my first dfp advertisment I got the following error:

An exception occurred: Undefined index: zone_position in /library/Audentio/AdManager/Model/Advertisement.php on line 464

XenForo_Application::handlePhpError() in Audentio/AdManager/Model/Advertisement.php at line 464
Audentio_AdManager_Model_Advertisement->prepareAdvertisementsForDisplay() in Audentio/AdManager/Model/Advertisement.php at line 74
Audentio_AdManager_Model_Advertisement->getPreparedAdvertisementsFromCache() in Audentio/AdManager/Listener/CodeEvent.php at line 35
Audentio_AdManager_Listener_CodeEvent::templateCreate()
call_user_func_array() in XenForo/CodeEvent.php at line 58
XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 82
XenForo_Template_Abstract->__construct() in XenForo/Dependencies/Admin.php at line 156
XenForo_Dependencies_Admin->createTemplateObject() in XenForo/ViewRenderer/Abstract.php at line 263
XenForo_ViewRenderer_Abstract->createTemplateObject() in XenForo/ViewRenderer/HtmlAdmin.php at line 135
XenForo_ViewRenderer_HtmlAdmin->renderContainer() in XenForo/FrontController.php at line 637
XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
XenForo_FrontController->run() in /admin.php at line 13
 
Thanks that worked.

1. Now I'm looking into the DFP Targeting Options. I can't get them to work for threads.

targeting.webp

While the forumid gets correctly passed to dfp non of the thread information is.

2. How can I set up a responsive dfp banner? If I choose Advertisement Type = Google DFP I can't choose the devices and I have to enter a with and hight in the DFP options.
 
Last edited:
After installation this is the first time I was trying to add an AD PACKAGE using this Addon. I am getting this error anytime I try to create the package, unable to proceed.

Using style UI.X on latest XF install.

Mysqli prepare error: Unknown column 'max_purchases' in 'field list'
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  5. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1638
  6. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1627
  7. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
  8. XenForo_DataWriter->save() in Audentio/AdManager/ControllerAdmin/Package.php at line 164
  9. Audentio_AdManager_ControllerAdmin_Package->actionSave() in XenForo/FrontController.php at line 351
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  11. XenForo_FrontController->run() in /home/solmak59/public_html/admin.php at line 13
 
@Jake B.,

Hi there,

You don't insert the template conditionals into the actual code box. Instead you would have to use the 'template conditionals' tab.

In the first box put '$contentTemplate' (without the quotes) then in the second box select 'NOT IN' and in the last one put:
Code:
message_page,error,search_form,search_form_post,search_form_profile_post,search_results,register_facebook,register_twitter,register_google,login,error_with_login,contact

It doesn't work for me...


When I insert the following template Conditions for a specific advertisement it only works correctly on error pages. In other pages or templates the conditionals below do not apply:

Code:
$contentTemplate | NOT IN | message_page,error,search_form,search_form_post,search_form_profile_post,search_results,register_facebook,register_twitter,register_google,login,error_with_login,contact

What could be my fault? Thanks...
 
Is there a "How To" anywhere about creating your own ad zones? Once created will they show up if you tick off "display zones" or is that just for premade zones?

Also, is there any way to place an ad IN just the first post on a page? The only zone I saw was message body and I don't want it in every single post.
 
Last edited:
Been experimenting with this and quite happy so far.

I'd like move to a wordpress integration.

Any recommendations on if I could display these ads on my wordpress as well?
 
@MrDeranged I use the "After first post" option for now, didn't have time to learn how to make it conditional on the post number but I guess it is possible. Will wait for audentio team to respond.

Edit: Oops, but 'after first post" in thread, that won't show on the second.. third.. page onwards I guess. my bad.
 
@MrDeranged I use the "After first post" option for now, didn't have time to learn how to make it conditional on the post number but I guess it is possible. Will wait for audentio team to respond.

Edit: Oops, but 'after first post" in thread, that won't show on the second.. third.. page onwards I guess. my bad.

Yeah, that and the fact that I'm looking to put a 300x250 ad Inside the first post (floated right) on each page, not after. :)

I want it to look like this:

upload_2015-12-21_15-4-25.webp
 
It can support impressions, the problem with that is that performance would be a rather large concern. Every impression we'd need to run at least 2 queries extra. We could, in theory, just run every 10 seconds or something and make that some form of variable, but then (like Google's even) it won't be accurate to the exact impression. Well actually some ad engines bill in arrears.

I don't quite understand, does this mean you can sell on a CPM basis (e.g. £x per 1000 impressions, or that it's something that may be added in the future?
 
Is there a template conditional to have a "message body" ad show only in the first post of each page?

I am also trying to accomplish the same, but the template conditional section of Ad Monetize Pro does not seem to help.
Basically, the ad location "Message body" is inserting the ad in every message on the page. How do we set conditions to show this only on first post in every page?

Also when I have two rotating ads with different weights in same location, they are being shown one above the other, is the template trying to load all the ads in that location?

I am hoping for more active involvement by the developers on this thread.
 
I got this error:

Code:
ErrorException: Undefined index: zone_position - library/Audentio/AdManager/Model/Advertisement.php:464
Generated By: Pete Thomas, A moment ago
Stack Trace
#0 /home/caf/public_html/library/Audentio/AdManager/Model/Advertisement.php(464): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/caf/publi...', 464, Array)
#1 /home/caf/public_html/library/Audentio/AdManager/Model/Advertisement.php(74): Audentio_AdManager_Model_Advertisement->prepareAdvertisementsForDisplay(Array)
#2 /home/caf/public_html/library/Audentio/AdManager/Listener/CodeEvent.php(36): Audentio_AdManager_Model_Advertisement->getPreparedAdvertisementsFromCache()
#3 [internal function]: Audentio_AdManager_Listener_CodeEvent::templateCreate('PAGE_CONTAINER', Array, Object(XenForo_Template_Admin))
#4 /home/caf/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#5 /home/caf/public_html/library/XenForo/Template/Abstract.php(82): XenForo_CodeEvent::fire('template_create', Array, 'PAGE_CONTAINER')
#6 /home/caf/public_html/library/XenForo/Dependencies/Admin.php(156): XenForo_Template_Abstract->__construct('PAGE_CONTAINER', Array)
#7 /home/caf/public_html/library/XenForo/ViewRenderer/Abstract.php(263): XenForo_Dependencies_Admin->createTemplateObject('PAGE_CONTAINER', Array)
#8 /home/caf/public_html/library/XenForo/ViewRenderer/HtmlAdmin.php(135): XenForo_ViewRenderer_Abstract->createTemplateObject('PAGE_CONTAINER', Array)
#9 /home/caf/public_html/library/XenForo/FrontController.php(637): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
#10 /home/caf/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#11 /home/caf/public_html/admin.php(13): XenForo_FrontController->run()
#12 {main}
Request State
array(3) {
  ["url"] => string(34) "http://cafesaxophone.com/admin.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}


Then this, when choosing a rotate speed:

Code:
Mysqli prepare error: Unknown column 'zone_position' in 'field list'
    1    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    2    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    3    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    4    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
    5    Zend_Db_Adapter_Abstract->update() in XenForo/DataWriter.php at line 1654
    6    XenForo_DataWriter->_update() in XenForo/DataWriter.php at line 1623
    7    XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
    8    XenForo_DataWriter->save() in Audentio/AdManager/ControllerAdmin/Zone.php at line 55
    9    Audentio_AdManager_ControllerAdmin_Zone->actionSave() in XenForo/FrontController.php at line 351
    10    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    11    XenForo_FrontController->run() in /home/caf/public_html/admin.php at line 13
 
Installed this plugin, but the Ad Manager tab is completely blank.

Any ideas what the problem might be?

View attachment 125415

It looks like you don't have the necessary admin permissions

I've had to uninstall this this, am not very happy at all. No response here or to tickets.

There was a large red notice stating that tickets may be delayed a few days because of the Holidays as nobody was in the office. That being said, we are going through them now.

I got this error:

Code:
ErrorException: Undefined index: zone_position - library/Audentio/AdManager/Model/Advertisement.php:464
Generated By: Pete Thomas, A moment ago
Stack Trace
#0 /home/caf/public_html/library/Audentio/AdManager/Model/Advertisement.php(464): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/caf/publi...', 464, Array)
#1 /home/caf/public_html/library/Audentio/AdManager/Model/Advertisement.php(74): Audentio_AdManager_Model_Advertisement->prepareAdvertisementsForDisplay(Array)
#2 /home/caf/public_html/library/Audentio/AdManager/Listener/CodeEvent.php(36): Audentio_AdManager_Model_Advertisement->getPreparedAdvertisementsFromCache()
#3 [internal function]: Audentio_AdManager_Listener_CodeEvent::templateCreate('PAGE_CONTAINER', Array, Object(XenForo_Template_Admin))
#4 /home/caf/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#5 /home/caf/public_html/library/XenForo/Template/Abstract.php(82): XenForo_CodeEvent::fire('template_create', Array, 'PAGE_CONTAINER')
#6 /home/caf/public_html/library/XenForo/Dependencies/Admin.php(156): XenForo_Template_Abstract->__construct('PAGE_CONTAINER', Array)
#7 /home/caf/public_html/library/XenForo/ViewRenderer/Abstract.php(263): XenForo_Dependencies_Admin->createTemplateObject('PAGE_CONTAINER', Array)
#8 /home/caf/public_html/library/XenForo/ViewRenderer/HtmlAdmin.php(135): XenForo_ViewRenderer_Abstract->createTemplateObject('PAGE_CONTAINER', Array)
#9 /home/caf/public_html/library/XenForo/FrontController.php(637): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
#10 /home/caf/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#11 /home/caf/public_html/admin.php(13): XenForo_FrontController->run()
#12 {main}
Request State
array(3) {
  ["url"] => string(34) "http://cafesaxophone.com/admin.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}


Then this, when choosing a rotate speed:

Code:
Mysqli prepare error: Unknown column 'zone_position' in 'field list'
    1    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    2    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    3    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    4    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
    5    Zend_Db_Adapter_Abstract->update() in XenForo/DataWriter.php at line 1654
    6    XenForo_DataWriter->_update() in XenForo/DataWriter.php at line 1623
    7    XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
    8    XenForo_DataWriter->save() in Audentio/AdManager/ControllerAdmin/Zone.php at line 55
    9    Audentio_AdManager_ControllerAdmin_Zone->actionSave() in XenForo/FrontController.php at line 351
    10    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    11    XenForo_FrontController->run() in /home/caf/public_html/admin.php at line 13

Try running this query:

Code:
ALTER TABLE `admon_advertisement_zone` ADD `zone_position` varchar(50) NOT NULL DEFAULT '' AFTER `wrapper_class`;
 
It looks like you don't have the necessary admin permissions



There was a large red notice stating that tickets may be delayed a few days because of the Holidays as nobody was in the office. That being said, we are going through them now.



Try running this query:
Thank you Jake, it was the admin permissions that was not correct. I logged in with my superadmin user, and the Ad panel became available.
 
Top Bottom