Cyberdweller Posted October 14, 2008 Share Posted October 14, 2008 Hey all. Love the product, but is there a way to hook the google adsense module into the footer so that the ads appear on every page and not just the home page? I tried this, but the ad module doesn't appear.Thanks Link to comment Share on other sites More sharing options...
purplywurply Posted August 30, 2009 Share Posted August 30, 2009 I can't believe nobody can solve this question in nearly a year!! Come on - How do we do it? Link to comment Share on other sites More sharing options...
artjunky Posted August 30, 2009 Share Posted August 30, 2009 I don't know which module it is, but if you add the footer hook to the module file, then it should work. function hookFooter($params) { //copy data from the other hook here } in the install function at the top of the page you would add -$this->registerHook(footer);Then uninstall and re-install the module to register the hook in the footer of the page. Link to comment Share on other sites More sharing options...
purplywurply Posted August 30, 2009 Share Posted August 30, 2009 OK - I think that makes sense (i'm very green when it comes to editing code and nearly broke my shop just now.)Does anyone know which module this footer hook needs to go in? Link to comment Share on other sites More sharing options...
artjunky Posted August 30, 2009 Share Posted August 30, 2009 I'm sorry, I was under the understanding that you have an Adsense module? If you don't, what I said won't really work, as I was inferring to copy/paste code from the other hook in the module.If you just want to add your code simply, you can go to your theme folder and paste your adsense code into the file called footer.tpl.to make your own little module. make a folder called adfooter. Now a file called adfooter.php <?php class adfooter extends Module { function __construct() { $this->name = 'adfooter'; $this->version = '0.1.0'; $this->tab = 'Ads'; parent::__construct(); $this->displayName = $this->l('Simple Ad Footer Module'); $this->description = $this->l('I use this to put Adsense in my Footer'); } function install() { if (!parent::install()) {return false;} return $this->registerHook('footer'); } public function hookFooter($params) { return $this->display(__FILE__, 'adfooter.tpl'); } } ?> Now we will make a template file called adfooter.tpl. You will put your adsense code into this file.put adfooter.php and adfooter.tpl into your adfooter folder and then upload to the modules folder in your shop and install. If you need to add css for a little formatting, you can just add it to the .tpl file, or link to it from the .tpl file. I don't think you are allowed to format Adsense, though, so the most you might use it for is to center it. 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