Why is there no 'responsive' variable/switch in XF 1.2?

for DFP / Adsense, i just put the usual ad setup stuff for every ad type in page_container HEAD

then wrapped the ad invocation code in a bit of JS to detect screen width

Code:
<script type='text/javascript'>
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (width > 730) {
display 728x90 leaderboard invocation code
}
</script>

<script type='text/javascript'>
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (width < 729) {
mobile-friendly ad invocation code
}
</script>
 
To follow-up on BSA Pro - they're setting me up with a demo so I can see how it all works (and better understand the pricing model to know whether it would be worth the cost to move up to). The key element is obviously the ability to set-up responsive ad slots / code, but it offers other features such as direct sales, use on sites that are not approved for the BSA Marketplace, integration with the Marketplace for CycleChat, etc. - so I'll feedback here for anyone who's interested as I know other people use BSA Marketplace too.
 
I concur with @Clickfinity that we lack server side control. It has been asked in several locations to have better control for what is being delivered by having a simple conditional that can be used in templates to deliver x above this size, y below this size... where media queries deliver everything, simply hiding or showing content.

Sorry... but this makes website delivery worse for Google, not better. Google favours speed and performance above most other factors, and with the competition only getting worse online, every bit counts in software choice.

Responsive is a huge leap in the right direction, compared to browser detection alone... yet the ultimate solution seems to be a combination of responsive + mobile browser detection to get the major players atleast, which can be easily delivered via a conditional at that point.

Maybe we need to get an addon for the few major mobile phone browsers only... which we can then apply a conditional for delivering of content?
 
Last edited:
I concur with @Clickfinity that we lack server side control.
This is the nature of Responsive. Not sure why people are blaming XenForo.

Browser size is not available until AFTER the page starts rendering, and can change after the page FINISHES rendering.
No, I'll disable responsive. A feature that forces me to change advertisers because they don't offer the 'right' code isn't really useful, sorry.
I'm glad you are getting some assistance from others in this thread because blocking your users from having a good mobile experience just for ads would be a bit shortsighted.
I have 2 ad networks as well. Adsense and tribal fusion. I hope I can find a solution for my 2nd ad network to work responsively.
Google Adsense has published full instructions and code examples on how to swap in different ad blocks based on Responsive, and it's completely acceptable to their Terms of Service.

As for Tribal Fusion, I searched all over their website and their documentation of mobile ads is a joke. I could find no ToS or instructions on how to switch between full size and mobile ads based on browser width.
 
Last edited:
I'm not blaming xenforo... Simply concurring that it would be a nice addition to truly control mobile template output. XF have shown to be pioneers in forum software already... Thus pioneering mobile template control would be an awesome capability.
 
Last edited:
To follow-up on BSA Pro - they're setting me up with a demo so I can see how it all works (and better understand the pricing model to know whether it would be worth the cost to move up to). The key element is obviously the ability to set-up responsive ad slots / code, but it offers other features such as direct sales, use on sites that are not approved for the BSA Marketplace, integration with the Marketplace for CycleChat, etc. - so I'll feedback here for anyone who's interested as I know other people use BSA Marketplace too.

BSA have confirmed that whilst Pro offers responsive ad-code for native (direct sales/own) ads - it doesn't make the Marketplace ads responsive and you'd still be required to drop the Marketplace ad code from your pages below a certain width; so unfortunately it's not going to make all BSA ad-codes responsive.
 
I've decided to close my BSA account and go wholesale Adsense for the 1.2 upgrade. I do feel somewhat backed into a corner over it, but on reflection it would be a shame to deny my membership the responsive design.

Interestingly, on July 22nd Google is automatically rolling Adwords cusotmers into Enhanced Campaigns - forcing them to include mobile ads in every campaign - something the more astute publishers should be aware of and looking to capitalise on ... perhaps with a responsive site design eh? ;)

Interesting times. (y)
 
I've decided to close my BSA account and go wholesale Adsense for the 1.2 upgrade. I do feel somewhat backed into a corner over it, but on reflection it would be a shame to deny my membership the responsive design.

