Originally Posted by
CybaGirl
WebKat just as I suspected you need to wrap the addthis code into SSL tags as Internet Explorer is currently throwing back errors and it might scare some of your customers away. I had the same issue when I use to use that addthis addon at the top of my pages.
This is what you need to do.
Code:
<?php if ($request_type == 'NONSSL') { ?>
YOUR CODE WRAPPED BETWEEN THESE TAGS
<?php } ?>
Ok, I'm confused. I can't quite figure out how to add what you're saying. I can't have <?php ?> codes inside other ones, can I? So I'd have to split it up somehow, right? I tried several different ways and all of them broke it. I also figured out that removing the empty lines in the php code broke it, so I left them in. Currently this code works in Chrome 18.blahblah, IE 9, and Firefox 11.0 without giving me any errors:
Code:
<?php
/**
* Side Box Template
*
* @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_whos_online.php 2982 2006-02-07 07:56:41Z birdbrain $
*/
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
for ($i=0; $i<sizeof($whos_online); $i++) {
$content .= $whos_online[$i];
}
$content .= '<br /><hr style="width:85%;"><span class="center"><strong>Share This</strong><br/><hr style="width:85%;"></span>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&pubid=ra-4f7ba393385f001d" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_preferred_5"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f7ba393385f001d"></script>
<!-- AddThis Button END -->';
$content .= '</div>';
$content .= '';
?>
Are you still getting errors? If so, can you repaste my template code (all of it) with your tags inserted in the right places, since I am too php-dumb to figure it out? Heh. Thanks!
Bookmarks