Digital Point Ad Positioning

Digital Point Ad Positioning 1.3.0b

No permission to download

Brent W

Well-known member
Doesn't look like that's from 1.5.3 serialization or from PHP7. That looks like somewhere upstream the array of posts to be displayed in the view renderer was changed. Specifically it's trying to display an ad on a post that no longer exists in the array of posts to show. Maybe some addon is doing something with the $posts array. You could probably change this:
PHP:
(!$userModel->isMemberOfUserGroup(@$this->_params['posts'][@$postIdForAd], $options->dppa_insidepost_hidepostby) || !XenForo_Visitor::getUserId())
to this:
PHP:
(!$userModel->isMemberOfUserGroup((array)@$this->_params['posts'][@$postIdForAd], $options->dppa_insidepost_hidepostby) || !XenForo_Visitor::getUserId())
That will force the (now) null post to be an empty array at least.
I can say that this only started happening when we upgraded to PHP 7.0.4. Was no problem before.
 
I have some pre-purchase questions about this add-on:

1) The primary functionality we need is to be able to block ads going into threads/posts that have images in them. Although our forum text is ad-safe, some of the ancient legacy pictures deep in the forum may not be... I understand this add-on can stop ads from displaying ads in threads/ posts that contain images. Is this the case?

2) Can this be add-on utilize DFP tags?

3) Is the ad-on compatible with the latest version of xenforo?


Thanks,
 

Mouth

Well-known member
Server Error Log
Error Info
TypeError: Argument 1 passed to XenForo_Model_User::isMemberOfUserGroup() must be of the type array, null given, called in library/DigitalPointAdPositioning/ViewPublic/Thread/View.php on line 41 -library/XenForo/Model/User.php:1707
Generated By: Unknown Account, Today at 04:12
Stack Trace
#0 library/DigitalPointAdPositioning/ViewPublic/Thread/View.php(41): XenForo_Model_User->isMemberOfUserGroup(NULL, Array)
#1 library/NFLJ/Showcase/XenForo/ViewPublic/Thread/View.php(7): DigitalPointAdPositioning_ViewPublic_Thread_View->renderHtml()
#2 library/XenForo/ViewRenderer/Abstract.php(227): NFLJ_Showcase_XenForo_ViewPublic_Thread_View->renderHtml()
#3 library/XenForo/ViewRenderer/HtmlPublic.php(71): XenForo_ViewRenderer_Abstract->renderViewObject('NFLJ_Showcase_X...', 'Html', Array, 'thread_view')
#4 library/XenForo/FrontController.php(604): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'thread_view', NULL)
#5 library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#6 index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
["url"] => string(89) "/threads/vic-thursdays-mystery-ride-coffee-st-kilda.68763/page-364"
["_GET"] => array(1) {
["/threads/vic-thursdays-mystery-ride-coffee-st-kilda_68763/page-364"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 

Claudio

Well-known member
The system doesn't do anything special with HTML. I would just make sure the ad code you are injecting with the addon is the same between both forums.
Hi DP

On vBulletin the ad is inserted below the posts you are currently viewing (so if you load a particular post id the ad is displayed just above the signature). However in XF it doesn't, it displays the ad in the first post of the thread. Is possible to implement this feature on XF addon as well?
 
Hi @digitalpoint,

The overview doesn't mention this... so I would like to know whether this plugin is compatible with version 1.5 and whether it would work fine on PHP 7, given the issue a user reported after upgrading to PHP 7.0.4

Thanks! (y)
 

digitalpoint

Well-known member
I suppose a separate setting could be used for something like that. But isn't the whole point of moderators to do stuff like that?

Seems like it could get overwhelming if you are making admins go through each and every thread like that.
 

dutchbb

Well-known member
I just use the global settings, also moderators and upgraded members can select not to show adsense in there preferences. No need to do this in separate threads.

Normally it would not be a problem but from today i am using the topic starter permissions addon so members can lock/unlock own threads.
https://xenforo.com/community/resources/infisjsc-topic-thread-starters-permissions.24/

It is based on moderator permissions and the option to supress adsense is also available when the option is on.
 
I installed DPAP tonight and have inserted my Java snippets. All I am seeing are the in-post ad placeholder, and all of those are either blank or have a 404 error.

How can this issue get fixed?
 

digitalpoint

Well-known member
I'd double check the code you inserted. DP Ads doesn't alter the HTML/JavaScript you tell it to insert, it literally inserts it blindly. Does the code work without DP Ads?
 
I have some pre-purchase questions about this add-on:2) Can this be add-on utilize DFP tags?
2. It should be able to work with anything since you define the HTML/JavaScript you want to run.
@digitalpoint I'm hoping you'll kindly help me.

I've used this plugin for years for Adsense and it's worked a charm, a vital addition to my forum. Thank you.

I'm currently trying to migrate my ads to DFP - however, whenever I place DFP ad units like so;

upload_2017-3-27_13-20-23.png

The ad unit then shows at the very bottom left of the page like so;

upload_2017-3-27_13-21-9.png

Any ideas what I'm doing wrong? :(
 
Top