Interestingly, on July 22nd Google is automatically rolling Adwords cusotmers into Enhanced Campaigns - forcing them to include mobile ads in every campaign - something the more astute publishers should be aware of and looking to capitalise on ... perhaps with a responsive site design eh? ;)

Interesting times. (y)
I still think you should go the way of DfP, then you can still use BSA and any other ad platform you want. I've just about cracked it in regards to getting my ads set up. Its been a lot of trial and error, but they are working and are responsive as they can be.

Once I've full worked out any kinks, I'll share with you the step by step to get it set up,
 
Once I've full worked out any kinks, I'll share with you the step by step to get it set up,

Thanks - I've used DfP in the past but had an issue with impressions / revenue reporting when compared with straight Adsense ad calls (Adsense seemed more favourable), so I reverted back.

I'm very interested to see how others approach ads in their responsive layout though, and think it'll be good for us all to share our experiences here so we can all get the best results for our sites / revenue. I've watched your other thread where you're hammering out the responsive code ... (y)
 
Thanks - I've used DfP in the past but had an issue with impressions / revenue reporting when compared with straight Adsense ad calls (Adsense seemed more favourable), so I reverted back.

I'm very interested to see how others approach ads in their responsive layout though, and think it'll be good for us all to share our experiences here so we can all get the best results for our sites / revenue. I've watched your other thread where you're hammering out the responsive code ... (y)
Yea, I had problem with with the reporting of impressions as well, originally it was reporting impressions for ads that I'd not even put on my site, but I'd figured that out as well its to do with the single call option.

I'll trade you, once I've figured everything out I'll look at where you've got ads on your sites and send you the relevant bits you need to get it sorted, if don't mind me stealing the bits from your Terms of Service and Rules as I'm terrible with written english and they are just what I'm looking for with some tweaking.
 
for DFP / Adsense, i just put the usual ad setup stuff for every ad type in page_container HEAD

then wrapped the ad invocation code in a bit of JS to detect screen width

Code:
<script type='text/javascript'>
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (width > 730) {
display 728x90 leaderboard invocation code
}
</script>

<script type='text/javascript'>
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (width < 729) {
mobile-friendly ad invocation code
}
</script>
Why not use this?
https://support.google.com/adsense/answer/1354736?hl=en
 
I run ads from other agencies in the same spots, so i need some way to cater for their non-responsive ads too
I tried it with epoms ads, but nothing display.

Like:
HTML:
<script type='text/javascript'>
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (width < 729) {

<!-- BEGIN TAG - DO NOT MODIFY -->
<script type="text/javascript">
<!--
epom_key = "1bebc3691b5ff78dabeaeb2a3c33e9c2";
epom_code_format = "ads";
epom_ads_host = "//www.adshost2.com";
epom_click = "";
epom_custom_params = {};
epom_width = "300";
epom_height = "250";
document.write("<script type='text\/javascript' src='"+(location.protocol == 'https:' ? 'https:' : 'http:') + "//www.adshost2.com\/js/show_ads.js'><\/script>");
//-->
</script>
<!-- END TAG -->
}
</script>
 
Ive spent 3 solid days figuring it out but ive cracked it. Its a right pain setting up but worth it as sewma to be working well. Just some final testing and ill post instruction.
 
I tried it with epoms ads, but nothing display.

Like:
HTML:
<script type='text/javascript'>
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (width < 729) {

<!-- BEGIN TAG - DO NOT MODIFY -->
<script type="text/javascript">
<!--
epom_key = "1bebc3691b5ff78dabeaeb2a3c33e9c2";
epom_code_format = "ads";
epom_ads_host = "//www.adshost2.com";
epom_click = "";
epom_custom_params = {};
epom_width = "300";
epom_height = "250";
document.write("<script type='text\/javascript' src='"+(location.protocol == 'https:' ? 'https:' : 'http:') + "//www.adshost2.com\/js/show_ads.js'><\/script>");
//-->
</script>
<!-- END TAG -->
}
</script>

I'm no coder, but i'd try taking out the second
Code:
<script type="text/javascript">

and the
Code:
</script>
before
Code:
<!--END TAG -->
 
Top Bottom