Pagina 1 di 1

[Richiesta] Block Personalizzabili

Inviato: 23/07/2004, 8:56
da saruzzu
E' possibile creare, come sul phpnuke, dei moduli personalizzabili nei quali inserire codice Php o HTML?

E' possibile....

Inviato: 09/08/2004, 20:31
da pmol
>> nel file "includes/languages/italian.php"
ad esempio all'interno di // information box text in includes/boxes/information.php
inserire

define('BOX_INFORMATION_TEST', 'TEST');

>> nella directory "includes/languages/italian/"
inserire ad esempio
test.php

simile a questo
******
<?php
/*
$Id: shipping.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

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

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Test');
define('HEADING_TITLE', 'Test d\'inserimento html');

define('TEXT_INFORMATION', 'qui mettere html.');
?>
******

>> in includes/boxes/information.php

aggiungi

'<a href="' . tep_href_link(FILENAME_TEST) . '">' . BOX_INFORMATION_TEST . '</a>');

cosi'
******
<?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_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_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_TEST) . '">' . BOX_INFORMATION_TEST . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- information_eof //-->
******

>> in Catalag/

crea "test.php"

così
******
<?php
/*
$Id: shipping.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_TEST);

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_TEST));
?>
<!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="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- 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"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- 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'); ?>
*****

>> in includes/filenames.php

aggiungi

define('FILENAME_TEST', 'test.php');

Dovrebbe essere tutto e se non ho dimenticato nulla ora potrai aggiungere box e documento, e aggiungere o modificare.

Dove trovo ora il lavoro fatto ?

Inviato: 03/03/2005, 23:26
da maurosoft
Ho seguito il consiglio ma ora dove trovo da fare le modifiche, quale menu devo cercare ?

Inviato: 04/03/2005, 13:40
da lobotomia
fai prima a crearti un box tuo e poi includerlo :D

Certo..

Inviato: 04/03/2005, 22:43
da maurosoft
lobotomia ha scritto:fai prima a crearti un box tuo e poi includerlo :D

Ho creato un block in php con Php-Tools , ma come faccio ad inserirlo ?

Inviato: 04/03/2005, 23:09
da lobotomia
include('nomefile.php')
o
require('nomefile.php')

Grazie

Inviato: 04/03/2005, 23:53
da maurosoft
Grazie, ma da quale parte del menu amministratore posso farlo ?
Scusa, ma non sono molto pratico....

Grazie

Inviato: 05/03/2005, 0:49
da lobotomia
no, devi modificare o columnleft o columnright

columnleft o columnright

Inviato: 05/03/2005, 13:39
da maurosoft
Ma dove li trovo su oscommerce 2.2 ?

Inviato: 05/03/2005, 13:42
da lobotomia
in includes

X lobotomia

Inviato: 05/03/2005, 13:47
da maurosoft
Grazie, ora faccio delle prove...
Devo editare questi files ?

Sei mica in messenger ??

Ciao