Forums / General Questions / disable footer for secure ssl pages

disable footer for secure ssl pages

Locked

Views: 3,123

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
14 Oct 2008, 4:19 AM
#1
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

disable footer for secure ssl pages

As the title says, I'm trying to disable the entire footer for secure https pages. So far what I've tried alot of different things I thought would work and right now I'm still working with

<?php if ($request_type == 'SSL') { $flag_disable_footer = true; } else { $flag_disable_footer = false; } ?>

Obviously this is not right as it is not working. Can anyone point me in the right direction?

14 Oct 2008, 4:50 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: disable footer for secure ssl pages

That should be the right logic. Maybe you've put it in the wrong place?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Oct 2008, 4:56 AM
#3
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

Dr Byte,

I put the code at the start of the tpl_footer.php in the common folder of my override directory as follows:

<?php
/**
 * Common Template - tpl_footer.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_footer.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_footer = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_footer.php 3183 2006-03-14 07:58:59Z birdbrain $
 */
require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
?>
<?php 
if ($request_type == 'SSL') {
$flag_disable_footer = true;
} 
else {
$flag_disable_footer = false;
}
?> 
<!--bof-navigation display -->
14 Oct 2008, 6:36 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: disable footer for secure ssl pages

If that's all that's in your file, try putting it above the "require" statement ... otherwise it's of no effect.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Oct 2008, 11:32 PM
#5
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

Hey DrByte, thanks again but this did not work for me. I tried placing the code above the initial php tags, down just above the require statements with and without the php tags and a few other ways. I'm not sure what else to try honestly, it either shows on both or doesn't show on both. This is what I'm currently working with but no go.

<?php
/**
 * Common Template - tpl_footer.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_footer.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_footer = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_footer.php 3183 2006-03-14 07:58:59Z birdbrain $
 */
<?php
if ($request_type == 'SSL') {
$flag_disable_footer = true;
} 
else {
$flag_disable_footer = false;
}
?>
require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
?>

<?php
if (!$flag_disable_footer) {
?>

<!--bof-navigation display -->
<div id="navSuppWrapper">
<div id="navSupp">
<ul>
<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<li><?php require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li>
<?php } ?>
</ul>
</div>
</div>
<!--eof-navigation display -->

<!--bof-banner #5 display -->
<?php
  if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerFive" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?>
<!--eof-banner #5 display -->

<!--bof- site copyright display -->
<div id="siteinfoLegal" class="legalCopyright"><?php echo FOOTER_TEXT_BODY; ?></div>
<!--eof- site copyright display -->

<?php
} // flag_disable_footer
?>
24 Oct 2008, 8:36 PM
#6
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

DrB or anyone some help please?

25 Oct 2008, 12:01 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: disable footer for secure ssl pages

You're very close. The code you posted above contains syntax errors because you're opening <?php tags while already inside an open <?php tag. Maybe you just need to remove the <?php and ?> that you wrapped around that code you added?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Feb 2009, 9:34 PM
#8
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

I still need help with this if anyone has any ideas? DrB's last idea did not work either so I guess my code is wrong.

24 Feb 2009, 10:27 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: disable footer for secure ssl pages

What do you mean "DrB's last idea did not work either"?
What exactly have you changed?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Feb 2009, 9:37 PM
#10
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

I tried removing the extra php tags, but still the code did not work.

25 Feb 2009, 10:22 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: disable footer for secure ssl pages

Care to post your code?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Feb 2009, 11:06 PM
#12
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

if ($request_type == 'SSL') {
$flag_disable_footer = true;
}
else {
$flag_disable_footer = false;
}

25 Feb 2009, 11:32 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: disable footer for secure ssl pages

Well ... strictly speaking, there's nothing wrong syntactically with the tiny snippet you posted.
So, provided the variables used are appropriate for the scope of the code being run and the placement of that snippet is appropriate, one would expect it to run without errors.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Feb 2009, 7:00 AM
#14
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

DrByte:

Well ... strictly speaking, there's nothing wrong syntactically with the tiny snippet you posted.
So, provided the variables used are appropriate for the scope of the code being run and the placement of that snippet is appropriate, one would expect it to run without errors.

I can't seem to figure out how to get it to work. Can you give me an example of what you mean by variables, and what would be the correct location? It seems that no matter where I put the code in my override of the footer.tpl that it either adds texts to the footer or prevents the footer from displaying at all. If there is another way to disable the footer for secure pages I would appreciate the help.

26 Feb 2009, 8:11 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: disable footer for secure ssl pages

This is a copy of the tpl_footer.php file from a fresh install of v1.3.8a, customized to disable footer output only on SSL pages. Alterations highlighted in red:```

<?php /** * Common Template - tpl_footer.php * * this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * make a directory /templates/my_template/privacy<br /> * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_footer.php<br /> * to override the global settings and turn off the footer un-comment the following line:<br /> * <br /> * $flag_disable_footer = true;<br /> * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_footer.php 4821 2006-10-23 10:54:15Z drbyte $ */ [B]if ($request_type == 'SSL') { $flag_disable_footer = true; } else { $flag_disable_footer = false; } [/B]require(DIR_WS_MODULES . zen_get_module_directory('footer.php')); ?> <?php if (!isset($flag_disable_footer) || !$flag_disable_footer) { ?> <!--bof-navigation display --> <div id="navSuppWrapper"> <div id="navSupp"> <ul> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> <?php if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?> <li><?php require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li> <?php } ?> </ul> </div> </div> <!--eof-navigation display --> <!--bof-ip address display --> <?php if (SHOW_FOOTER_IP == '1') { ?> <div id="siteinfoIP"><?php echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div> <?php } ?> <!--eof-ip address display --> <!--bof-banner #5 display --> <?php if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerFive" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!--eof-banner #5 display --> <!--bof- site copyright display --> <div id="siteinfoLegal" class="legalCopyright"><?php echo FOOTER_TEXT_BODY; ?></div> <!--eof- site copyright display --> <?php } // flag_disable_footer ?>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Feb 2009, 7:13 PM
#16
pjgscrap avatar

pjgscrap

New Zenner

Join Date:
Aug 2008
Posts:
40
Plugin Contributions:
0

Re: disable footer for secure ssl pages

Thanks DrByte. I had tried that a few times and never got it working, but looking back over my footer I found I had some stuff below the last part

<?php } // flag_disable_footer ?>

so I moved it above and all is good. I appreciate your help.

12 Mar 2009, 3:06 AM
#17
speedcreed avatar

speedcreed

New Zenner

Join Date:
Dec 2008
Posts:
85
Plugin Contributions:
0

Re: disable footer for secure ssl pages

DrByte. You Sir are a genius! I posted this same question a couple of days ago (elsewhere), after not having any luck finding the solution in other posts. After 2 days of not getting any replies to my query, I was VERY happy to have finally found your solution here (and will reference it at my other posts for others who are pulling their hair out. Just wanted to say thanks.

Now if I could only start making some sales (5 months now- supplies/funds lowering), I could afford to contribute monetarily to Zen Cart Development.

Thanks, once more for your efforts.

Tony

"What good is it for a man to gain the whole world, yet forfeit his soul?" Mark 8:36
https://www.speedcreed.com ~ Christian Gifts, Art, and more ~