Advertisement:

Author Topic: AdSense Mod  (Read 5130 times)

Offline zStudios Team

  • Semi-Newbie
  • *
  • Posts: 41
  • Design and Development
    • zStudiosNetworks on Facebook
    • Siplhes on GitHub
    • zStudios Networks
AdSense Mod
« on: October 14, 2016, 01:38:35 PM »
Link al mod




AdSense Mod
Author: zStudios Networks

Description

For SMF 2.0.x only

With this modification you can easily put AdSense ads on your forum, Only putting AdSense codes
License

 * This SMF modification is subject to the Mozilla Public License Version
 * 2.0 (the "License"); you may not use this SMF modification except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 
Languages
-English/utf8

Changelog

http://i.imgur.com/cHgggj6.png
http://i.imgur.com/LFE29ob.png
http://i.imgur.com/fu1iyOg.png


Do you want more Design and Development?.... zStudios Networks www.zstudios.es

Offline Blackylol

  • Semi-Newbie
  • *
  • Posts: 47
Re: AdSense Mod
« Reply #1 on: December 11, 2016, 09:00:19 AM »
I'm getting this in the logs

8: Undefined index: headerads_enable
File: /Themes/GamingNation/BoardIndex.template.php
Line: 26
SMF 2.0.2

Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,805
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: AdSense Mod
« Reply #2 on: December 11, 2016, 10:38:07 AM »
I'm getting this in the logs

8: Undefined index: headerads_enable
File: /Themes/GamingNation/BoardIndex.template.php
Line: 26
Please check if you have following code at the end of your Modifications.english and Modifications.{langauge}.php file (in case you're using custom language):
Code: [Select]

// zStudios AdSenseMod.
$txt['headerads_enable'] = 'Enable AdSense in Board Index';
$txt['headerads_text'] = '(paste Adsense code)';
$txt['footerads_enable'] = 'Enable AdSense in above Stats center';
$txt['footerads_text'] = '(paste Adsense code)';
$txt['toppostads_enable'] = 'Enable AdSense at the top of a thread';
$txt['toppostads_text'] = '(paste Adsense code)';
$txt['ad_text'] = 'Advertisement</br>';

Offline zStudios Team

  • Semi-Newbie
  • *
  • Posts: 41
  • Design and Development
    • zStudiosNetworks on Facebook
    • Siplhes on GitHub
    • zStudios Networks
Re: AdSense Mod
« Reply #3 on: December 26, 2016, 05:47:10 PM »
Be sure that variables are set in language files, and that the modification in "BoardIndex.template.php" are ok.


Offline zStudios Team

  • Semi-Newbie
  • *
  • Posts: 41
  • Design and Development
    • zStudiosNetworks on Facebook
    • Siplhes on GitHub
    • zStudios Networks
Re: AdSense Mod
« Reply #4 on: December 30, 2016, 04:26:14 AM »
Soon an update:

-Membergroups permissions
-New Advertisement locations
-Tooltips in jQuery

Offline fazeMark

  • Semi-Newbie
  • *
  • Posts: 10
Re: AdSense Mod
« Reply #5 on: December 30, 2016, 06:22:30 AM »
Thanks, this mod is gonna be useful for sure.

Offline zStudios Team

  • Semi-Newbie
  • *
  • Posts: 41
  • Design and Development
    • zStudiosNetworks on Facebook
    • Siplhes on GitHub
    • zStudios Networks
Re: AdSense Mod
« Reply #6 on: December 30, 2016, 06:28:03 AM »
You're welcome, Any suggestions will be very well received.

Offline snadge

  • Jr. Member
  • **
  • Posts: 369
    • TheTechForum on Facebook
    • @The_Tech_Forum on Twitter
    • The Tech Forum
Re: AdSense Mod
« Reply #7 on: January 03, 2017, 11:59:43 AM »
I am new to adsense and have installed this mod but it only seems to work with one type of advert (responsive-default)...anything else just has nothing but the HUGE grey borders that I dont want and are not selected in adsense?
 e.g.:


I would like to get rid of that huge grey border? is this something you can help with?

thanks

Offline snadge

  • Jr. Member
  • **
  • Posts: 369
    • TheTechForum on Facebook
    • @The_Tech_Forum on Twitter
    • The Tech Forum
Re: AdSense Mod
« Reply #8 on: January 03, 2017, 03:07:15 PM »
I realise now its probably to do with the forum theme - i have suggestion - how about advert on the last post? so that people that have the default view of seeing the lest reply first will get to see and advert? when clicking 'view reply' from an email or returns to the topic

Offline zStudios Team

  • Semi-Newbie
  • *
  • Posts: 41
  • Design and Development
    • zStudiosNetworks on Facebook
    • Siplhes on GitHub
    • zStudios Networks
Re: AdSense Mod
« Reply #9 on: January 03, 2017, 04:53:11 PM »
I am new to adsense and have installed this mod but it only seems to work with one type of advert (responsive-default)...anything else just has nothing but the HUGE grey borders that I dont want and are not selected in adsense?
 e.g.:


I would like to get rid of that huge grey border? is this something you can help with?

thanks

if you want remove that default-curve background just remove the background tag or change the color

Quote
.adsensemodzstudios_header {
   background: #f0f4f7;
   border-radius: 5px;
   padding: 20px;
   color: #222;
}
.adsensemodzstudios_footer {
   background: #f5f5f5;
   border-radius: 5px;
   padding: 20px;
   color: #222;
}

*RED PART

Offline zStudios Team

  • Semi-Newbie
  • *
  • Posts: 41
  • Design and Development
    • zStudiosNetworks on Facebook
    • Siplhes on GitHub
    • zStudios Networks
Re: AdSense Mod
« Reply #10 on: January 03, 2017, 04:54:17 PM »
I realise now its probably to do with the forum theme - i have suggestion - how about advert on the last post? so that people that have the default view of seeing the lest reply first will get to see and advert? when clicking 'view reply' from an email or returns to the topic

Sure, thanks for your suggestion

Offline wzol

  • Semi-Newbie
  • *
  • Posts: 21
Re: AdSense Mod
« Reply #11 on: August 15, 2017, 03:23:53 PM »
Thanks for the mod, could you add an option to show ads only for guests - or help me do it?

I know I need $user_info['is_guest'] just don't know where to make this check.

UPDATE: correction: it is $context['user']['is_guest']  :)
« Last Edit: August 15, 2017, 03:47:11 PM by wzol »

