Digital Point Ad Positioning

Digital Point Ad Positioning 1.3.0b

No permission to download
digitalpoint, would it be tough to add an option for ad positions in xenforo pages?
This add on is going to make me lazy...
 
Tip: You can make this addon work for boards with more than one million posts by increasing the red number in View.php:

strpos($this->_params['unreadLink'],'#post-')+ 6 )

Its very interesting how this is done. I used jquery to add the ad code for the actual post#1234, but with the Adsense code starting at DOM, it was a big tricky. Digitalpoints solution is better.
 
Tip: You can make this addon work for boards with more than one million posts by increasing the red number in View.php:

strpos($this->_params['unreadLink'],'#post-')+ 6 )

Its very interesting how this is done. I used jquery to add the ad code for the actual post#1234, but with the Adsense code starting at DOM, it was a big tricky. Digitalpoints solution is better.
Actually, you shouldn't change the code... the +6 is within the second parameter of substr(), not the third (there is no third, so it takes the string all the way to the end). The +6 is so the STARTING point is 6 characters past where "#post-" STARTS...

Actually increasing the number would totally mess it up... if you made it 8 (for example) the post number of "12345678" would be seen as "345678" (and wouldn't be on the page).
 
Is there anyway of excluding a template from using this mod?

I don't want my mobile theme to use the same sized advert as an example

Thanks,
Dave.
 
Ads showing inside the post no matter what usergroup I chose to hide them from :(

Has someone found a solution?
 
Sure.

I have checked-in every usergroups and I can see ad for each group :/
I have tried many combinations.

Nevertheless, it works for "ad after 1st post".

I am so sad because i love your plugin !
 

Attachments

  • dppa.webp
    dppa.webp
    24.9 KB · Views: 46
What do you have the "Force Inside Post Ad In Certain Forums" set to? Anything? That will override your usergroup settings.
 
OKKKKKKKKK
I am an idiot ! Thanks for your help.
I had every forum checked, so my usergroup settings were not taken into account.

Now it seems to work :)
 
Thanks so much for this...I'm pumped to see if it actually makes a few bucks. I started a new google ad code to track it.......
 
FYI, experience so far is pretty good - with a few caveats!

Revenue increased some, but there was a fall off in the other ads at the top and bottom of the page - but still there was a net gain.

I almost had a revolution on my hands because some members were not logged in and saw the ads and felt abused.......!!!!

I think I tamped down the mob by changing the ad to after the post and putting some lines around it.....
;)

Thanks for this in any case....it works well...
 
It's based on the first unread post in the thread, so if you have already read all the posts on the page, it will fallback to the first post.
i still couldn't see showing ads randomly.
its always on the first post.

heres what i do,
i clear the browsers cache, cookies, etc.. everything.
i went to my site (not login)
i browse the WHATS NEW
when i click the thread in whats new,
ads shows always in the first post.

how can i replicate and see the ads randomly?
any steps i should do?

thanks
 
Well, it's not ideal as far as putting the ad in the currently viewed ad since there is no SURE way to know which ad the user is looking at (we can't see the #hash part of the URL from the server-side). Basically we are reading the URL for the "Go To First Unread" link and parsing out post ID from that.

So my first question would be, when you see the ad in the first post, are you on a page with the "Go To First Unread" link on it, and does it go to a post that is on the current page?
 
Top Bottom