Guest Posted December 30, 2004 Posted December 30, 2004 Ok, so as you can see on the site... www.winksonline.com There is code in the login box where other words should be. Here is the contribution I added http://www.oscommerce.com/community/contri...earch,login+box When it came to this instruction I really didnt know where to put it.. it wasnt very descriptive. heres the instructions search for "greeting_string" catalog/includes/functions/general.php just below that function add the following code: // Return a loginbox infobox customer greeting top function tep_box_greeting_top() { global $customer_id, $customer_first_name; if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { $greeting_box_top_string = sprintf(BOX_GREETING_TOP_PERSONAL, $customer_first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL')); } else { $greeting_box_top_string = sprintf(BOX_GREETING_TOP_GUEST, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); } return $greeting_box_top_string; } //// // Return a loginbox infobox customer greeting bottom function tep_box_greeting_bottom() { global $customer_id, $customer_first_name; if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { $greeting_box_bottom_string = sprintf(BOX_GREETING_BOTTOM_PERSONAL, $customer_first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL')); } else { $greeting_box_bottom_string = sprintf(BOX_GREETING_BOTTOM_GUEST, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); } return $greeting_box_bottom_string; } So heres where I stuck it.. //// // Return a customer greeting function tep_customer_greeting() { global $customer_id, $customer_first_name; if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { $greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW)); } else { $greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); } return $greeting_string; } [COLOR=red]// Return a loginbox infobox customer greeting top function tep_box_greeting_top() { global $customer_id, $customer_first_name; if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { $greeting_box_top_string = sprintf(BOX_GREETING_TOP_PERSONAL, $customer_first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL')); } else { $greeting_box_top_string = sprintf(BOX_GREETING_TOP_GUEST, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); } return $greeting_box_top_string; } //// // Return a loginbox infobox customer greeting bottom function tep_box_greeting_bottom() { global $customer_id, $customer_first_name; if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { $greeting_box_bottom_string = sprintf(BOX_GREETING_BOTTOM_PERSONAL, $customer_first_name, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL')); } else { $greeting_box_bottom_string = sprintf(BOX_GREETING_BOTTOM_GUEST, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); } return $greeting_box_bottom_string; }][/COLOR] //// //! Send email (text/html) using MIME // This is the central mail function. The SMTP Server should be configured Any help would be GREAT thanks in advance Chris
Jack_mcs Posted December 30, 2004 Posted December 30, 2004 Usually when you see something displayed like that (BOX_GREETING_TOP_GUEST), it means the item has not been defined. Look in includes/languages/english.php and see if it is there. Same with the others although they may be defined elsewhere. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted December 30, 2004 Posted December 30, 2004 that should all be in this file /catalog/includes/languages/english/loginbox.php
Guest Posted December 30, 2004 Posted December 30, 2004 <?php /* WebMakers.com Added: loginbox.php Originally written by: Aubrey Kilian <[email protected]> Re-written by Linda McGrath [email protected] http://www.thewebmakerscorner.com osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('BOX_GREETING_TOP_GUEST', 'Welcome <span class="greetUser">Guest!</span><br><br>'); define('BOX_GREETING_TOP_PERSONAL', 'Welcome back...<br><span class="greetUser">%s!</span><br><br>'); define('BOX_LOGINBOX_HEADING', 'Login Here'); define('BOX_LOGINBOX_EMAIL', 'E-Mail address:'); define('BOX_LOGINBOX_PASSWORD', 'Password:'); define('BOX_LOGINBOX_NEW', '<span class="greetUser">Not registered yet?</span><br><a href="' . FILENAME_CREATE_ACCOUNT . '"><span class="smallText">Click here to<br>create an account</span></a>'); define('BOX_LOGINBOX_FORGOT_PASSWORD', '<a href="' . FILENAME_PASSWORD_FORGOTTEN . '"><i>(forgotten?)</i></a>'); define('IMAGE_BUTTON_LOGIN', 'Login'); define('BOX_HEADING_LOGIN_BOX_MY_ACCOUNT','My Account Info'); define('LOGIN_BOX_ACCOUNT_EDIT','Edit Account Info.'); define('LOGIN_BOX_ACCOUNT_HISTORY','Account History'); define('LOGIN_BOX_ADDRESS_BOOK','My Address Book'); define('LOGIN_BOX_PRODUCT_NOTIFICATIONS','Product Notifications'); define('LOGIN_BOX_MY_ACCOUNT','General Information'); define('LOGIN_BOX_LOGOFF','<b>Log Off</b>'); ?>
Jack_mcs Posted December 30, 2004 Posted December 30, 2004 Try posting the code for the inforbox. The links may not be set up correctly. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted December 30, 2004 Posted December 30, 2004 cat/includes/loginbox <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 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') . '"><b>' . LOGIN_BOX_LOGOFF . '</b></a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- my_account_info_eof //--> <?php } } ?> cat/includes/boxes/loginbox <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 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') . '"><b>' . LOGIN_BOX_LOGOFF . '</b></a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- my_account_info_eof //--> <?php } } ?> I think its the first thing i posted.. the file is supposed to be posted somewhere in genera.php after the greeting string, but i dont know where that is (refer to the 4th post in this thread)
Guest Posted December 30, 2004 Posted December 30, 2004 found it, its always the simplest mistakes.. i totally skipped over this one piece of script
Recommended Posts
Archived
This topic is now archived and is closed to further replies.