Jump to content
Sign in to follow this  
j4tan

LoginBox Best

Recommended Posts

Hi, I am using LoginBox Best with 7Dana template.

 

Everything works perfectly except I would like to replate the BOLD LOG OFF LINK with LogOFF Button, just like when you log in.

 

So I do the following:

 

(1) created log off button.

(2) define IMAGE_BUTTON_LOGOFF in both loginbox.php and english.php

(3) in catalog/includes/boxes/loginbox.php i replace the BOLD OFF LINK with button, refer to the following codes. Problems is i can't find the reason why it doesn't log me off when i click on the button. but if change back to original setting . i.e Bold Link it works.

 

refer to my site: http://www.petsfactory.com.au

 

original bold link is:

'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '"><b>' . LOGIN_BOX_LOGOFF . '</b></a>'

 

any guru please help? Thanks. :)

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2002 osCommerce

 

Released under the GNU General Public License

 

Autologin added by DJ Downey http://www.liquidgfx.com

 

*/

 

// WebMakers.com Added: Do not show if on login or create account

if ( (!strstr($_SERVER['PHP_SELF'],'login.php')) and (!strstr($_SERVER['PHP_SELF'],'create_account.php')) and !tep_session_is_registered('customer_id') ) {

?>

<!-- loginbox //-->

<?php

if (!tep_session_is_registered('customer_id')){

 

?>

 

 

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_LOGINBOX_HEADING

);

new infoBoxHeading($info_box_contents, $newtheme, false, false);

$loginboxcontent = "

<form name=\"login\" method=\"post\" action=\"" . tep_href_link(FILENAME_LOGIN, 'action=process') . "\">

<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">

<tr>

<td align=\"center\" class=\"infoBoxContents\">

" . tep_box_greeting_top() . "

</td>

</tr>

<tr>

<td align=\"center\" class=\"infoBoxContents\">

" . BOX_LOGINBOX_EMAIL . "

</td>

</tr>

<tr>

<td align=\"center\" class=\"infoBoxContents\">

<input type=\"text\" name=\"email_address\" maxlength=\"96\" size=\"20\" value=\"\">

</td>

</tr>

<tr>

<td align=\"center\" class=\"infoBoxContents\">

" . BOX_LOGINBOX_PASSWORD . " <A HREF=\"" . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'NONSSL') . "\">" . BOX_LOGINBOX_FORGOT_PASSWORD . "</A>

</td>

</tr>

<tr>

<td align=\"center\" class=\"infoBoxContents\">

<input type=\"password\" name=\"password\" maxlength=\"40\" size=\"20\" value=\"\">

</td>

</tr>

<tr>

<td class=\"infoBoxContents\" align=\"center\">

" . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) . "

 

</td>

</tr>

<tr>

<td align=\"center\" class=\"infoBoxContents\">

" . BOX_LOGINBOX_NEW . "

</td>

</tr>

</table>

</form>

";

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => $loginboxcontent

);

new infoBox($info_box_contents);

?>

</td>

</tr>

<?php

} else {

// If you want to display anything when the user IS logged in, put it

// in here... Possibly a "You are logged in as :" box or something.

}

?>

<!-- loginbox_eof //-->

<?php

// WebMakers.com Added: My Account Info Box

} else {

if (tep_session_is_registered('customer_id')) {

?>

 

<!-- my_account_info //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_HEADING_LOGIN_BOX_MY_ACCOUNT

);

new infoBoxHeading($info_box_contents, $newtheme, false, false);

$loginboxcontent = "

<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">

<tr>

<td align=\"center\" class=\"loginBoxGreeting\">

" . tep_box_greeting_top() . "

</td>

</tr>

<tr>

</table>

";

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => $loginboxcontent .

'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'NONSSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'NONSSL') . '">' . LOGIN_BOX_ACCOUNT_EDIT . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'NONSSL') . '">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL') . '">' . LOGIN_BOX_ADDRESS_BOOK . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') . '">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' . tep_image_submit('button_logoff.gif', IMAGE_BUTTON_LOGOFF) . '</a>'

);

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- my_account_info_eof //-->

 

<?php

}

}

?>

Edited by j4tan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×