When using the google adsese feature, if you set it to appear in each download of a category and you have >3 downloads in some category, jdownloads will display more than 3 google ads in a single category page, which violates the limits of google.
I actually asked this a couple of years back ( :P ) and arno gave me this solution (pretty simple really):
omponents/com_jdownloads/jdownloads.html.php
Line 650 ADD:
$sum_google=0;
Line 682:
// google adsense
if (($jlistConfig['google.adsense.active']) && ($sum_google <= 2)) {
$html_file = str_replace('{google_adsense}', stripslashes($jlistConfig['google.adsense.code']), $html_file);
$sum_google++;
} else {
$html_file = str_replace('{google_adsense}', '', $html_file);
}
Not sure if it would need to be included anywhere else, but I think it should be in the latest jdownloads :)
Hi bositman,
your example must be from an older version (maybe 1.9.x).
But i will see what i can do...
Indeed it's from 1.9.x. Thanks :)
I've made the modification for the new version of Jdownloads. Here it is (i guess other views should be modified as well) :
components/com_jdownloads/views/category/tmpl/default.php
Line 709 ADD $sum_google=0;
Line 791 if (($jlistConfig['google.adsense.active']) && ($sum_google <= 2)) {
Line 793 $sum_google++;