modeller Posted December 4, 2007 Posted December 4, 2007 How to change New Products background color seperate from other infobox ? when i change background to red all infobox are red. it possible? if i want to change only Products box or other box backround to other color? the way is make seperate .css file ? or if do you know any best way to change it plese advise .. thaks :thumbsup: ps.I use STS.
photofxplus Posted December 4, 2007 Posted December 4, 2007 How to change New Products background color seperate from other infobox ? Speaking just of the 'New Products' box, you could go to page 'catalog/includes/modules/new_products.php' then look towards the bottom: $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . On the line that states: 'params' => 'class="smallText" width="33%" valign="top"', try adding a background color such as: 'params' => 'class="smallText" width="33%" valign="top" bgcolor="#003572"', Lloyd
modeller Posted December 4, 2007 Author Posted December 4, 2007 thanks alot photofxplus . i have one question. now i put Currencies and Languages infobox on the top of page and I want to remove bg,text,round, everything ,,,,,, yes i want it show only Flag and Currencies popup menu.
photofxplus Posted December 5, 2007 Posted December 5, 2007 On the column_right or left pages you can remove any box by commenting them out such as on column_right.php I have commented out the languages box: // include(DIR_WS_BOXES . 'languages.php'); include(DIR_WS_BOXES . 'currencies.php'); To comment out a larger portion use /* ----- */ such as: /* if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } */ This comments out the 'Tell a friend' box Lloyd
modeller Posted December 6, 2007 Author Posted December 6, 2007 i modify column_right.php already but i think it not work :huh: see this pic may be it dosn't work because STS ?
modeller Posted December 6, 2007 Author Posted December 6, 2007 i just want to remove infobox header and background.
photofxplus Posted December 6, 2007 Posted December 6, 2007 The header tag and background are added by the class 'catalog/includes/classes/boxes.php'. To change these two boxes, Currencies and Languages you would need to edit that class. This would change all boxes that use the class. The other way you can do it and just affect these two boxes is to format the table data yourself on each respective page - 'catalog/includes/boxes/currencies.php' and 'catalog/includes/boxes/languages.php' and not call the class. Lloyd
photofxplus Posted December 6, 2007 Posted December 6, 2007 Here is an example of what you need to do using the 'catalog/includes/boxes/languages.php' page, then you can format the box by remove the header table entirely and changing <td> fonts or colors by removing class: <?php /* $Id: languages.php,v 1.15 2003/06/09 22:10:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- languages //--> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Languages</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> <tr> <td align="center" class="boxText"> <?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } $languages_string = ''; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> '; } echo $languages_string; ?> </td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> </table> </td> </tr> </table> </td> </tr> <!-- languages_eof //--> Lloyd
photofxplus Posted December 6, 2007 Posted December 6, 2007 This would be the code for the currencies box without calling the class. <?php /* $Id: currencies.php,v 1.16 2003/02/12 20:27:31 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (isset($currencies) && is_object($currencies)) { ?> <!-- currencies //--> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td height="14" class="infoBoxHeading"> <img src="images/infobox/corner_right_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Currencies</td> <td height="14" class="infoBoxHeading" nowrap> <img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> <tr> <td align="center" class="boxText"> <?php reset($currencies->currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) { $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'), 'align' => 'center', 'text' => tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id()); echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') ?> </form> </td> </tr> <tr> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> </table> </td> </tr> </table> </td> </tr> <!-- currencies_eof //--> <?php } ?> Lloyd
bkellum Posted December 6, 2007 Posted December 6, 2007 i just want to remove infobox header and background. STS Thread: http://www.oscommerce.com/forums/index.php?sho...p;#entry1162742 Please use it to ask questions related to STS. STS allows you to do all of the above without having to edit the PHP files directly. If you want to remove or add a graphic for a specific infobox, just create an infobox template and leave out the header or add in the graphic. Done! In order to add a background color (or image) to the New Products for Month infobox, you would need to create an infobox template for that as well and just add it in. Simple. Done. All of photofxplus comments above apply to shops that are not using STS. Good solid advice for those who are not using STS but a long way around to get it done when you are using STS already. :thumbsup: I am only leaving this post so as the comments above would not confuse other STS users and lead them astray. Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
photofxplus Posted December 6, 2007 Posted December 6, 2007 STS allows you to do all of the above without having to edit the PHP files directly. Thank you, I am just hearing about this STS.. Is it a contribution applicable to osC 2.2 or does it come with the newer version of osC? If the new version - than prior contributions will not work.. Lloyd
bkellum Posted December 6, 2007 Posted December 6, 2007 Thank you,I am just hearing about this STS.. Is it a contribution applicable to osC 2.2 or does it come with the newer version of osC? If the new version - than prior contributions will not work.. Hello Lloyd, STS works with any of the older MS2 versions of osCommerce as well as the most recent release (Online Merchant RC1). As of today, it will not work for osCommerce MS3 since that version of osCommerce has been rebuilt from the ground up and is still in the testing stage. :thumbsup: Also, just FYI: If you are a good PHP developer then it does not mean you need to shy away from STS. The Simple Template System allows you to add PHP code directly to the template (since version 3 and updated in version 4) to set the stage for all kinds of creativity. Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
photofxplus Posted December 6, 2007 Posted December 6, 2007 It sounds interesting. Right now I have just installed HeaderTags_V_2.6.3 and am playing with it. I noticed that your contrib can be used with it. I read this part: This contribution also allows you to use WebMakers.com's Header Tag Controller contribution without having to modify every file on the system. Just copy the Header Tag Controller's include files into place and STS will automatically add them to all pages without having to modify every PHP script in the /catalog/ directory. I had to maually insert code for the HeaderTags because of prior editing to the files. After reading the above, are you saying that your contrib will insert the neccessary code in place without any other changes to the original file? The part that says: Just copy the Header Tag Controller's include files into place Seems like it would change original files.. Even though, sounds like a great contribution and would make the task of editing a lot easier. I will take a look at it. Thanks. Lloyd
bkellum Posted December 6, 2007 Posted December 6, 2007 It sounds interesting. Right now I have just installed HeaderTags_V_2.6.3 and am playing with it. I noticed that your contrib can be used with it. I read this part: This contribution also allows you to use WebMakers.com's Header Tag Controller contribution without having to modify every file on the system. Just copy the Header Tag Controller's include files into place and STS will automatically add them to all pages without having to modify every PHP script in the /catalog/ directory. I had to maually insert code for the HeaderTags because of prior editing to the files. After reading the above, are you saying that your contrib will insert the neccessary code in place without any other changes to the original file? The part that says: Just copy the Header Tag Controller's include files into place Seems like it would change original files.. Even though, sounds like a great contribution and would make the task of editing a lot easier. I will take a look at it. Thanks. Lloyd,Take a peek at my step by step installation guide on installing HTC with STSv4x (link in my signature below). Basically, you upload all of the admin changes as well as each "new" HTC file. What you do not do is make any changes to the stock osC files on the include side. I have a separate HTC module (new to HTC and only works with STS) that is installed that will automatically add the HTC info to all of the include side pages, saving you the hassle of doing each one indepentently. If you do add the changes on the include files, you will get "already declared - can not redeclare" error messages becuase of the duplications. :thumbsup: Now all of that sounds tough but my step by step guide really makes the installation a breeze. Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
jmarshalljr Posted December 6, 2007 Posted December 6, 2007 I have a question that maybe someone can help me with. I am using a template (not STS).It is the osCDark contribute. I want to change the background color of the "required" text field input boxes or the text color. The required text input boxes have a white background and the text is also white. You can not see what your typing. I have gone through the stylesheet but can not find the code for these boxes. If someone can point me to the file where I can change this code I would greatly appreciate it.
bkellum Posted December 6, 2007 Posted December 6, 2007 I have a question that maybe someone can help me with. I am using a template (not STS).It is the osCDark contribute. I want to change the background color of the "required" text field input boxes or the text color. The required text input boxes have a white background and the text is also white. You can not see what your typing. I have gone through the stylesheet but can not find the code for these boxes. If someone can point me to the file where I can change this code I would greatly appreciate it. James, I use a handy tool called the Internet Explorer Developer Tool Bar. One of the cool tools available is the one that will show what CSS class is responsible for your text, table, etc. Here is the link (it is a free download from Microsoft): http://www.microsoft.com/downloads/details...;displaylang=en Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
photofxplus Posted December 6, 2007 Posted December 6, 2007 Check out this page 'catalog/includes/functions/html_output.php' I believe the function would be function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) The variable $parameters would be where you would send the txtbx bckgrd color. Lloyd
jmarshalljr Posted December 6, 2007 Posted December 6, 2007 Check out this page 'catalog/includes/functions/html_output.php' I believe the function would be function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) The variable $parameters would be where you would send the txtbx bckgrd color. Thanks for that... never would have found this. One more question.. do I add the bckgrd code between the ' ' ?
photofxplus Posted December 6, 2007 Posted December 6, 2007 You would add the background code when and wherever you call the function (On the page where the txtbx is going to be). Such as: tep_draw_input_field('txtbx_name', 'txtbx_value', 'style="background-color: #0000FF"') Lloyd
Recommended Posts
Archived
This topic is now archived and is closed to further replies.