adsense,client=pub-xxxxxxxxxxxxxxxx,display=468*60_as,color_border=edeed5,color_bg=edeed5,color_link=0000CC,color_url=008000,color_text=000000)}{MODULE} /** * @return array */ function module_adsense_info() { return [ 'name' => tra('Google AdSense'), 'description' => tra('Displays a text/image Google AdSense advertisement. This module should be updated to support new Google code.'), 'prefs' => [], 'params' => [ 'ad_channel' => [ 'name' => tra('ad_channel'), 'description' => tra('Advertisement channel, as optionally provided by Google.'), 'filter' => 'striptags', ], 'client' => [ 'name' => tra('client'), 'description' => tra('As provided by Google. Format: "pub-xxxxxxxxxxxxxxxx"'), 'required' => true, ], 'display' => [ 'name' => tra('display'), 'description' => tra('Global banner format as provided by Google. For example: "display=468*60_as"'), 'filter' => 'striptags', 'required' => true, ], 'color_bg' => [ 'name' => tra('color_bg'), 'description' => tra('Background color, as optionally provided by Google.'), 'filter' => 'striptags', ], 'color_border' => [ 'name' => tra('color_border'), 'description' => tra('Border color, as optionally provided by Google.'), 'filter' => 'striptags', ], 'color_link' => [ 'name' => tra('color_link'), 'description' => tra('Link color, as optionally provided by Google.'), 'filter' => 'striptags', ], 'color_text' => [ 'name' => tra('color_text'), 'description' => tra('Text color, as optionally provided by Google.'), 'filter' => 'striptags', ], 'color_url' => [ 'name' => tra('color_url'), 'description' => tra('URL color, as optionally provided by Google.'), 'filter' => 'striptags', ] ], ]; } /** * @param $mod_reference * @param $module_params */ function module_adsense($mod_reference, $module_params) { $smarty = TikiLib::lib('smarty'); $smarty->assign( [ 'ad_channel' => $module_params['ad_channel'], 'client' => $module_params['client'], 'display' => $module_params['display'], 'color_bg' => $module_params['color_bg'], 'color_border' => $module_params['color_border'], 'color_link' => $module_params['color_link'], 'color_text' => $module_params['color_text'], 'color_url' => $module_params['color_url'] ] ); }