Digital Point Ad Positioning

Digital Point Ad Positioning 1.3.0b

No permission to download
1. Maybe someday... not in the short term though. I have so many other things I need to get done first...

2. Should be fine.

I tried using some xen syntax in the HTML box and that didn't work. I basically want to display a different sized add on a couple of sub-forums as they have a sidebar which makes them too narrow for the default sized add.

If that's not possible then just excluding them on certain forums would be ok but there's currently not an option to.

Any suggestions?
 
I don't see why not... Might be better to do it outside of the addon though so it sticks on an upgrade. Like you could apply a template modification that more or less modifies the one it applies normally.
 
I don't see why not... Might be better to do it outside of the addon though so it sticks on an upgrade. Like you could apply a template modification that more or less modifies the one it applies normally.

Presumably as long as the execution order is higher than 10 then the modification by your addon will already have taken place so will exist for me to then modify?
 
Yeah, that's my assumption... I should preface it with the fact that I've never personally tried it, but I can't think of why it wouldn't work...
 
You could position the ad in the first viewable post. From looking over the code the ad may be placed in a hidden post for users with moderation rights. But that is very very picky.
 
Is it possible that this somehow conflicts with the built-in XF notices....???

Here is what just happened. I put a new notice in which showed for everyone (guest, members). Almost instantly, some members complained that they say the in-post (dp positioning) ads! Some of my moderators tried launching FF (they usually use chrome) and they saw them too.

I have other notices which are just for guests or just in one forum - they don't seem to trigger it, but the universal notice did. Weird.
 
For some reason this doesn't work consistently for me. when I click on a thread that has the /unread/ part at the end, it takes me to a link that has the thread name and then something like this :

/page-17#post-1737167

which is obviously correct, and the ad shows up under that post just fine.

However, when I click on one of my alerts, while I still get the exact same URL structure, the ad doesn't show up - instead it shows up in the first post of that page.

If I manually go and get any post ID link from any thread and load that in a new window, again the ad doesn't show up there, but under the first post of that page.

Any ideas?
 
This addon knows where the actual post is if you go through a /unread/ link. If you go not through an /unread/ link, it will display the ad on the first post.

If you go to your page by domain.com/page-17#post-1737167, you do not go through an /unread/ link. Therefore the ad will be displayed in the first post.
 
If the thread has already been viewed and the post you are looking at via the alert link is no longer new, it's not going to work. XenForo doesn't internally know what post the user is viewing because it resolves it to the true URL and redirects the user there. The hash part of the URL isn't known on the server-side at that point. Same thing if you go to just a normal thread page 1 URL, but down the page there is a new post, it will insert the ad after that. It's a bit annoying but unfortunately how it has to work simply because it doesn't know REALLY what post the user is looking at, only that one on the page is the first new one.

This addon knows where the actual post is if you go through a /unread/ link. If you go not through an /unread/ link, it will display the ad on the first post.

If you go to your page by domain.com/page-17#post-1737167, you do not go through an /unread/ link. Therefore the ad will be displayed in the first post.
Actually, not the case... the system only knows if there is a post on the page that the user CURRENTLY hasn't read or not, and that's where the ad gets injected. (see above for info... since the server doesn't see the hash part of the URL, it doesn't know what the user is actually looking at).
 
This mod is good. It would make it great if we were able to control where exactly to put the ad.

I remember in vbulletin had the same mod. Except we choose which post to put it in

If the thread was big. I would always choose to put it in 3 posts

Post #1 (first post)

Post # 5 (middle Post)

Post #10 (the last post)

Someone people would think it was too much ads. But it worked fine for me
 
I'm re-trying this addon to improve revenue but we are getting errors on our board. We are still on 1.1 for now (should be upgrading once the skin is finished in the next 2-3 weeks).
Fatal error: Method XenForo_BbCode_TextWrapper::__toString() must not throw an exception in/home/****/public_html/forums/library/DigitalPointAdPositioning/ViewPublic/Thread/View.phpon line 0

I believe it is from the spoiler tag we have. Is there a way to change the spoiler or modify this addon so it doesn't error out when there is a spoiler in the post where the ad is going?
 
@digitalpoint

Can I edit the template modification that the addon applies to exclude some forums with xen conditional?

View attachment 56873
Is there a better way of doing it?
How do you get to this (or is this only for 1.2? Bc this addon isn't listed in Template Modifications for me)? What I'm aiming for is to show a different ad for mobile users. IIRC, your addon doesn't allow for if conditionals from the settings @digitalpoint but you mentioned earlier applying a template modification outside of the addon. Can you point me in the right direction in how you would go about doing this?
 
Last edited:
There might be two ways of doing this:

1. Just modify your banner to check on a CSS / Javascript level for the users browser and serve either this or that banner.

2. Check on PHP-Level the browser. You might want to modify ViewPublic/Thread/View.php. You add your banners in ACP>Settings. These banners are fetched from the program when a user visits a page. The code to fetch these banners is in the addon: ViewPublic/Thread/View.php. You would have to do this:
- 1. Add another ACP>Settings>MobileBanner textfield
- 2. Check within the code if a mobile browser is used and serve the according banner from ACP
 
Back
Top Bottom