Assailant Posted February 26, 2004 Share Posted February 26, 2004 hey im having trouble installing the footer graphic on my loginbox infobox, i used the mod and they dont have one for a loginbox so you have to do it manually. this is the code to install the footer i just dont know where to put it. </TD> </TR> <TR> <TD COLSPAN=3> <IMG SRC="images/boxes/table_footer1.gif" WIDTH=173 HEIGHT=20></TD> </TR> </TABLE> </td> </tr> this is the code for the loginbox <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License IMPORTANT NOTE: This script is not part of the official osC distribution but an add-on contributed to the osC community. Please read the README and INSTALL documents that are provided with this file for further information and installation notes. loginbox.php - Version 1.0 This puts a login request in a box with a login button. If already logged in, will not show anything. Modified to utilize SSL to bypass Security Alert */ // 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> <TABLE WIDTH=140 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD COLSPAN=3> <IMG SRC="images/boxes/account.gif" WIDTH=145 HEIGHT=22></TD> </TR> <?php //$info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => BOX_LOGINBOX_HEADING ); //new infoBoxHeading($info_box_contents, false, false); $loginboxcontent = " <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <form name=\"login\" method=\"post\" action=\"" . tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . "\"> <tr> <td align=\"center\" class=\"main\"> " . BOX_LOGINBOX_EMAIL . " </td> </tr> <tr> <td align=\"center\" class=\"main\"> <input type=\"text\" name=\"email_address\" maxlength=\"96\" size=\"20\" value=\"\"> </td> </tr> <tr> <td align=\"center\" class=\"main\"> " . BOX_LOGINBOX_PASSWORD . " " . BOX_LOGINBOX_FORGOT_PASSWORD . " </td> </tr> <tr> <td align=\"center\" class=\"main\"> <input type=\"password\" name=\"password\" maxlength=\"40\" size=\"20\" value=\"\" </td> </tr> <tr> <td class=\"main\" align=\"center\"> " . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN, 'SSL') . " </td> </tr> </form> <tr> <td align=\"center\" class=\"main\"> " . BOX_LOGINBOX_NEW . " </td> </tr> </table> "; $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' => 'center', 'text' => BOX_HEADING_LOGIN_BOX_MY_ACCOUNT ); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_EDIT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . 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') . '">' . LOGIN_BOX_LOGOFF . '</a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- my_account_info_eof //--> <?php } } ?> i know it goes somewhere at the end but everywhere in try it doesnt work. Link to comment Share on other sites More sharing options...
Assailant Posted February 26, 2004 Author Share Posted February 26, 2004 in case you need to see an example of it working on the categories box here it is <?php /* $Id: categories.php,v 1.21 2002/07/03 09:48:06 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ function tep_show_category($counter) { global $foo, $categories_string, $id; for ($a=0; $a<$foo[$counter]['level']; $a++) { $categories_string .= " "; } $categories_string .= '<a href="'; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $foo[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">'; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '<b>'; } // display category name $categories_string .= $foo[$counter]['name']; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '</b>'; } if (tep_has_category_subcategories($counter)) { $categories_string .= '->'; } $categories_string .= '</a>'; if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br>'; if ($foo[$counter]['next_id']) { tep_show_category($foo[$counter]['next_id']); } } ?> <!-- categories //--> <!-- This is where you will include you custom box header, left column and open up your Cell for your center column Make sure you leave the first 2 tags in here "<tr> and <td>" they maintain the control over your entire page. If you remove these tags all of you info will be shifted below you categories box on your pages. If you dont Believe me, try it....lol. //--> <tr> <td> <TABLE WIDTH=140 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD COLSPAN=3> <IMG SRC="images/boxes/table_categories.gif" WIDTH=140 HEIGHT=22></TD> </TR> <TR> <td> <?php $categories_string = ''; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { $new_path .= $value; unset($prev_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); while ($row = tep_db_fetch_array($categories_query)) { $foo[$row['categories_id']] = array( 'name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } if ($category_check != 0) { $foo[$last_id]['next_id'] = $foo[$value]['next_id']; $foo[$value]['next_id'] = $first_id; } $new_path .= '_'; } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $categories_string ); new infoBox($info_box_contents); ?> <!-- This is where you will close your center cell and include your right side of your box and then finally close out your custom box. Be sure and leave the "</td> and </tr>" tags. they ensure the sanctity of your overall page layout. //--> </TD> </TR> <TR> <TD COLSPAN=3> <IMG SRC="images/boxes/table_footer1.gif" WIDTH=140 HEIGHT=10></TD> </TR> </TABLE> </td> </tr> <!-- categories_eof //--> and if you're unsure what im referring to, the website is www.basketdelite.com, the infobox graphics Link to comment Share on other sites More sharing options...
Assailant Posted February 26, 2004 Author Share Posted February 26, 2004 its a simple html change, cant figure it out, I have been sitting here for hours, anybody know what im doing wrong? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.