Pagina 1 di 1

allargare template

Inviato: 08/10/2008, 4:09
da marzianinani
ciao, com'era già ovvio cerco di nuovo aiuto. Il problema odierno è l'allargamento del template, diciamo che per quanto riguarda tutte le altre pagine che non sono la home ci sono riuscito, per come si può
vedere dalle foto postate, ma la home tende a rimanere così, sono riuscito ad allargare il foglio di bg (quello bianco) mi servirebbe (come da foto con le freccine) allargare anche la grafica centrale, un
po' come si può notare dall'altra foto in cui c'è l'immagine della pagine "nuovi prodotti", ho guardato in column_left e column_right ma non c'è niente a cui si possa cambiare i valori, anche in stylesheet non ho trovato granché. Che potete dirmi?
Grazie e ciao

Re: allargare template

Inviato: 08/10/2008, 16:31
da dynamo
guarda nella costruzione delle tabelle nella index se ci sono classi da poter modificare nel file stylesheet e poi vai a guardare in catalog/includes/modules/new_products.php

Re: allargare template

Inviato: 09/10/2008, 0:31
da marzianinani
grazie per la risposta Dynamo ho fatto come mi hai detto ed in catalog/includes/modules/new_products.php c'era quello che mi serviva, come vedrai dalla foto postata la parte destra della home l'ho allargata precisamente per come volevo, ma è nato un problema, il testo non ha seguito la lunghezza dello spazio, siccome il file non è tanto lungo io te l'ho postato, sottolineando il pezzo in cui, almeno per quanto creado, si faccia riferimento al testo nel box, se puoi dimmi qualcosa. Grazie.




<?php
/*
$Id: new_products.php 1806 2008-01-11 22:48:15Z hpdl $

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

Copyright (c) 2008 osCommerce

Released under the GNU General Public License
*/
?>
<!-- new_products //-->
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

new contentBoxHeading($info_box_contents);

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, pd.products_description, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
} else {
$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, pd.products_description, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
}

$row = 0;
$col = 0;
$info_box_contents = array();



while ($new_products = tep_db_fetch_array($new_products_query)) {
?>

<? $info_box_contents[$row][$col] = array('align' => 'left',
'params' => 'class="smallText" width="33%" valign="top"',
'text' => '<table border="0" width="100%" cellspacing="0" style="border: 1px solid #999999;margin-top:10px;margin-bottom:5px;">
<tr>
<td align="center" class="smallText" width="120" valign="middle">



<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>

</td>
<td align="left" class="smallText" width="400" valign="top">

<span class="pc_pname"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></span>
<br />
<br />

<span class="pc_description">' . substr($new_products['products_description'],0, 400) .'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">[...]</a></span>
</td>
</tr>
<tr>
<td align="center" class="smallText" width="220" valign="middle">
<span class="pc_price">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) .'</span>
<br /><br />
</td>

<td align="left" class="smallText" valign="top" style="border-top:0px dashed #ff0000;">'. tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')).'
<table width="680" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding-top:1px; padding-right:1px;" ><a href="'.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']).'">'.tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS).'</a></td><td style="padding-top:1px;">'.tep_draw_hidden_field('products_id', $new_products['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_BY_NOW).'</td>
</tr>
</table></form>
</td>
</tr>
</table>

');
?>

<?
$col ++;
if ($col > 0) {
$col = 0;
$row ++;
}
}

new contentBox($info_box_contents);
?>
<!-- new_products_eof //-->

Re: allargare template

Inviato: 09/10/2008, 0:45
da marzianinani
no lascia stare, mi sono risposto, ho notato che all'inizio della riga c'era una classe, sono andato in stylesheet ho trovato la classe, gli ho aggiunto un WIDTH con la larghezza che mi serviva ed il testo si è steso, risolto quindi, grazie veramente per l'aiuto!!!!!. Ciao

Re: allargare template

Inviato: 09/10/2008, 9:09
da dynamo
meglio così :mrgreen:


PS: quando posti del codice... usa il comando code che trovi tra le opzioni... così il post non diventa chilometrico :wink:

Codice: Seleziona tutto

codice ^_^

Re: allargare template

Inviato: 09/10/2008, 15:07
da marzianinani
Ok lo farò. Ciao. Grazie.