Offline njtweb

  • Full Member
  • ***
  • Posts: 584
Re: AdSense Mod
« Reply #12 on: August 10, 2018, 12:06:45 PM »
Any chance to add permissions? I appreciate the mod, I'd like to only show ads to guests and not members. Thank you

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,033
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: AdSense Mod
« Reply #13 on: August 10, 2018, 01:13:49 PM »
Very good modification and simple :D ... Also I leave the translation to Latin Spanish

Code: [Select]
<file name="$themedir/languages/Modifications.spanish_latin.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// zStudios AdSenseMod.
$txt['headerads_enable'] = 'Habilitar AdSense en el &iacute;ndice del foro';
$txt['headerads_text'] = '(Pegue el c&oacute;digo de Adsense)';
$txt['footerads_enable'] = 'Habilitar AdSense en el centro y por encima de las estad&iacute;sticas';
$txt['footerads_text'] = '(Pegue el c&oacute;digo de Adsense)';
$txt['toppostads_enable'] = 'Habilitar AdSense en la parte superior de un tema';
$txt['toppostads_text'] = '(Pegue el c&oacute;digo de Adsense)';
$txt['ad_text'] = 'Publicidad</br>';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Modifications.spanish_latin-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// zStudios AdSenseMod.
$txt['headerads_enable'] = 'Habilitar AdSense en el índice del foro';
$txt['headerads_text'] = '(Pegue el código de Adsense)';
$txt['footerads_enable'] = 'Habilitar AdSense en el centro y por encima de las estadísticas';
$txt['footerads_text'] = '(Pegue el código de Adsense)';
$txt['toppostads_enable'] = 'Habilitar AdSense en la parte superior de un tema';
$txt['toppostads_text'] = '(Pegue el código de Adsense)';
$txt['ad_text'] = 'Publicidad</br>';
]]></add>
</operation>
</file>
</modification>

If you need anything let me know!


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline naijacrux

  • Semi-Newbie
  • *
  • Posts: 15
Re: AdSense Mod
« Reply #14 on: September 08, 2018, 08:16:08 PM »
Very good modification and simple :D ... Also I leave the translation to Latin Spanish

Code: [Select]
<file name="$themedir/languages/Modifications.spanish_latin.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// zStudios AdSenseMod.
$txt['headerads_enable'] = 'Habilitar AdSense en el &iacute;ndice del foro';
$txt['headerads_text'] = '(Pegue el c&oacute;digo de Adsense)';
$txt['footerads_enable'] = 'Habilitar AdSense en el centro y por encima de las estad&iacute;sticas';
$txt['footerads_text'] = '(Pegue el c&oacute;digo de Adsense)';
$txt['toppostads_enable'] = 'Habilitar AdSense en la parte superior de un tema';
$txt['toppostads_text'] = '(Pegue el c&oacute;digo de Adsense)';
$txt['ad_text'] = 'Publicidad</br>';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Modifications.spanish_latin-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// zStudios AdSenseMod.
$txt['headerads_enable'] = 'Habilitar AdSense en el índice del foro';
$txt['headerads_text'] = '(Pegue el código de Adsense)';
$txt['footerads_enable'] = 'Habilitar AdSense en el centro y por encima de las estadísticas';
$txt['footerads_text'] = '(Pegue el código de Adsense)';
$txt['toppostads_enable'] = 'Habilitar AdSense en la parte superior de un tema';
$txt['toppostads_text'] = '(Pegue el código de Adsense)';
$txt['ad_text'] = 'Publicidad</br>';
]]></add>
</operation>
</file>
</modification>

If you need anything let me know!


Regards!

dear i need help, how do i make this mod show responsive ads on static theme, i am not using a responsive them but the mod is not showing the ads on anecdota theme

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,033
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: AdSense Mod
« Reply #15 on: September 08, 2018, 09:35:21 PM »
dear i need help, how do i make this mod show responsive ads on static theme, i am not using a responsive them but the mod is not showing the ads on anecdota theme

When I installed the mod the changes were applied correctly to your theme?. I did not try everything but you should see that change is receptive to ads (although with a fixed value it adjusts only I believe vaguely).


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline mattizzy

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
    • mattizzy.okeke on Facebook
    • @mattizzyo on Twitter
Re: AdSense Mod
« Reply #16 on: September 09, 2018, 04:50:41 AM »
Nice modifications. well, this will be good for people who just use AdSense alone.

I am only an SMF Addict. I think I took overdose.