SMF Mobile Theme

SMF Mobile Theme => Feedbacks & Suggestions => Topic started by: empty on May 21, 2015, 11:58:55 AM

Title: Option for injecting ads
Post by: empty on May 21, 2015, 11:58:55 AM
Hi.

Just bought the theme and it works fine.

Only one wish: Please add an option, to insert ads (under the header and/or at the bottom) in a simple way, so i don't have to patch the theme files.

Hope, you'll think about it.

Regards,

Mario
Title: Re: Option for injecting ads
Post by: Administrator on May 21, 2015, 12:29:57 PM
Thanks for your suggestion, I'll indeed add an option, it should be quite easy :)
Title: Re: Option for injecting ads
Post by: Administrator on May 22, 2015, 12:24:51 PM
Added for next release, you can now add ads below the header and above the footer right from your Theme Settings :)
Title: Re: Option for injecting ads
Post by: empty on May 22, 2015, 01:52:17 PM
Wow!

Thanks a lot. Will try it out tomorrow!

Title: Re: Option for injecting ads
Post by: Administrator on May 22, 2015, 03:56:12 PM
Let me know how it goes :)
Title: Re: Option for injecting ads
Post by: empty on May 23, 2015, 02:45:49 AM
The injection works fine.

But with adsense, there seems to be a problem with responsive ads.

If i choose the recommended responsive layout, no ad shows up. if i choose a fixed size (e.g. 320x100) the ad is displayed.

Don't know, if this is a problem caused by the theme (css?) or by Google...
Title: Re: Option for injecting ads
Post by: Administrator on May 23, 2015, 11:38:12 AM
For jQuery Mobile you need to replace:

Code: [Select]
(adsbygoogle = window.adsbygoogle || []).push({});
With:

Code: [Select]
var prev_handler = window.onload;
window.onload = function () {
    if (prev_handler) {
        prev_handler();
    }
    (adsbygoogle = window.adsbygoogle || []).push({});
};

In the code Google gave you.
Title: Re: Option for injecting ads
Post by: scrapfighter on May 23, 2015, 04:35:29 PM
yes it could be super cool .. also if it was possible to have own ads and not only google ads :)
cheers from Denmark and thanks for your great work  :D ;D
Title: Re: Option for injecting ads
Post by: Administrator on May 24, 2015, 12:54:46 AM
In theme settings you can add any HTML code you want, including your own ads :)
Title: Re: Option for injecting ads
Post by: empty on May 24, 2015, 08:57:36 AM
Thanks for your superb support!
Title: Re: Option for injecting ads
Post by: Administrator on May 24, 2015, 09:42:54 AM
Thanks to you for your suggestion :)