Zen Follower
- Join Date:
- Dec 2008
- Location:
- San Fran
- Posts:
- 382
- Plugin Contributions:
- 0
Persistent header links across CMS' for seamless logged in users?
Excuse my dumb sounding title up there, I wasn't exactly sure what to call this. I'm looking to keep users logged in through various CMS's I want integrated into my site. I have separate folders for a photo and video gallery using gallery3 and mediacore.
I'm looking for a seamless look (I have this part down) and user experience (this is where I need help). I'm not a professional programmer, but it seems to me I only need the following code to hook in the logged in status of a customer:
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ORDER_STATUS, '', 'SSL'); ?>">Order Status</a></li>
<li><a href="<?php echo zen_href_link(UN_FILENAME_WISHLIST, '', 'SSL'); ?>"><?php echo UN_HEADER_TITLE_WISHLIST; ?></a></li>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<li><a class="login" href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php { ?>
<li class="last"><a class="myCart" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
(<?php
if ($_SESSION['cart']->count_contents() == '0') {
echo $_SESSION['cart']->count_contents() . " items";
}
if ($_SESSION['cart']->count_contents() == '1') {
echo $_SESSION['cart']->count_contents() . " item";
}
if ($_SESSION['cart']->count_contents() >= '2') {
echo $_SESSION['cart']->count_contents() . " items";
}
?>)</li>
<li><a class="last" href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php } } ?>
But, this code does not work in the template files for each cms within the /photos and /videos folder. Could someone explain to me why this doesn't work? Could it just be a path issue? I'm sure it's more complex, but I would greatly appreciate it if someone could explain this to me. Surely there must be a way to hook these links in? Or am I just being too optimistic?