Forums / Templates, Stylesheets, Page Layout / Editing "login" page

Editing "login" page

Locked

Started by shalesey on 12 May 2010, 8:31 AM · Views: 920

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
12 May 2010, 8:31 AM
#1
shalesey avatar

shalesey

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Editing "login" page

Guys

You may or may not have seen my endless threads on the login page.

I've eventually got the banners working as I wanted. However I still have a small problem where I am not happy with my current solution.

I want a field inserting into the login page where I can place formatted text. Similar to the homepage.

The company where I am developing the site is insisting they need the information to be displayed to anybody coming to the site. Some of the people who come to the site will need to see the information but will not be authorized to have an account.

http://213.175.207.14/~archipel/shop

As you can see I have crudely formatted the information into the login page. However I would prefer a free text field just below the welcome please sign in messgae.

I'm a bit of a noob when it comes to php and this may be something very simple and easy to do, however I have no clue.

Please, please, please, can someone help me before I go mad. :unsure: :blink: :blush:

12 May 2010, 9:05 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Editing "login" page

You have a bigger problem than that...

When I follow your URL. my anti-virus shows the following:
**
Reported Web Forgery!

This web page at 213.175.207.14 has been reported as a web forgery and has been blocked based on your security preferences.

Web forgeries are designed to trick you into revealing personal or financial information by imitating sources you may trust.

Entering any information on this web page may result in identity theft or other fraud.**

20 years a Zencart User

12 May 2010, 9:22 AM
#3
shalesey avatar

shalesey

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Re: Editing "login" page

schoolboy:

You have a bigger problem than that...

When I follow your URL. my anti-virus shows the following:
**
Reported Web Forgery!

This web page at 213.175.207.14 has been reported as a web forgery and has been blocked based on your security preferences.

Web forgeries are designed to trick you into revealing personal or financial information by imitating sources you may trust.

Entering any information on this web page may result in identity theft or other fraud.**

See this thread http://www.zen-cart.com/forum/showthread.php?t=154827

Also check this to prove the site is not malicious http://www.google.com/safebrowsing/diagnostic?site=213.175.207.14/~archipel/shop/

Try using IE, it works.

13 May 2010, 10:19 AM
#4
shalesey avatar

shalesey

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Re: Editing "login" page

If anyone is interested I managed to work this one out myself.

It seems that there is a corresponding template PHP file for every language file.

To add a new editable field I found the login template file below : -

/root(catalog)/includes/templates/template_default/templates/tpl_login_default.php

To add a new field I edited the top of the page here : -

<?php
/**
 * Page Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2007 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_login_default.php 5926 2007-02-28 18:15:39Z drbyte $
 */
?>
<div class="centerColumn" id="loginDefault">

<h1 id="loginDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if ($messageStack->size('login') > 0) echo $messageStack->output('login'); ?>


<?php if ( USE_SPLIT_LOGIN_MODE == 'True' || $ec_button_enabled) { ?>
<!--BOF PPEC split login- DO NOT REMOVE-->
<fieldset class="floatingBox back">
<legend><?php echo HEADING_NEW_CUSTOMER_SPLIT; ?></legend>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT ** ?>
<?php if ($ec_button_enabled) { ?>
<div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT; ?></div>

I then added one line : -

<?php echo FREE_TEXT; ?>

To give : -

<?php
/**
 * Page Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2007 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_login_default.php 5926 2007-02-28 18:15:39Z drbyte $
 */
?>
<div class="centerColumn" id="loginDefault">

<h1 id="loginDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

<?php echo FREE_TEXT; ?>

<?php if ($messageStack->size('login') > 0) echo $messageStack->output('login'); ?>


<?php if ( USE_SPLIT_LOGIN_MODE == 'True' || $ec_button_enabled) { ?>
<!--BOF PPEC split login- DO NOT REMOVE-->
<fieldset class="floatingBox back">
<legend><?php echo HEADING_NEW_CUSTOMER_SPLIT; ?></legend>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT ** ?>
<?php if ($ec_button_enabled) { ?>
<div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT; ?></div>

This adds a free text field just below "Welcome, please sign in"

To edit this field you edit the language file located in : -

/root(catalog)/includes/languages/english/login.php

Add the following line of code : -

define('FREE_TEXT','Free text here')

Which makes my file look like the following : -

<?php
/**
 * @package languageDefines
 * @copyright Copyright 2003-2007 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: login.php 6352 2007-05-20 21:05:01Z drbyte $
 */

define('NAVBAR_TITLE', 'Login');
define('HEADING_TITLE', 'Welcome, Please Sign In,');
define('FREE_TEXT', 'free text here');

define('HEADING_NEW_CUSTOMER', '<strong>' . STORE_NAME . '</strong> is a Wholesale only site, please register below.');
define('HEADING_NEW_CUSTOMER_SPLIT', 'New Customers');

Just add what ever text you like in standard html coding where "free text here" is shown.