Ciao,
Per creare un box la procedura è la seguente:
1) con il seguente codice:
Codice: Seleziona tutto
<object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="MsgrObj" width="0" height="0"></object>
<a href="#" onclick="MsgrObj.AddContact( 0, 'xxx@hotmail.it' ); return false;">Aggiungi xxx alla tua contact list</a>
<br>
<a href="#" onclick="MsgrObj.InstantMessage( 'xxx@hotmail.it' ); return false;">Manda un messaggio a xxx</a>
crei un file nominandolo come vuoi ad esempio "prova.php" e lo inserisci nella catella del linguaggio.
2) nella cartella box fai una copia del file information.php e lo modifichi in questo modo:
Codice: Seleziona tutto
<?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_[b]PROVA[/b]);
new infoBoxHeading($info_box_contents, false, false);
$informationString = "";
$sql=mysql_query('SELECT information_id, languages_id, info_title FROM ' . TABLE_[b]PROVA[/b] .' WHERE visible=\'1\' and languages_id ='.$languages_id.' ORDER BY v_order')
or die(mysql_error());
while($row=mysql_fetch_array($sql)):
$filename_[b]prova[/b] = tep_href_link(FILENAME_[b]PROVA[/b], 'info_id=' . $row['information_id']);
$[b]prova[/b]String .= tep_draw_separator('pixel_trans.gif', '05', '12') . '<a href="' . $filename_[b]prova[/b] . '">' . tep_image(DIR_WS_ICONS . 'information_box_arrow.gif', $row['info_title'], '', '', '') . tep_draw_separator('pixel_trans.gif', '05', '12') . $row['info_title'] . '</a><br>';
endwhile;
$info_box_contents = array();
$info_box_contents[] = array('text' => $[b]prova[/b]String .
tep_draw_separator('pixel_trans.gif', '05', '12') . '<a href="' . tep_href_link(FILENAME_[b]PROVA[/b]) . '">' . tep_image(DIR_WS_ICONS . 'information_box_arrow.gif', BOX_LISTINI_[b]PROVA[/b], '', '', 'align=absbottom') . tep_draw_separator('pixel_trans.gif', '05', '12') . BOX_LISTINI_[b]PROVA[/b] . '</a>');
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- information_eof //-->
3) Ora devi copiare e modificare il file information.php che trovi in catalogo in questo modo e rinominandolo prova.php:
Codice: Seleziona tutto
<?php
/*
$Id: assistenza.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_[b]PROVA[/b]);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_[b]PROVA[/b]));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="maincont_tb">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top" class="maincont_left_td"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0" class="leftbar_tb">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo TEXT_INFORMATION; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<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">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top" class="maincont_right_td"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0" class="rightbar_tb">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
4) Ora devi inserire i define in catalog/includes/filename.php come segue:
5) Ora devi inserire i define in catalog/includes/database_table.php come segue:
6) e ora esegui questo file sql sul tuo database ricordandoti di modificare la parola
PROVA con la parola che tu hai dato.
drop table if exists prova;
create table prova (
information_id tinyint(3) unsigned not null auto_increment,
visible enum('1','0') default '1' not null ,
v_order tinyint(3) unsigned default '0' not null ,
info_title varchar(255) not null ,
description text not null ,
languages_id int(11) default '0' not null ,
PRIMARY KEY (information_id)
);
7) ora o nel file column_right o column_left inserisci il richiamo del box in questo modo:
E ora controlla il risultato sul tuo sito. Io in questo modo ho inserito nel mio sito i box aggiuntivi.
Spero di esserti stata d'aiuto.
Ciao Simona