roku Posted April 28, 2004 Posted April 28, 2004 I made a new info box and what i am tring to do is insert an image with a url outside of oscommerce into it. I have been tring with no luck now for a few days as i am a poor php writer. Could someone give me a little advice on this matter, please.
agiftcodotcom Posted April 28, 2004 Posted April 28, 2004 Create a php file with the following code, replacing your information in (img)/(lnk). Where it says "BOX_HEADING_BOXNAMEHERE" replace "BOXNAMEHERE" with your new box name. (You can open one of your other box php files, but make sure you rename it before saving or you will lose your old box) <?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> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_BOXNAMEHERE); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href=http://www.YOURLINKHERE.com target=_blank><img border="0" src=YOURIMAGEHERE></a>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Then place the named php file in catalog/includes/boxes. Then in catalog/includes/languages/english.php, place a command of define('BOX_HEADING_BOXNAMEHERE', 'Box Name Here'); neer the other define('BOX_HEADING_XXXXXXX', 'XXXXXXXX'); commands. Once again replacing "BOXNAMEHERE" and "Box Name Here" with your box names. Then in catalog/includes/column_right.php (or left) place the following command where you want the box to go. require(DIR_WS_BOXES . 'newboxfile.php'); Contributions I used : Updated 06-13-04 23:42 ---------------- Vote on My Graphis Poll
roku Posted April 28, 2004 Author Posted April 28, 2004 I got it working thanks. seems i missed on ' in my code. Thanks for the quick reply.
agiftcodotcom Posted April 28, 2004 Posted April 28, 2004 Not a problem, glad I could help :) Contributions I used : Updated 06-13-04 23:42 ---------------- Vote on My Graphis Poll
Recommended Posts
Archived
This topic is now archived and is closed to further replies.