This is a discussion on Changing Boxes within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; From the OSCdox Guide, in Exercise 4 Boxes: Adding New Boxes, it says: Finally, edit the file /catalog/includes/boxes/test.php to look ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| From the OSCdox Guide, in Exercise 4 Boxes: Adding New Boxes, it says: Quote:
Code: <?php
$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_IMAGES, '', '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);
?>
Thx |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| If you look at the top category for that line of documentation, it is for MS2, not MS2-MAX. The code you have on your site is MS2-MAX code. Big difference. The MS2 docs are not old, but they are for a different build of oscommerce. The MS2-MAX docs are in progress. To explain a bit more about your code above, look in the /templates and /templates/content directories. That is where the HTML is. It has been moved out of the core PHP files and into template files for easier editing. Also, compare the differences in the code. Just paste the variables from the old format into the new format. They are not that different. That stuff actually looks like a mistake in the docs. I will have to fix that
__________________ Michael Sasek osCMax Developer
|
|
#3
| ||||
| ||||
| I am having a huge issue msasek, maybe you could help i wish to place another link in the information box which points to my forums URL the files im editing are /BOXES/INFORMATION.PHP which looked like this: $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 and i changed to this: $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 '<a href="'http:\/\/www.unabridgedbooks.com/forum/, '', 'NONSSL') . '"> ' . BOX_INFORMATION_FORUMS . '</a>';//link to forums added I also edited the english.php file from this: // information box text in includes/boxes/information.php define('BOX_HEADING_INFORMATION', 'Information'); define('BOX_INFORMATION_PRIVACY', 'Privacy Notice'); define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use'); define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns'); define('BOX_INFORMATION_CONTACT', 'Contact Us'); To this : // information box text in includes/boxes/information.php define('BOX_HEADING_INFORMATION', 'Information'); define('BOX_INFORMATION_PRIVACY', 'Privacy Notice'); define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use'); define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns'); define('BOX_INFORMATION_CONTACT', 'Contact Us'); define('BOX_INFORMATION_FORUMS', 'Forums'); Am i going about this all the wrong way?? Cliff... |
|
#4
| ||||
| ||||
| For adding new boxes and links, see this tutorial: http://oscdox.com/modules.php?op=mod...gNewBoxesToMax If all you want to do is add an external link to your page, you could do it by just adding the actual link and text instead of making a new define for it. So your code would look like this in information.php: Code: '<a href="http://yourforums.com">Forums</a><br>' .
__________________ Michael Sasek osCMax Developer
|
|
#5
| ||||
| ||||
| this code doesnt work, first if you dont escape the two forward slashes, it turns the rest orange which in dreamweaver means escaped and there fore not read. using the code as you have supplied doesnt work check www.unabridgedbooks.com/catalog and you'll see it doesnt even show up in the box. This is my code: $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 '<a href="http://www.unabridgedbooks.com/forum/">Forums</a><br>' .//link to forums added Is it not correct? please check URL. Cliff,,,
__________________ Clifton Murphy CEO/CTO Hyperactive Inc. osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists! |
|
#6
| ||||
| ||||
| Works fine for me... You have not properly coded the php. You have to change the postition of the ; to the last line of the array. I assumed that you knew basic php. Sorry. My link is correct, you just did not add it correctly.
__________________ Michael Sasek osCMax Developer
|
|
#7
| |||
| |||
| Quote:
$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><br>' . //ICW ORDER TOTAL CREDIT CLASS/GV '<a href="http://www.unabridgedbooks.com/forum/">Forums</a><br>'; //link to forums added U had some spaces that were not correct and a ";" in the wrong place and also a "." where the ";" should be. |
|
#8
| ||||
| ||||
| to be honest i respect your work so much i thought you were infallible, i didnt even bother to look at syntax. when you said heres the code, that was good enough for me lol Cliff... |
|
#9
| ||||
| ||||
| and nope, dont know PHP very well, I am using this software to learn, mostly why. Plus i bought the books. shouldnt be long as i am smarter than a box of rocks. Cliff... |
|
#10
| ||||
| ||||
| regardless it is interesting to note that when i add this link to the top of the array, it works fine. but if added to the bottom of the array, and moving the semi-colon to the last line, it causes a parse error. WAIT, i need a period at the end of the line i moved the semi-colon from right? See i can learn PHP.....WOOOOT |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| change boxes background color now have double boxes | ANNIE11 | osCMax v1.7 General Mods Discussion | 0 | 08-22-2005 08:16 PM |
| Changing Boxes | dallibab | osCMax v1.7 Discussion | 1 | 08-16-2004 08:07 PM |
| boxes and CSS | moisea | osCommerce 2.2 Modification Help | 6 | 01-08-2004 06:59 AM |
| Changing around info boxes...couple questions | stick00 | osCMax v1.7 Discussion | 2 | 11-01-2003 11:05 PM |
| Help on boxes | noppie | osCommerce 2.2 Modification Help | 2 | 07-21-2003 09:15 PM |