Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I created a new infobox


sgreiner

Recommended Posts

I have installed a new calendar script I purchased.

I tested the script by placing the following code in catalog/index.php

require ("calendar.php");

 

This shows the calendar perfectly.

 

I want to place it in a new infobox on the left column. Can someone help me with the code? I have the new infobox on the left column. I can get the calendar to show there, but it is not in the infobox. The empty info box is drawn under the calendar.

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Link to comment
Share on other sites

I have installed a new calendar script I purchased.

I tested the script by placing the following code in catalog/index.php

require ("calendar.php");

 

This shows the calendar perfectly.

 

I want to place it in a new infobox on the left column. Can someone help me with the code? I have the new infobox on the left column. I can get the calendar to show there, but it is not in the infobox. The empty info box is drawn under the calendar.

 

How did you create your infobox? Did you include then needed files to populate it with info? If not you need to do so. Look in your includes/boxes/ folder and you will see your different boxes. Take the information.php file coyp and rename it calender.php and modify it for your needs. You will also need to do the same thing with the corresponding language file.

 

I would check out the knowledge base I believe there is instructions on how to do this.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

I copied boxes/information.php and renamed it event_calendar.php and I also did the same for the language file. The info box gets created fine. The problem is modifying the code inside of it to show the calander.

If I place the following code on my index.php file, the calendar shows just fine:

<?php require ("escal/showCalendar.php"); ?>

 

I have tried various ways of putting this code in the infobox, but all I get are errors.

The following code is my event_calendar.php. Could you tell me how to modify this, so the calendar shows up inside the box. The way it shows up now is the header, the calendar, then an empty info 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_EVENT_CALENDAR);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array(require ("escal/showCalendar.php"));
          
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- information_eof //-->

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Link to comment
Share on other sites

Well I have gotten a little farther. All I need is for someone to look at this code and tell me why I have a very small gap between the info box header and the actual infobox and I will be done with this modification.

<?php
/*
 $Id: showCalendar.php

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- showCalendar //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_EVENT_CALENDAR);

 new infoBoxHeading($info_box_contents, true, false);?>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2"><br>              
               <td align="center"><?php require ("escal/showCalendar.php"); ?></td>              
           </table><br></td>
         </tr>
       </table></td>
     </tr>
           </td>
         </tr>
<!-- showCalendar_eof //-->

Visit my site to see the gap I am referring to. It is the top box on the left-column.

My Webpage

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Link to comment
Share on other sites

My guess.... remove the line break

(It's hard to test it without your calendar.php file)

 

Change

<td><table border="0" width="100%" cellspacing="0" cellpadding="2"><br>

To

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

 

HTH and let us know if it works,

Robert

Link to comment
Share on other sites

The line braeks were there to put space somewhere else. Either way, this is not the code I need to be using anyway. If someone could look at my site, you will see the calendar is in place.

What I need is for someone to help me get the calendar to appear inside of a infobox. Please look at the following code and show me where I keep going wrong. This code is based off of information.php. I just can't get the require command to work with the array? Not sure where I am going wrong. Help.

<?php

/*

$Id: event_calendar.php

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- event_calendar //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_EVENT_CALENDAR);

 

new infoBoxHeading($info_box_contents, false, false);

 

require ("escal/showCalendar.php");

 

?>

</td>

</tr>

<!-- event_calendar_eof //-->

CODE]

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...