Digital Point Ad Positioning

Digital Point Ad Positioning 1.3.0b

No permission to download
Hi,

I am getting the following error. This error shows up whenever i try to open a thread through search results and also when i try to check the last pages of a thread... for some pages it work.

Could you please help me with this?
An exception occurred: Undefined offset: 218 in /home/mmm/public_html/example.com/library/DigitalPointAdPositioning/ViewPublic/Thread/View.php on line 29
  1. XenForo_Application::handlePhpError() in DigitalPointAdPositioning/ViewPublic/Thread/View.php at line 29
  2. DigitalPointAdPositioning_ViewPublic_Thread_View->renderHtml() in EWRporta/ViewPublic/Custom.php at line 7
  3. EWRporta_ViewPublic_Custom->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 215
  4. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 67
  5. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 533
  6. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
  7. XenForo_FrontController->run() in /home/mmm/public_html/example.com/index.php at line 13
 
Hmmm... the only way you should see something like that would be if XenForo thinks a certain post is on the page you are viewing, but it's not.

In the library/DigitalPointAdPositioning/ViewPublic/Thread/View file, if you thanks this:

PHP:
		if (strpos($this->_params['unreadLink'], '#post-'))
		{
			$postIdForAd = intval(substr($this->_params['unreadLink'], strpos($this->_params['unreadLink'], '#post-') + 6));
		}
		else
		{
			$postIdForAd = $this->_params['firstPost']['post_id'];
		}

to this (adding the last part basically):

PHP:
		if (strpos($this->_params['unreadLink'], '#post-'))
		{
			$postIdForAd = intval(substr($this->_params['unreadLink'], strpos($this->_params['unreadLink'], '#post-') + 6));
		}
		else
		{
			$postIdForAd = $this->_params['firstPost']['post_id'];
		}

		if (!isset($this->_params['posts'][$postIdForAd]))
		{
			reset($this->_params['posts']);
			$postIdForAd = key($this->_params['posts']);
		}

Does the error go away? That will do a double check that the post that XenForo thinks is on the page actually is, and if it's not, fall back to the first page that IS on the page.
 
How do the conditionals work for hiding ads?

With testing it, I want to show the ads to Admins only. If I tick hide from usergroups and select all the others will that work? As my Admins are also in the Moderating and Registered usergroups.
 
Also what should the "Insert Ad After Post" option do? For me it's just inserting it after the first post on a page every time. Is that right?

Edit: Nevermind, read the thread in full and understand now :-)
 
Very neat and compact add-on. :)

Shawn when I display ads to guests the ad is always displayed after the first post on each page (because everything is unread for guests).

That's great because I'm now getting extra impressions (y) but is there any way to move the ad down a slot to below the second post on the page?

I ask because I also have a banner ad that runs above the breadcrumb and quite often the ads are both visible at the same time, cluttering the layout somewhat.

I've got it installed at GeeksChat if you want to see what I mean (I've put a large padding border above the ad for now to nudge it down a bit).

Cheers,
Shaun :D
 
How do the conditionals work for hiding ads?

With testing it, I want to show the ads to Admins only. If I tick hide from usergroups and select all the others will that work? As my Admins are also in the Moderating and Registered usergroups.
The logic is if the user is part of *any* usergroup that has ads hidden, then they will hide for that user.

Very neat and compact add-on. :)

Shawn when I display ads to guests the ad is always displayed after the first post on each page (because everything is unread for guests).

That's great because I'm now getting extra impressions (y) but is there any way to move the ad down a slot to below the second post on the page?

I ask because I also have a banner ad that runs above the breadcrumb and quite often the ads are both visible at the same time, cluttering the layout somewhat.

I've got it installed at GeeksChat if you want to see what I mean (I've put a large padding border above the ad for now to nudge it down a bit).

Cheers,
Shaun :D
Sorry, there isn't such an option at this point. Although I'm not even sure what I would *call* such an option... "Show under post after current post"? You would also run into the issue where logged in users where the last post on the page is the current post (which is going to be often) would end up getting NO ad, since there is no ad after the current post in that scenario.
 
I seem to be getting errors with this in combination with xenporta. I've tried making the mod not show ads up in certain forums but it doesn't seem to be working. I've used this if condition:
Code:
<xen:if is="!in_array({$forum.node_id}, array(8,28,91))">
ad code
</xen:if>
Which doesn't work with this mod (works around the ads I've manually placed in templates though).

