Google adsense colors - NBS






 

 

Google adsense colors - NBS

View Full Version : Google adsense colors


martinxp
22-Oct-2007, 11:08 AM
Hello please help . I'm need change google adsense color per template.
I found a adsense colour mod: http://www.echophp.com/forums/ad-color-mod-vt190.html

I'm edit functions.php
$adsense_file = $phpbb_root_path . $template_path . $template_name . '/adsense.cfg';

if(@file_exists($adsense_file))
{
$adsense = array(
'google_color_border' => $row['td_color2'],
'google_color_bg' => $row['td_color2'],
'google_color_link' => $row['body_link'],
'google_color_url' => $row['body_hlink'],
'google_color_text' => $row['body_text'],
);
@include($adsense_file);
if(count($adsense))
{
$global_ads = $nbs->setting['global_ads']
$items = array('header_ads', 'first_post_ads.txt');
$search = array();
$replace = array();
for($i=0; $i<count($items); $i++)
{
if(strpos($global_ads[$items[$i]], 'google_ad_client') > 1)
{
// do replacements
if(!count($search))
{
foreach($adsense as $var => $value)
{
if(strlen($value) == 6)
{
$search[] = '/' . $var . ' = \"([0-9a-fA-F]+)\"/';
$replace[] = $var . ' = "' . $value . '"';
}
}
}
$global_ads[$items[$i]] = preg_replace($search, $replace, $global_ads[$items[$i]]);
}
}
}
}
Script not working.... i'm not php programer .... Please help mi ...

Wasuup
22-Oct-2007, 01:11 PM
That mod is for Sebflipper's script, not the NBS one. This would explain why you can't get it to work

nene94
10-Feb-2008, 03:26 PM
any script "Google adsense colors" is avabible?.. please, I need a script for this.

Thanks! :)