241 Posted May 18, 2004 Share Posted May 18, 2004 This will add a shadow below the infoboxes to give a page lift effect. Shadowbox Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
safoo Posted May 18, 2004 Share Posted May 18, 2004 Seems very simple to install and a very easy way to change the look of the columns. Do you have a live example by any chance? Still, this will be a very useful contribution. Quote Link to comment Share on other sites More sharing options...
241 Posted May 18, 2004 Author Share Posted May 18, 2004 It is a very simple install, however I have had many requests for it so thought that if it were a contribution it would be available to whom ever required it. Link to demo: Development Site Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Paycheck Posted May 19, 2004 Share Posted May 19, 2004 Good contrib. I haven't looked deeply in the code yet, but I believe that you've made some HTML errors in the infobox files? should be (remember I've only had a very quick glance): <tr> ?<td> ?<?php snipped lots of php stuff ?> ?</td> </tr> <tr> ?<td>the shadow image</td> </tr> whereas you have: <tr> ?<td> <?php snipped a load of php code ?> ?<tr> ? ?<td>the shadow image</td> ?</tr> </td> </tr> In effect you have your shadow image in the wrong place within the code... Like I say, this is from 1st impression, I will look again deeply tomorrow as it's now past my bedtime ! Sorry I must dissagree with this post, the code works fine however there is one thing that was left out of the code which makes a big difference. You need to change all of your surrounding table cellpadding properties to "0" The problem is that the image will not but seamlessly against the table bottom row if it is not done. For example here is my information_box.php <!-- information //--> <tr> <td> <table width="144" border="0" cellspacing="0" cellpadding="0" class="infoboxborder"> <tr> <td> <table width=100% border=0 cellpadding=0 cellspacing=0 class="infoBoxContents"> <tr> <td colspan=3 width="100%"> <img src="images/boxes/table_information.gif"></td> </tr> <tr> <td> <?php $info_box_contents = array(); //$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); //new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_AUCTION_LISTINGS) . '">' . BOX_INFORMATION_AUCTION_LISTINGS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//ICW ORDER TOTAL CREDIT CLASS/GV new infoBox($info_box_contents); ?> </td> </tr> </table> </td> </tr> </table> <TR> <TD> <IMG SRC="images/info_box_left_shadow.gif" WIDTH=100% HEIGHT=13></TD> </TR> </td> </tr> <!-- information_eof //--> Notice that I have changed the cellpadding in the first table brackets to "0" All works fine now. Make sure you are not changing it in the inside tables Quote Always remember, we need patience, guidance and most of all understanding. My Contributions Link to comment Share on other sites More sharing options...
241 Posted May 19, 2004 Author Share Posted May 19, 2004 I have posted a replacement contribution with the table tags in the correct place and with the section on the tables needing to be 0 John Your code is not default code so will be different, I have to make my contributions to the default code. Gary I realised the error as soon as you prompted me to it and made the corrections to the contribution. ****Contribution Update**** Rereleased the contribution as version 1.00 Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
241 Posted May 19, 2004 Author Share Posted May 19, 2004 ****Update*** there is an additional change required to the catalog/index.php Locate this code <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i=0, $n=sizeof($category_links); $i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { // do nothing, go through the loop } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); break; // we've found the deepest category the customer is in } } and change to this <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i=0, $n=sizeof($category_links); $i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { // do nothing, go through the loop } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); break; // we've found the deepest category the customer is in } } The change is this <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> to "0" This is to allow the categories section products new box shadow to work properly Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted May 24, 2004 Share Posted May 24, 2004 I have made the change but I still end up with space between the bottom of the box. <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> Quote Link to comment Share on other sites More sharing options...
241 Posted May 24, 2004 Author Share Posted May 24, 2004 You are trying to change just the one box where as the codes and contribution are for all boxes as the code stands it uses the fact of removing the cellpadding for the left column not for the code that you have posted. If you follow the install instructions then you have no issue. <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> it is this cellpadding that gets changed from 2 to 0 There is nowhere in the install instructions that tells you to change the codes that you have changed Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Paycheck Posted May 24, 2004 Share Posted May 24, 2004 ****Update*** there is an additional change required to the catalog/index.php Locate this code <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> ? ? ? ? ?<tr> ? ? ? ? ? ?<td><table border="0" width="100%" cellspacing="0" cellpadding="2"> ? ? ? ? ? ? ?<tr> <?php ? ?if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category ? ? ?$category_links = array_reverse($cPath_array); ? ? ?for($i=0, $n=sizeof($category_links); $i<$n; $i++) { ? ? ? ?$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); ? ? ? ?$categories = tep_db_fetch_array($categories_query); ? ? ? ?if ($categories['total'] < 1) { ? ? ? ? ?// do nothing, go through the loop ? ? ? ?} else { ? ? ? ? ?$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); ? ? ? ? ?break; // we've found the deepest category the customer is in ? ? ? ?} ? ? ?} and change to this <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> ? ? ? ? ?<tr> ? ? ? ? ? ?<td><table border="0" width="100%" cellspacing="0" cellpadding="2"> ? ? ? ? ? ? ?<tr> <?php ? ?if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category ? ? ?$category_links = array_reverse($cPath_array); ? ? ?for($i=0, $n=sizeof($category_links); $i<$n; $i++) { ? ? ? ?$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); ? ? ? ?$categories = tep_db_fetch_array($categories_query); ? ? ? ?if ($categories['total'] < 1) { ? ? ? ? ?// do nothing, go through the loop ? ? ? ?} else { ? ? ? ? ?$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); ? ? ? ? ?break; // we've found the deepest category the customer is in ? ? ? ?} ? ? ?} The change is this <td><table border="0" width="100%" cellspacing="0" cellpadding="2">? ? ? ? ? <tr> ? ? ? ? ? ? <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> ? ? ? ? ? ? ? <tr> to "0" This is to allow the categories section products new box shadow to work properly This worked partially but when I actually open a product for viewing or to add to cart this is when it happens to me. I have seemed to get through all but this part. Clicking on a category, or a sub cat it appears to be OK until I get into the actual products. Nay suggestions? JM Quote Always remember, we need patience, guidance and most of all understanding. My Contributions Link to comment Share on other sites More sharing options...
241 Posted May 24, 2004 Author Share Posted May 24, 2004 do you have a link to the issue Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted May 25, 2004 Share Posted May 25, 2004 Well I corrected my mistake as instructed. It works great on the front page but I am back to where there is space between the infobox and the shadow on any subsequent pages but the top level. www.needlepointbackbay.com Quote Link to comment Share on other sites More sharing options...
241 Posted May 25, 2004 Author Share Posted May 25, 2004 (edited) tcjay RTFM You have not followed the instructions. <_< From The Install Instructions Repeat stage one for all files, this can be achieved by using a find and replace. If you miss out on a file then the shadow will appear to drop on that page leaving a gap between the shadow and the box :D Followed by the instructions below this bit of text :rolleyes: Paycheck Do you have a link to the issue? Edited May 25, 2004 by 241 Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Paycheck Posted May 25, 2004 Share Posted May 25, 2004 OK I will try it one more time. I thought I had already made it all the way through stage one for the second time in all files. Maybe your right, I missed a file. JM Quote Always remember, we need patience, guidance and most of all understanding. My Contributions Link to comment Share on other sites More sharing options...
tayl1684 Posted June 14, 2004 Share Posted June 14, 2004 Hi I have tried to use this to add an image to the bottom of the infoboxes but get absolutely nothing, no parse errors, no image, nothing. I have made the following changes to add header images: /includes/laguages/english.php define('BOX_HEADING_CATEGORIES', '<img src="images/infobox/Categories.gif">'); And this to remove the side images /includes/classes/boxes.php // new to remove corner left etc $info_box_contents = array(); // next line added to remove left and right corner graphics $info_box_contents[] = array(array('params' => 'with="100%" height="14" class="infoBoxHeading"', 'text' => $contents[0]['text'])); // $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"', // 'text' => $left_corner), // array('params' => 'width="100%" height="14" class="infoBoxHeading"', // 'text' => $contents[0]['text']), // array('params' => 'height="14" class="infoBoxHeading" nowrap', // 'text' => $right_corner)); // old side bit on info boxes // $info_box_contents = array(); // $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"', // 'text' => $left_corner), // array('params' => 'width="100%" height="14" class="infoBoxHeading"', // 'text' => $contents[0]['text']), // array('params' => 'height="14" class="infoBoxHeading" nowrap', // 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } Other than that I have STS installed but no other mods etc that should affect this. Can anyone point me in the right direction for this cos I am stumped. Any help appreciated, Ian Quote Link to comment Share on other sites More sharing options...
241 Posted June 22, 2004 Author Share Posted June 22, 2004 tayl1684 I do not understand what this lot has to do with this contribution, are you using this contribution Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
tayl1684 Posted June 30, 2004 Share Posted June 30, 2004 Sorry its STS thats stoping the shaddow image from appearing. So your right its nothing to do with this contribution. Just Ignore me. Ian Quote Link to comment Share on other sites More sharing options...
241 Posted June 30, 2004 Author Share Posted June 30, 2004 Sorry its STS thats stoping the shaddow image from appearing. So your right its nothing to do with this contribution. Just Ignore me. Ian did you remember to alter the boxes template file Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
tayl1684 Posted June 30, 2004 Share Posted June 30, 2004 Err no! Your going to have to help me there mate cos I 've not seen a box template file! Just the main html template (which you cant use as some boxes arent there under certain situations and this will always display the graphic) and start capure and user code files etc. Cheers Ian Quote Link to comment Share on other sites More sharing options...
241 Posted June 30, 2004 Author Share Posted June 30, 2004 Err no! Your going to have to help me there mate cos I 've not seen a box template file! Just the main html template (which you cant use as some boxes arent there under certain situations and this will always display the graphic) and start capure and user code files etc. Cheers Ian Sorry but I do not have STS I have one setup of BTS and it was to this that I was thinking in regards to boxes template. You would need to ask in the STS support thread, however a change in where the code is placed can prevent the image from showing if the box is not showing, this would mean placing the codes within an array. Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
tayl1684 Posted June 30, 2004 Share Posted June 30, 2004 Will have a crack at that. Thanks for taking the time to reply. Ian Quote Link to comment Share on other sites More sharing options...
martinmacca Posted July 17, 2004 Share Posted July 17, 2004 The width of my righ hand column on certain pages seems to get stretched out of proporsion. Its fine when the user is logged in, but when browsing whilst logged off the right column gets stretched by about 20 pixels. Ive tried to manually set the width of the category boxes from </td></tr> <TR> <TD> <IMG SRC="images/info_box_right_shadow.gif" WIDTH=100% HEIGHT=13></TD> </TR> to </td></tr> <TR> <TD> <IMG SRC="images/info_box_right_shadow.gif" WIDTH=147 HEIGHT=13></TD> </TR> If i refresh the page when it happens the column gets resized back to normal but as soon as i click a link it happens again. Ive deleted the internet files on my comp incase it was using old pages but still no luck. Ive used find and replace to check i havnt missed a file but to no luck. Any ideas? Quote Link to comment Share on other sites More sharing options...
241 Posted July 18, 2004 Author Share Posted July 18, 2004 The width of my righ hand column on certain pages seems to get stretched out of proporsion. Its fine when the user is logged in, but when browsing whilst logged off the right column gets stretched by about 20 pixels. Ive tried to manually set the width of the category boxes from can you supply a link to the issue as this may not be the shadobox but the normal expansion of boxes due to the content of the box, which can expand due to image or text content. Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2004 Share Posted August 12, 2004 Ok, I checked out the whole post & I'm not sure what I would have missed... Got a suggestion? Quote Link to comment Share on other sites More sharing options...
241 Posted August 12, 2004 Author Share Posted August 12, 2004 Ok, I checked out the whole post & I'm not sure what I would have missed... Got a suggestion? It helps if you post what the issue is so that others can follow what you are on. RTFM Repeat stage one for all files, this can be achieved by using a find and replace. If you miss out on a file then the shadow will appear to drop on that page leaving a gap between the shadow and the box Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2004 Share Posted August 12, 2004 Ok, I was re-installing the contribution & I noticed that in the login.php file, I have noticed that this little bit of code isn't colored like the other code that is active.... (make any sense?) <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> Part of the code seems to be commented out as well.... What happened? I know that I had added the amazon log-in after I had added the shadow box, so I think that's why I'm getting the spacing.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.