Hi
Is there any reason why the code copied from the Newsletter panel wouldn't work if I pasted it in to the footer?
Thanks
Cheers
Richard
Newsletter code work in Footer?
Newsletter code work in Footer?
ISC Ultimate v6.1.1 - Windows 2003 Server IIS6 - PHP v5.2.13 - mySQL v5.0.51b
-
- Posts: 744
- Joined: Thu Jun 18, 2009 8:59 am
Re: Newsletter code work in Footer?
/templates/yourtemplate/panels/SideNewsletterBox.html is 'driven' by includes/display/SideNewsletterBox.php - so the footer isn't going to generate teh correct globals (only 1 actually made by the looks of it).
Copy the contents of includes/display/SideNewsletterBox.php in includes/display/Footer.php
and you should be ok
Copy the contents of includes/display/SideNewsletterBox.php in includes/display/Footer.php
Code: Select all
if (!GetConfig('ShowMailingListInvite')) {
$this->DontDisplay = true;
return;
}
$output = "";
$GLOBALS['SNIPPETS']['SideNewsletterBox'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("DefaultNewsletterSubscriptionForm");
Re: Newsletter code work in Footer?
Thanks very much, much appreciated.
Cheers
Richard
Cheers
Richard
ISC Ultimate v6.1.1 - Windows 2003 Server IIS6 - PHP v5.2.13 - mySQL v5.0.51b
Re: Newsletter code work in Footer?
I've tried this but it's not working. I've added the above line to the file "footer.php". But I'm not if I put them into the right place. Would you please advice me where to put these codes on.
Thank you.
Thank you.
-
- Posts: 744
- Joined: Thu Jun 18, 2009 8:59 am
Re: Newsletter code work in Footer?
Drop it in immediately after
and you should be up and running 
Code: Select all
public function SetPanelSettings()
{

Re: Newsletter code work in Footer?
Thank you, Tony. But it's still not working. I'm running V.6.0.14. Is there anything else I should do? What I did was putting the below code into the file "Footer.html" in my template folder (..default/Panels/Footer.html). And did just what you explained by adding the code to Footer.php in ../includes/display.
Would you please help me out? Thank you so much.
Code: Select all
%%Panel.SideNewsletterBox%%
-
- Posts: 744
- Joined: Thu Jun 18, 2009 8:59 am
Re: Newsletter code work in Footer?
Ah sorry - if you look back to the first question the OP was asking why copying the code from the SideNewsletterBox.html into Footer.html didn't work - so rather than using %%Panel.SideNewsletterBox%% in Footer.html, actually copy/paste the contents of SideNewsletterBox.html into your Footer.html wherever you want the box to appear.
Note that if you do this, there can only be 1 newsletter sign up position - i.e. not in the footer and in a side panel - as having 2 will make the JS fail on one of them, so the form won't submit correctly.
Note that if you do this, there can only be 1 newsletter sign up position - i.e. not in the footer and in a side panel - as having 2 will make the JS fail on one of them, so the form won't submit correctly.