Here are my steps.
1. Create a Phoca - Google AdSense Easy module and publish in in phocaads position
2.
find
components/com_phocagallery/views/detail/view.html.php
after $params = &$mainframe->getParams(); ,
paste the following code:
Code: Select all
// PHOCA ADS EDIT - - - - - - - - - -
$adsRenderer = $document->loadRenderer('module');
$adsOutput = '';
$adsPosition = JModuleHelper::getModules('phocaads');
if (isset($adsPosition[0])) {
$paramsM = new JParameter( $adsPosition[0]->params );
if (isset($adsPosition[0]->module) && $adsPosition[0]->module ==
'mod_phoca_google_adsense' && isset($adsPosition[0]->params)) {
$adsense_code = $paramsM->get( 'adsense_code','');
$ip_block_list = $paramsM->get( 'ip_block_list','');
$alternate_content = $paramsM->get( 'alternate_content',''
);
$module_css_style = $paramsM->get( 'module_css_style','');
$ip_array = explode( ';', $ip_block_list );
$ipa = 1;//display
foreach ($ip_array as $value){
if ($_SERVER["REMOTE_ADDR"] == trim($value)) {
$ipa = 0;
}
}
if ($module_css_style) {
$adsOutput .= '<div style="'.$module_css_style.'">';
}
if ($ipa == 1){
$adsOutput .= $adsense_code;
} else {
$adsOutput .= $alternate_content;
}
if ($module_css_style) {
$adsOutput .= '</div>';
}
}
}
$this->assignRef( 'adsoutput', $adsOutput );
// PHOCA ADS EDIT - - - - - - - - - -
3.
find
components/com_phocagallery/views/detail/tmpl/default.php
before if ($this->tmpl['detailbuttons'] == 1){),
paste the following code
Code: Select all
?>
<tr>
<td colspan="6" align="center"><?php echo $this->adsoutput; ?>
</td>
</tr>
?>
But still no adsense is displayed.
Detail View Settings --> Detail Window --> is set to No Pop Up Via Phoca Gallery backnend parametres
Am i doing something wrong ?