digitalaviator Posted July 31, 2008 Share Posted July 31, 2008 I've tried searching for answers both in the forums and the contribs section but couldn't find this answer anywhere... I need to insert a jpg graphic into my infobox... i.e. a small 100x80 sized jpg graphic that should appear below the 'contact us' link... Here's my information.php code (pretty much stock standard)... <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <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_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . BOX_CATALOG_FEATURED_PRODUCTS . '</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>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> I've tried many variations and combinations of code based off other info boxes but have yet to find anything that doesn't break or cause the graphic to display outside the boundaries of the infobox... I'd really appreciate some help and I'll add it to the contribs section once it's working... :-) Link to comment Share on other sites More sharing options...
spooks Posted July 31, 2008 Share Posted July 31, 2008 Your taking the wrong approach $border = '<table class="infoBoxPic" cellpadding="4"><tr><td>' ); $borderend = '</td></tr></table>' ; $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" ', 'text' => $border . $content . $borderend ; new infoBoxcontents; set the pic in the css Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
digitalaviator Posted August 1, 2008 Author Share Posted August 1, 2008 Your taking the wrong approach $border = '<table class="infoBoxPic" cellpadding="4"><tr><td>' ); $borderend = '</td></tr></table>' ; $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" ', 'text' => $border . $content . $borderend ; new infoBoxcontents; set the pic in the css No that is the default code, I haven't changed anything from the stock code and your reply is completely different to the question I asked... I have not taken any approach, I am asking how I can get a graphic into my information.php box... That code is the default code and nothing has been changed with it and your reply "set the pic in the css" tells me nothing... Can someone who understands the question please reply? I want to insert a jpg graphic inside the box below the contact us link... I also want to be able to at some point insert javascript code into my information.php box for my online support system... I would really appreciate it if someone can tell me how I can add a simple JPG image to the area directly blow the contact us link... Link to comment Share on other sites More sharing options...
spooks Posted August 2, 2008 Share Posted August 2, 2008 Show me just where, in the default code, that code exists!! That code works, the trouble is you don't understand the answer, and with your responce I'm not about to explain. :angry: Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted August 2, 2008 Share Posted August 2, 2008 With a little bit of searching you would have found this http://www.oscommerce.info/kb/osCommerce/C..._Area/Boxes/262 You could then modify that like so $info_box_contents[] = array('align' => 'center', 'text' => tep_image(DIR_WS_IMAGES . 'your_pic_here.gif', 'alt_text_here')); to make that a link do $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_YOUR_PAGE_HERE) . '">' .tep_image(DIR_WS_IMAGES . 'your_pic_here.gif', 'alt_text_here') . '</a>'); FYI: Sam is one of the ones who is out here a lot helping others. If you didn't understand what he was saying you should have asked him to explain it instead of giving him attitude. Link to comment Share on other sites More sharing options...
digitalaviator Posted August 3, 2008 Author Share Posted August 3, 2008 With a little bit of searching you would have found thishttp://www.oscommerce.info/kb/osCommerce/C..._Area/Boxes/262 You could then modify that like so $info_box_contents[] = array('align' => 'center', 'text' => tep_image(DIR_WS_IMAGES . 'your_pic_here.gif', 'alt_text_here')); to make that a link do $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_YOUR_PAGE_HERE) . '">' .tep_image(DIR_WS_IMAGES . 'your_pic_here.gif', 'alt_text_here') . '</a>'); FYI: Sam is one of the ones who is out here a lot helping others. If you didn't understand what he was saying you should have asked him to explain it instead of giving him attitude. You speak as if every newcomber should understand exactly what you are saying... The example looks closer but I don't have the graphic in the images directory, it's an external file and it looks like you're trying to set it as a background image? And the second example looks like you're making the image a clickable link... I need a working example <g> that will be how it shows in the main source code... Please help a newbie I am NOT a php programmer at all... I'm simply asking for help, I'm not giving attitude I'm simply saying speak english... Your taking the wrong approach $border = '<table class="infoBoxPic" cellpadding="4"><tr><td>' ); $borderend = '</td></tr></table>' ; $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" ', 'text' => $border . $content . $borderend ; new infoBoxcontents; set the pic in the css tells me nothing at all, and doesn't show me anywhere where I can define where the heck the image is, don't give me attitude!!! Second of all there was attitude in the above post in accusing me of "taking the wrong approach" when I hadn't touched one single piece of code, all I was doing was asking a simple question!!! Also I need to be able to insert javascript into the information.php for my live help, the above example doesn't show how to insert HTML code into the box which is at the heart of what I need to do... Link to comment Share on other sites More sharing options...
spooks Posted August 3, 2008 Share Posted August 3, 2008 You've been given help, trouble is you don`t understand, but you think thats everone elses fault!! Best you try doing something you can do instead. Get someone who knows to build your site for you. Bye!! :rolleyes: :rolleyes: :rolleyes: Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted August 3, 2008 Share Posted August 3, 2008 Your original quetion was how to put an image in your informations box below your contact us link. Sam showed you a way to do it using css to set the image as a background. Instead of asking for help on how to do that, you said That code is the default code and nothing has been changed with it and your reply "set the pic in the css" tells me nothing... Can someone who understands the question please reply? I call that giving attitude. I showed how to do it without css even offered up how to make it link just in case. Now all of the sudden inserting javascript is the heart of the problem??? Fine try this $info_box_contents[] = array('align' => 'center', 'text' => '<script type="text/JavaScript"><!-- your code here //-->' ); Next time if you don't understand the answer ask for an explination. Link to comment Share on other sites More sharing options...
jfkafka Posted October 13, 2010 Share Posted October 13, 2010 Anyone know how to put an infobox inside another infobox array? for instance: new infoButton($info_button_contents[$cur_row], $button_name); generates an infobox button called "Remove". Is it possible to add this infobox Remove button to an infobox array of products? This line simply adds the text not the button itself (obviously) $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => 'new infoButton($info_button_contents[$cur_row], 'Remove');'); Thanks for any help. jk Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.