I've selected all the forums I want the ads in and deselected the ones I don't want them in and it is still showing them everywhere. I'm just trying to make it so the ads don't show up in certain sections on the site, which all started by me receiving all sorts of errors between this and xenporta (or so it seems...I'm not a coder so idk and I get thousands of these per hour):
Code:
#0 /home/****/public_html/forums/library/DigitalPointAdPositioning/ViewPublic/Thread/View.php(29): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/se7ensin/...', 29, Array)
#1 /home/****/public_html/forums/library/EWRporta/ViewPublic/Custom.php(7): DigitalPointAdPositioning_ViewPublic_Thread_View->renderHtml()
#2 /home/****/public_html/forums/library/XenForo/ViewRenderer/Abstract.php(215): EWRporta_ViewPublic_Custom->renderHtml()
#3 /home/****/public_html/forums/library/XenForo/ViewRenderer/HtmlPublic.php(67): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Html', Array, 'thread_view')
#4 /home/****/public_html/forums/library/XenForo/FrontController.php(533): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'thread_view', NULL)
#5 /home/****/public_html/forums/library/XenForo/FrontController.php(156): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#6 /home/****/public_html/forums/index.php(13): XenForo_FrontController->run()
#7 {main}

With it saying:
ErrorException: Undefined offset: 5761035 - library/DigitalPointAdPositioning/ViewPublic/Thread/View.php:29

I'm only assuming that if I make it so the ads don't show up in any of the xenporta stuff then this error won't be showing up anymore. Was wanting to try it before I went reporting the error but I can't even try it. The errors do cease when I disable the addon. Can someone help?
 
Hmmmm... I don't have an install with XenPorta installed, so a little tough to try and troubleshoot what XenPorta might be doing to the array of posts. The only time I could think of that an error like that would show up is if the "Go To First Unread" link in the pagination was linking to a specific post with a hashtag that didn't exist on the page (which XF never does).
 
Just an update after running this for a month; I'm not finding that this is having a positive affect on my revenue, however I suspect it's more to do with the position of my ads than Shawn's add-on.

I display my top banner in the space between the navigation and breadcrumb - which gets a good CTR. However, because I only show ads to guests the lower banner is always shown after the first post, meaning that in most cases both banners are visible on screen at the same time - which reduces impact and CTR (so I'm going to revert to my previous setup - no offence! ;) ).

It's a great add-on that works really well but it's just not currently fitting in with the way I operate my ads and have my pages laid out. (y)

Cheers,
Shaun :D
 
Hi Everyone,

I've read here that some people are only showing Adsense ads to unregistered and users with low post counts. Would this be because you get a higher click-thru rate and thus Google will serve higher paying ads?

Are there any other benefits?

Thanks. :)

Ken
 
Heh DP,

Can we shorten your branding link to say "Digitalpoint AP" or something coz in a mobile device "advertising positioning by Digital Point" is a tad too long. I understand the need for such link but it'd be nice if we are allowed to shorten it.

Not to forget we have Forum software by XenForo™ ©2010-2012 XenForo Ltd too at the footer :eek:
 
Does anyone found out on his board how much #post ... links are actually coming from unread links (which can be fetched as a parameter and it is used here) and how much user traffic is coming from domain.com/threads/1234#post455 links?
 
When hiding an ad with template conditionals using this resource, it hides the ad but not from the source code. And I got caught and suspended by Google because of it.

http://xenforo.com/community/thread...from-a-forum-with-questionable-content.39497/

This is a warning to all who are using this addon and are trying to hide ads. Maybe it's just my forum, who knows. But that's whats what happened.

I viewed my site's source and I can still see the ad I hid in it.
 
If you can still see it in the source, I'm fairly certain it didn't get hidden. Strange it's not rendering though, unless the hiding is really just inserting JavaScript errors rather than hiding it.
 
Oh okay. I am uninstalling this to be on the safe side.

Just gonna have to use this.

How can I show content after post x on every page in a thread?
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == x AND !{$message.conversation_id}">
This content will show after post x on every page in a thread
</xen:if>
 
That looks like it would do it (assuming all the variables used are available in the template you are putting it in).

I haven't tested that code myself, but I don't see anything in there that would make me think it wouldn't work.
 
Top Bottom