PDA

View Full Version : Newbie with MS2-Max. Need the help of some Pro's!



Anonymous
04-19-2004, 08:24 PM
Greetings all-

I've been lurking for the past couple of weeks so I thought I'd sign up and see what I could see. :wink:

I recently downloaded and installed MS2-Max from AAbox and installed it no problem. I've been getting everything set up and configured to my liking. It's been hard but at the same time it's been very rewarding.

Anyways, I've got a question for some of you Pro's out there that I'm hoping you could help me answer. I've been looking at these two contributions and I was wondering if they would require much modification to the code of MS2-Max to install. I'm not too proficient with PHP, but I'd really like to have Graphical Headers on my info boxes. Here are the two contributions:

http://www.oscommerce.com/community/contributions,867/
http://www.oscommerce.com/community/contributions,1379

I really don't know what the difference is between the two other than one seems to be a bit newer.

Can graphical headers on info boxes be done thru BTS? Sorry if these questions seem a bit silly, all the acronyms have me a tad confused.

It seems like you all have a great community here!

Thanks in advance,

-Engelwood

Engelwood
04-19-2004, 08:25 PM
Thought I had signed in! :oops:

jpf
04-20-2004, 09:23 AM
The second one may be a newer verion of the first one... Should not be too hard to add (use a tool like Beyond Compare to merge it into your site)

You could also look at:

http://www.oscommerce.com/community/contributions,1702
Graphical Boxes [Contribution]

This contribution wraps a graphical box around all infoboxes, content boxes and product listing boxes as well as the 37 other files that display content in the center column.

Thus no need to create a graphical text heading for each box....

Engelwood
04-20-2004, 12:51 PM
Thanks for the quick reply!
I decided to try this one out: http://www.oscommerce.com/community/contributions,1379

I downloaded Beyond Compare (It's a nice little program btw) and decided to get my hands wet...

I thought I'd start off by just changing the Information box. I changed the code to what I thought would work, but for some reason I'm getting this problem (see attached image). The image is showing up fine, but there is also the Original header box right below it!

Here is my code


<?php
/*
$Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
?>
<!-- information //-->
<tr>
<td>
<table width="124" border="0" cellspacing="0" cellpadding="1" class="infoboxborder">
<tr>
<td> <table width=100% border=0 cellpadding=0 cellspacing=0 class="infoBoxContents">
<tr>
<td colspan=3 width="124"> <img src="images/boxes/table_information.jpg"></td>
</tr>
<tr>
<td>
<?php
$boxHeading = BOX_HEADING_INFORMATION;
$boxContent = '<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_CATALOG_PRODUCTS_WITH_IMAGE S, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV

require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
?>
</td>
</tr>
</table>
</td>
</tr>
</table>

</td>
</tr>
<!-- information_eof //-->

jpf
04-21-2004, 08:10 AM
Try this:

<?php
/*
$Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
?>
<!-- information //-->
<?php
// changed line below for GRAPHIC HEADER MOD - change pic name for each box
$boxHeading = 'images/boxes/information.jpg';

// removed for GRAPHIC HEADER mod
// $boxHeading = BOX_HEADING_INFORMATION;
// $corner_left = 'square';
// $corner_right = 'square';

$boxContent = '<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_CATALOG_PRODUCTS_WITH_IMAGE S, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV

require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
?>
<!-- information_eof //-->

And in box.tpl.php
change to:

<?php /* infobox template */ ?>
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<!-- BEGIN GRAPHIC HEADER - Removed 3 lines - Add one
<td height="14" class="infoBoxHeading"><img src="images/infobox/<?php switch ($corner_left) { case 'square': echo 'corner_right_left.gif'; break; case 'rounded': echo 'corner_left.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>
<td width="100%" height="14" class="infoBoxHeading"><?php echo $boxHeading; ?></td>
<td height="14" class="infoBoxHeading" nowrap><?php echo $boxLink; ?><img src="images/<?php switch ($corner_right) { case 'square': echo 'pixel_trans.gif'; break; case 'rounded': echo 'infobox/corner_right.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>\
end of remove -->
<td width="100%" height="14" class="infoBoxHeading"><img src="<?php echo $boxHeading ?>" border="0" alt="" height="14">
<!-- End of graphic headers -->
</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 class="boxText"<?php echo $boxContent_attributes; ?>><?php echo $boxContent; ?></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>

Note: if you do this then ALL boxes must have a graphic header!

Engelwood
04-23-2004, 02:11 PM
Excellent! Thanks a bunch for all your help!!

One question tho, For the infoboxes like "whats new" or "Shopping cart, is there anyway to make it so that you can click on them and they will bring you to the corresponding page?