MrBaseball34 Posted September 2, 2010 Share Posted September 2, 2010 We'd like to add exceptions to the positioning for the Adsense block to have it NOT show up on nay pagethat requires SSL. Reasoning behind this is that some ads may not be secure and we don't want the security dialog popping up.Is there a way to know if a certain page requires SSL?I placed an exception on order.php and history.php but there are others that the url is changed to https when you have SSL enabled.Any ideas? Link to comment Share on other sites More sharing options...
rocky Posted September 3, 2010 Share Posted September 3, 2010 Try changing the hookHome function in modules/gadsense/gadsense.php from: function hookHome($params) { $output = html_entity_decode(Configuration::get('GADSENSE_ID'), ENT_COMPAT, 'UTF-8'); return $output; } to: function hookHome($params) { global $protocol_link; $output = ''; if ($protocol_link == 'http://') $output = html_entity_decode(Configuration::get('GADSENSE_ID'), ENT_COMPAT, 'UTF-8'); return $output; } Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 3, 2010 Author Share Posted September 3, 2010 When I did that, they disappeared completely. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 3, 2010 Author Share Posted September 3, 2010 Had to rewrite it like this because $protocol_content is what we were looking for... function hookHome($params) { global $protocol_ssl; global $protocol_content; $output = ''; if ($protocol_content != $protocol_ssl) { $output = html_entity_decode(Configuration::get('GADSENSE_ID'), ENT_COMPAT, 'UTF-8'); } return $output; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now