Welcome, Guest
Username Password: Remember me

Can't use module Google Adsense twice
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Can't use module Google Adsense twice

Can't use module Google Adsense twice 12 years, 9 months ago #4710

  • infozoeker
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
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?

Re: Can't use module Google Adsense twice 12 years, 9 months ago #4798

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
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){
...
}
}

Re: Can't use module Google Adsense twice 12 years, 8 months ago #5104

  • agitfajeri
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
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

Re: Can't use module Google Adsense twice 12 years, 8 months ago #5143

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
The module is displayed in mobile mode only.

Re: Can't use module Google Adsense twice 11 years, 3 months ago #13524

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

Re: Can't use module Google Adsense twice 11 years, 3 months ago #13529

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
jaipuriterahul, the module was rewritten since that time, and now there is no issue displaying several instances of the module.
  • Page:
  • 1
Time to create page: 0.18 seconds

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.