Can't use module Google Adsense twice

infozoeker
13 years, 9 months ago
when i add the Google Adsense module twice (1 in the header, 1 in the footer), i get an error:

Fatal error: Cannot redeclare read_global() (previously declared in /home/xxx/domains/xxxxxx/public_html/modules/mod_mj_adsense/mod_mj_adsense.php(34) : eval()'d code:16) in /home/xxxxx/domains/xxxxxxx/public_html/modules/mod_mj_adsense/mod_mj_adsense.php(34) : eval()'d code on line 18


How can i add Google Adsense at the top AND the bottom of my mobile website?
dryabov
13 years, 8 months ago
Next version of mobile adsense module will allow to just enter Adsense ID to display ads.

Currently the only way is to wrap each
function ...(){...}
by corresponding condition, e.g.
if(!function_exists('read_global'))
{
function read_global($var){
...
}
}
agitfajeri
13 years, 8 months ago
I've used this module, but why the ads do not appear, whether I am probably wrong setting? Is this module can only be seen using a mobile device or can be viewed also through the computer?
thanks

My website www.tsammaran.com
dryabov
13 years, 8 months ago
The module is displayed in mobile mode only.
jaipuriterahul
12 years, 2 months ago
Since the function exists in header file already, it is better to delete the functions rather than if (! function_exists () ). Now since the function are not being called, how can the ads be displayed. I am confused
dryabov
12 years, 2 months ago
jaipuriterahul, the module was rewritten since that time, and now there is no issue displaying several instances of the module.

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.