News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

AdSense Mod

Started by Vehement Works, October 14, 2016, 01:38:35 PM

Previous topic - Next topic

Vehement Works

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
Last released modifications: AdSense Mod|Font AweaZome BBC code

Blackylol

I'm getting this in the logs

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

Dzonny

Quote from: Blackylol 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
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):


// 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>';

Vehement Works

Be sure that variables are set in language files, and that the modification in "BoardIndex.template.php" are ok.

Last released modifications: AdSense Mod|Font AweaZome BBC code

Vehement Works

Soon an update:

-Membergroups permissions
-New Advertisement locations
-Tooltips in jQuery
Last released modifications: AdSense Mod|Font AweaZome BBC code

fazeMark

Thanks, this mod is gonna be useful for sure.

Vehement Works

You're welcome, Any suggestions will be very well received.
Last released modifications: AdSense Mod|Font AweaZome BBC code

snadge

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

snadge

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

Vehement Works

Quote from: snadge 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

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
Last released modifications: AdSense Mod|Font AweaZome BBC code

Vehement Works

Quote from: snadge 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

Sure, thanks for your suggestion
Last released modifications: AdSense Mod|Font AweaZome BBC code

wzol

#11
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']  :)

njtweb

Any chance to add permissions? I appreciate the mod, I'd like to only show ads to guests and not members. Thank you

-Rock Lee-

Very good modification and simple :D ... Also I leave the translation to Latin Spanish

<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
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

naijacrux

Quote from: Rock Lee on August 10, 2018, 01:13:49 PM
Very good modification and simple :D ... Also I leave the translation to Latin Spanish

<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

-Rock Lee-

Quote from: naijacrux on September 08, 2018, 08:16:08 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
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

mattizzy

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.

jemaral

Quote from: Rock Lee on August 10, 2018, 01:13:49 PM
Very good modification and simple :D ... Also I leave the translation to Latin Spanish

<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!

Hola Rock Lee,

Disculpa, dónde hay que introducir ese código para traducirlo al castellano?

Gracias!

loki66

I am using the ad management mod but I cant make the responsive adsense ads working ...
The fixed size banners I use are ok on desktop but way too big on mobile.
I am using a responsive theme with 2.0.18...

Is there a way to hide banners on mobiles or to have these responsive ads working ? ?

Thanks,

Steve

As noted in your first topic, this might not be the right mod for your question. Are you using this one or https://www.simplemachines.org/community/index.php?topic=68632.0 ?
DO NOT pm me for support!

Advertisement: