Forums / General Questions / Moving the login bar from the top to the side

Moving the login bar from the top to the side

Locked

Views: 1,393

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
24 Jul 2007, 7:00 AM
#1
ncd avatar

ncd

New Zenner

Join Date:
Jun 2007
Posts:
43
Plugin Contributions:
0

Moving the login bar from the top to the side

I want to move the login bar from the top to the side... how to do it?

I was inquiring about it earlier, and this is what Glenn had suggested:

gjh42:

You can move the code from /includes/templates/your_template/common/tpl_header.php to another file, to display wherever you want. You may need to tweak the presentation to get a good vertical display. I put mine in the top of my left sidebar - check it out for an idea.

I tried this, but one look at the tpl_header file and I understood that I would not be able to do it myself.

I basically want it to be a sidebox, rather than a bar. Is there a sidebox already made that does these functions?

In the file there are the tags:

<div id="headerWrapper">
<div id="navMainWrapper">
<div id="navMain">
```Do these have to be changed to something else or is it nowhere in this league? My PHP skills are limited to sendmail and form related stuff.

I am using a modified version of the mostlygrey template. (Changing that was easy enough, just changing the palates in the CSS file.)
24 Jul 2007, 8:52 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Moving the login bar from the top to the side

No but there is a blank sidebox add-in module. It would be very straightforward to cut the code that you want from your tpl_header file and paste it where shown in blank sidebox template.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

27 Jul 2007, 6:43 AM
#3
ncd avatar

ncd

New Zenner

Join Date:
Jun 2007
Posts:
43
Plugin Contributions:
0

Re: Moving the login bar from the top to the side

kuroi:

No but there is a blank sidebox add-in module. It would be very straightforward to cut the code that you want from your tpl_header file and paste it where shown in blank sidebox template.

OK, I tried doing that, but failed miserably. All I ended up with was this as the only thing on my page:

Parse error: parse error, unexpected T_STRING in ...../zen/includes/templates/mostlyblack/sideboxes/tpl_blank_sidebox.php on line **20
**
Maybe someone can guide me through this. This is what I did:

From tpl_header I copied

<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?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>
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>

<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>
<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>

and pasted it in the tpl_black_sidebox after the following

<?php
/**
 * blank sidebox - allows a blank sidebox to be added to your site
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
 */

  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

  // Replace the text and HTML tags between the apostophes on lines 19 and 20.
  $content .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>';
  $content .= '

and put a ?> at the end.

I put all the blank sidebox where the instruction file told to do so according to my template.
.....But, this did not apparently work.:oops:

Any ideas/suggestions/rants?

27 Jul 2007, 8:40 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Moving the login bar from the top to the side

It looks as though you you cut from the middle of am unordered list, and swept up some stuff at the end that shouldn't have been there. The code would also seen a bit more polishing than my earlier answer suggested.

Rather than trying to explain all the detail, I have turned this into a download which you can get from here with a support thread here.

Feel free to compare, or just use, as you prefer. :smile:

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

27 Jul 2007, 9:11 AM
#5
ncd avatar

ncd

New Zenner

Join Date:
Jun 2007
Posts:
43
Plugin Contributions:
0

Re: Moving the login bar from the top to the side

AWESOME!!!

Your DA BOMB man! w00t! o_O :D

I will compare it though to see what I did wrong with my n00b php knowledge. :)

5 Apr 2009, 4:35 AM
#6
elmstreet avatar

elmstreet

New Zenner

Join Date:
Nov 2008
Posts:
5
Plugin Contributions:
0

Re: Moving the login bar from the top to the side

Hi kuroi,

Got a quick question about the categories navigation bar on the top.

How would I be able to add :: and a space on either side of the categories?

The categories to me are to close together, need some spacing in between.

Any ideas would be helpfull.

I'm using the mostlygrey template.

Thanks in advance.