Aide - Recherche - Membres - Calendrier
Version complète : Comment ajouter des coins arrondis au pied des boxes
Forum osCommerce-fr > Adapter OsCommerce MS2 > Design
Maximeus
Bonjour,

Comme chacun le sait, les boxes contiennent par défaut une entête avec des coins arrondis ou rectangulaires.

Je souhaiterai savoir comment faire pour mettre la même chose au pied des différentes boxes.

Qn a-t-il une idée?

Merci d'avance.
sunny80
Bonjour,

Je viens de lire ton post, comment fais tu déjà pour mettre les coins arrondis en haut des boxes ??

Merci d'avance.

Muriel
guinnessboy
Salut, une petite modif dans la classe et dans tes fichiers de box.
Dans la classe, tu recopies un infoboxheading en infoboxfooter et tu ajoutes les images qui vont bien (angles arrondis haut et bas)

Ensuite tu fais un appel supplémentaire dans le fichier box.

new infoboxheading pour l'entête
new infobox pour le contenu
new infoboxfooter pour le bas de la box

Maximeus
Merci pour ton aide.

Pour le moment tout fonctionne, j'ai dupliqué la class infoBoxHeader et l'ai renommée infoBoxFooter, ensuite j'ai renommé les images pour les coins de la box.

Parcontre, le texte (càd les liens de la box categories) s'affiche également.

Dans la classe infoBoxFooter, quelle est la ligne a supprimer pour éviter le doublon?

Salutations.
guinnessboy
Donnes le code de ta boxe ce sera plus simple
Maximeus
Voilà le code complet:
-----------------------------------------------------------------------------------------------------------------

<?php
/*
$Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

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

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

class tableBox {
var $table_border = '0';
var $table_width = '100%';
var $table_cellspacing = '0';
var $table_cellpadding = '2';
var $table_parameters = '';
var $table_row_parameters = '';
var $table_data_parameters = '';

// class constructor
function tableBox($contents, $direct_output = false) {
$tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
$tableBox_string .= '>' . "\n";

for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
$tableBox_string .= ' <tr';
if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
$tableBox_string .= '>' . "\n";

if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
$tableBox_string .= ' <td';
if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
$tableBox_string .= ' ' . $contents[$i][$x]['params'];
} elseif (tep_not_null($this->table_data_parameters)) {
$tableBox_string .= ' ' . $this->table_data_parameters;
}
$tableBox_string .= '>';
if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
$tableBox_string .= $contents[$i][$x]['text'];
if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
$tableBox_string .= '</td>' . "\n";
}
}
} else {
$tableBox_string .= ' <td';
if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
$tableBox_string .= ' ' . $contents[$i]['params'];
} elseif (tep_not_null($this->table_data_parameters)) {
$tableBox_string .= ' ' . $this->table_data_parameters;
}
$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
}

$tableBox_string .= ' </tr>' . "\n";
if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
}

$tableBox_string .= '</table>' . "\n";

if ($direct_output == true) echo $tableBox_string;

return $tableBox_string;
}
}

class infoBox extends tableBox {
function infoBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->infoBoxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
$this->table_cellpadding = '3';
$this->table_parameters = 'class="infoBoxContents"';
$info_box_contents = array();
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
'params' => 'class="boxText"',
'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
}
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
return $this->tableBox($info_box_contents);
}
}

class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/view.gif', GO) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxHeading"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxHeading" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}


class infoBoxFooter extends tableBox {
function infoBoxFooter($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left_bottom.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left_bottom.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/view.gif', GO) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right_bottom.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxFooter"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxFooter" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}


class contentBox extends tableBox {
function contentBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->contentBoxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_box_contents, true);
}

function contentBoxContents($contents) {
$this->table_cellpadding = '4';
$this->table_parameters = 'class="infoBoxContents"';
return $this->tableBox($contents);
}
}

class contentBoxHeading extends tableBox {
function contentBoxHeading($contents) {
$this->table_width = '100%';
$this->table_cellpadding = '0';

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
array('params' => 'height="14" class="infoBoxHeading" width="100%"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxHeading"',
'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

$this->tableBox($info_box_contents, true);
}
}

class errorBox extends tableBox {
function errorBox($contents) {
$this->table_data_parameters = 'class="errorBox"';
$this->tableBox($contents, true);
}
}

class productListingBox extends tableBox {
function productListingBox($contents) {
$this->table_parameters = 'class="productListing"';
$this->tableBox($contents, true);
}
}
?>

-----------------------------------------------------------------------------------------------------------------
guinnessboy
C'est dans le code de la boxe ou doit se trouver le souci, pas celui de la classe.
Maximeus
Voilà le code de la box categories.php

-----------------------------------------------------------------------------------------------------------------
<?php
/*
$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

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

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;

for ($i=0; $i<$tree[$counter]['level']; $i++) {
$categories_string .= "&nbsp;&nbsp;";
}

if (tep_has_category_subcategories($counter)) {
$left_image_plus = 'categories_plus.gif';
} else {
$left_image_plus = 'categories_fleche.gif';
}
$categories_string .= tep_image(DIR_WS_IMAGES . $left_image_plus);
$categories_string .= ' ';

$categories_string .= '<a href="';

if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '<b>';
}

// display category name
$categories_string .= $tree[$counter]['name'];

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '</b>';
}

// if (tep_has_category_subcategories($counter)) {
// $categories_string .= '-&gt;';
// }

$categories_string .= '</a>';

if (SHOW_COUNTS == 'false') {
$products_in_category = tep_count_products_in_category($counter);
if ($products_in_category > 0) {
$categories_string .= '&nbsp;(' . $products_in_category . ')';
}
}

$categories_string .= '<br>';

if ($tree[$counter]['next_id'] != false) {
tep_show_category($tree[$counter]['next_id']);
}
}
?>
<!-- categories //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

new infoBoxHeading($info_box_contents, true, true);

$categories_string = '';
$tree = array();

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
'parent' => $categories['parent_id'],
'level' => 0,
'path' => $categories['categories_id'],
'next_id' => false);

if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $categories['categories_id'];
}

$parent_id = $categories['categories_id'];

if (!isset($first_element)) {
$first_element = $categories['categories_id'];
}
}

//------------------------
if (tep_not_null($cPath)) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
unset($parent_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
if (tep_db_num_rows($categories_query)) {
$new_path .= $value;
while ($row = tep_db_fetch_array($categories_query)) {
$tree[$row['categories_id']] = array('name' => $row['categories_name'],
'parent' => $row['parent_id'],
'level' => $key+1,
'path' => $new_path . '_' . $row['categories_id'],
'next_id' => false);

if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $row['categories_id'];
}

$parent_id = $row['categories_id'];

if (!isset($first_id)) {
$first_id = $row['categories_id'];
}

$last_id = $row['categories_id'];
}
$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
$tree[$value]['next_id'] = $first_id;
$new_path .= '_';
} else {
break;
}
}
}
tep_show_category($first_element);

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

new infoBox($info_box_contents);

new infoBoxFooter($info_box_contents, true, true);
?>
</td>
</tr>
<!-- categories_eof //-->


-----------------------------------------------------------------------------------------------------------------

Salutations
guinnessboy
A chaque appel d'un élément de la boxe tu utilise cette variable.

$info_box_contents

Or quand tu appelles le footer tu n'as pas réinitialisé la valeur de $info_box_contents elle contient donc toujours la liste des catégories.

avant cela :

new infoBoxFooter($info_box_contents, true, true);
Essayes quelque chose comme cela


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

Je suis pas persuadé de la syntaxe mais c'est quelque chose d'approchant

Maximeus
Super, les doublons ont disparus.

Parcontre, il y a désormais un autre souci (qui n'apparaissaît pas avant la modif), c'est le coin de ma box qui s'affiche au milieu de mon pied de box.

Voici l'image:



J'avais déjà eu le problème avant de publier ce post dans le forum, mais sans trouver de solution.
kehops31
bonjour je viens de suivre votre poste, et j'ai fait apparament comme vous.

mais j'ai une petite erreur.

Fatal error: Cannot instantiate non-existent class: infoboxfooter in c:\program files\easyphp1-8\www\catalognew\includes\boxes\categories.php on line 138


savez vous de quoi cela vient.

merci
Maximeus
C'est bon, j'ai trouvé rolleyes.gif :

1) Ajouter les lignes suivantes dans fichiers langue (french.php...) se trouvant dans /catalog/includes/languages :

// Texte se trouvant dans le pied de page des boxes dans includes/boxes/
define('BOX_FOOTER_BLANK', '&nbsp;');

2) Dans le fichier boxes.php se trouvant dans /catalog/includes/classes, ajouter les lignes suivantes sous le code de la class infoBoxHeading:

class infoBoxFooter extends tableBox {
function infoBoxFooter($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left_bottom.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left_bottom.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/view.gif', GO) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right_bottom.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxFooter"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxFooter" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}

3) Dans les fichiers php se trouvant dans /catalog/includes/boxes, ajouter les lignes suivantes sous le code new infoBox($info_box_contents); en fin de page (uniquement si le code est présent dans le fichier) :

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

new infoBoxFooter($info_box_contents, true, true);


Voilà, c'est tout.

N'oubliez surtout pas de faire des copies de vos fichiers originaux histoire d'éviter des soucis.

Salutations.
padaben
SAlut,
c'est super ces modifs, je pense que ca va sauver plus d'un d'entre nous OSciens !

cependant, parceque oui il y en a malheureusement 1 pour moi,

le footer contenant les bottom_right et bottom_right, est espacé du bas de la box;

j'ai cherche un peu partout, mais sans succès..

Si vous avez quelques infos supplémentaires à me donner ce serait bien coul smile.gif

merci en tout ca, c'est vraiment ce que je cherchais depuis un moment, et qui évite bien entendu d'installer une contrib, juste pour ajouter cela smile.gif

Merci

++ wink.gif
padaben
RE all

Alors j'ai vraiment un souci, je pense avoir trouvé la raison, mais je ne sais comment corriger cela.

en fait l'espace que j'obtiens en entre le contenu de ma box et le footer de ma box avec les angles arrondis est l'espace que je devrais avoir entre mes boxes.
puisque là le footer de mes boxes est collé au header de la box du dessous !

donc j'ai eté dans le fichier catalog/includes/classes/boxes.php
l'ajout que j'ai fait en fait avec le code donné par maximeus, est en effet apres le code du infoboxheading, simplement, il se trouve qu'il n'est pas inclut ds la construction de la box en elle meme puisque qu'il n'est pas pris ds la classe constructor...

et là, j'ai eu beau farfouiller, cela dépasse mes connaissances en php !!!
CODE
class infobox { ...}

class infobox extends tableBox{}

class infoBoxHeading extends tableBox {}

class infoBoxFooter extends tableBox {}

class contentBox extends tableBox {}

class contentBoxHeading extends tableBox {}

class errorBox extends tableBox {}

class productListingBox extends tableBox {}


donc si j'observe, il me manque une class : class contentBoxFooter extends tableBox {}

que je tente de créer :
CODE
class contentBoxFooter extends tableBox {
  function contentBoxFooter($contents) {
      $this->table_width = '100%';
      $this->table_cellpadding = '0';

      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left_bottom.gif')),
                                   array('params' => 'height="14" class="infoBoxFooter" width="100%"',
                                         'text' => $contents[0]['text']),
                                   array('params' => 'height="14" class="infoBoxFooter"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_bottom.gif')));

      $this->tableBox($info_box_contents, true);
    }
  }


mais j'ai le regret de vous annoncer que ca ne fonctionne pas !

Des idées seraient les bienvenues smile.gif

merci

++
amandloren
Je l'ai installé hier, moi aussi j'avais le même soucis que toi et il ne faut pas oublier de modifier également le stylesheet :
  1. Faire ce que Maximeus indique le 28 Apr 2007 à 18:29, à savoir aussi que les images corner_left_bottom.gif et corner_right_bottom.gif doivent existées dans images/infobox, perso j'ai modifié sous photoshop mes corners du header de mes box.
  2. Puis modifer le sylesheet en ajoutant ceci :

    CODE
    TD.infoBoxFooter {
      font-family: Verdana, Arial, sans-serif;
      font-size: 12px;
      font-weight: bold;
      background: #9A96C4;
      color: #ffffff;
    }


    sous :

    CODE
    TD.infoBoxHeading {
      font-family: Verdana, Arial, sans-serif;
      font-size: 12px;
      font-weight: bold;
      background: #9A96C4;
      color: #ffffff;
    }

En changeant bien sûr les codes couleurs des background et la police pour l'adapter à votre site et ça marche nickel.
guinnessboy
Bsr,

J'ai vérifié sur un des mes sites, ton constructeur me semble OK.

Comme le précise amandloren ne pas oublier de créer la classe CSS correspondante (mais cela n'empêche pas de fonctionner)

Ensuite bien renseigner la variable de contenu et appeler avec new infoboxfooter($contenu);

padaben
ok pour vos infos

j'ai bien évidemment fait le css correspondant, crée mes gifs pour les angles, !!

je vous post l'intégral de mon fichier includes/classes/boxes.php
CODE
  class tableBox {
    var $table_border = '0';
    var $table_width = '100%';
    var $table_cellspacing = '0';
    var $table_cellpadding = '2';
    var $table_parameters = '';
    var $table_row_parameters = '';
    var $table_data_parameters = '';
    var $table_string = '';    //edit - noJS coolmenu

// class constructor
    function tableBox($contents, $direct_output = false) {
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
        $tableBox_string .= '  <tr';
        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
              $tableBox_string .= '    <td';
              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
              $tableBox_string .= '</td>' . "\n";
            }
          }
        } else {
          $tableBox_string .= '    <td';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
        }

        $tableBox_string .= '  </tr>' . "\n";
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;
      $this->table_string = $tableBox_string;    //edit - noJS coolmenu

      return $tableBox_string;
    }
  }

  class infoBox extends tableBox {
    function infoBox($contents, $direct_output = true) {    //edit - noJS coolmenu
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
      $this->table_cellpadding = '1';
      $this->table_parameters = 'class="infoBox"';
      $this->tableBox($info_box_contents, $direct_output);    //edit - noJS coolmenu
    }

    function infoBoxContents($contents) {
      $this->table_cellpadding = '3';
      $this->table_parameters = 'class="infoBoxContents"';
      $info_box_contents = array();
      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                           'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                           'params' => 'class="boxText"',
                                           'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
      }
      //$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      return $this->tableBox($info_box_contents);
    }
  }

  class infoBoxHeading extends tableBox {
    function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false, $direct_output = true) {    //edit - noJS coolmenu
      $this->table_cellpadding = '0';

      if ($left_corner == true) {
            //$left_corner = '';
        $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_box_left.gif');
      }
      if ($right_arrow == false || $right_arrow == true) {
        $right_arrow = '';
      }
      if ($right_corner == true) {
           //$right_corner = '';
        $right_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_box_right.gif');
      }

      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => 'height="14"',
                                         'text' => $left_corner),
                                   array('params' => 'width="100%" height="14" class="infoBoxHeading" nowrap',
                                         'text' => $contents[0]['text']),
                                   array('params' => 'height="14" nowrap',
                                         'text' => $right_corner));

      $this->tableBox($info_box_contents, $direct_output);    //edit - noJS coolmenu
    }
  }
// enxpand footer box  
  class infoBoxFooter extends tableBox {
function infoBoxFooter($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left_bottom.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left_bottom.gif');
}
if ($right_arrow == true) {
//$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/view.gif', GO) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right_bottom.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxFooter"',
'text' => $contents[0]['text']),
array('params' => 'height="14" nowrap border="0"',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}

// end expand footer box

  class contentBox extends tableBox {
    function contentBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->contentBoxContents($contents));
      $this->table_cellpadding = '1';
      $this->table_parameters = 'class="infoBox"';
      $this->tableBox($info_box_contents, true);
    }

    function contentBoxContents($contents) {
      $this->table_cellpadding = '4';
      $this->table_parameters = 'class="infoBoxContents"';
      return $this->tableBox($contents);
    }
  }

  class contentBoxHeading extends tableBox {
    function contentBoxHeading($contents) {
      $this->table_width = '100%';
      $this->table_cellpadding = '0';

      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
                                   array('params' => 'height="14" class="infoBoxHeading" width="100%"',
                                         'text' => $contents[0]['text']),
                                   array('params' => 'height="14" class="infoBoxHeading"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

      $this->tableBox($info_box_contents, true);
    }
  }
// suite modif pour footer box  
  class contentBoxFooter extends tableBox {
  function contentBoxFooter($contents) {
      $this->table_width = '100%';
      $this->table_cellpadding = '0';

      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left_bottom.gif')),
                                   array('params' => 'height="14" class="infoBoxFooter" width="100%"',
                                         'text' => $contents[0]['text']),
                                   array('params' => 'height="14" class="infoBoxFooter"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_bottom.gif')));

      $this->tableBox($info_box_contents, true);
    }
  }
  
// suite modif pour footer box

  class errorBox extends tableBox {
    function errorBox($contents) {
      $this->table_data_parameters = 'class="errorBox"';
      $this->tableBox($contents, true);
    }
  }

  class productListingBox extends tableBox {
    function productListingBox($contents) {
      $this->table_parameters = 'class="productListing"';
      $this->tableBox($contents, true);
    }
  }
?>


puis par ex ma box creditcard.php contenu donc dans includes/boxes.
CODE
$info_box_contents = array();
  $info_box_contents[] = array('text' => BOX_HEADING_CREDITCARDS);

  new infoBoxHeading($info_box_contents, true, true);

  $info_box_contents = array();
  $info_box_contents[] = array('text' => '' . '<div align=center valign=middle>' . TEXT_SSL . '<br />' .
                                           '' . '<br />' . TEXT_WE_ACCEPT . '<br />' .
                                         '' . tep_image(DIR_WS_IMAGES . 'paiement/paypal.jpg', 'Paypal') . '&nbsp;' .
                                         '' . tep_image(DIR_WS_IMAGES . 'paiement/visa.gif', 'Visa') . '&nbsp;' .
                                         '' . tep_image(DIR_WS_IMAGES . 'paiement/mastercard.jpg', 'MasterCard') . '&nbsp;' . '</div>');

    new infoBox($info_box_contents);
    $info_box_contents = array();
    $info_box_contents[] = array('text' => BOX_FOOTER_BLANK);
    new infoBoxFooter($info_box_contents, true, true);
?>
            </td>
        </tr>


ex :

merci pour vos précisions !
je comprend vraiment pas !

++

amandloren
Essaie de ne pas mettre la partie de code compris entre tes : // suite modif pour footer box

La 1ère fois que g essayé, ça marchait comme toi alors g remis mes fichiers comme avant et j'ai recommencé tranquillement le lendemain en suivant le pas à pas et ça a marché, peut-être est-ce dû parce que j'ai modifié cette ligne :
CODE
//$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/view.gif', GO) . '</a>';


Voici ma class infoboxFooter (mes images sont nommées différement) :
CODE
class infoBoxFooter extends tableBox {
function infoBoxFooter($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/cornerb_left.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/cornerb_right.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxFooter"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxFooter" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}


Par contre, tu as fait comment pour enlever ton contour de cadre au bas de ta boxe panier car je cherche également à le faire (cf. mon post)
padaben
Salut amandloren,

j'ai fait comme tu m'a conseillé, repris à 0 et recommencé tranquillos...

j'ai regardé ton code et le mien, mais rien n'y fait, ca ne daigne pas retirer l'espace..

pourrais tu me donner le code de ta page class/boxes.php ? steup.

j'ai répondu à ton autre post !
j'espere que ca t'a aidé wink.gif

++
amandloren
Le voici :
CODE
<?php
/*
  $Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

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

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  class tableBox {
    var $table_border = '0';
    var $table_width = '100%';
    var $table_cellspacing = '0';
    var $table_cellpadding = '2';
    var $table_parameters = '';
    var $table_row_parameters = '';
    var $table_data_parameters = '';
    var $table_string = '';    //edit - noJS coolmenu

// class constructor
    function tableBox($contents, $direct_output = false) {
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
        $tableBox_string .= '  <tr';
        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
              $tableBox_string .= '    <td';
              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
              $tableBox_string .= '</td>' . "\n";
            }
          }
        } else {
          $tableBox_string .= '    <td';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
        }

        $tableBox_string .= '  </tr>' . "\n";
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;
      $this->table_string = $tableBox_string;    //edit - noJS coolmenu

      return $tableBox_string;
    }
  }

  class infoBox extends tableBox {
    function infoBox($contents, $direct_output = true) {    //edit - noJS coolmenu
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
      $this->table_cellpadding = '1';
      $this->table_parameters = 'class="infoBox"';
      $this->tableBox($info_box_contents, $direct_output);    //edit - noJS coolmenu
    }

    function infoBoxContents($contents) {
      $this->table_cellpadding = '3';
      $this->table_parameters = 'class="infoBoxContents"';
      $info_box_contents = array();
      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                           'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                           'params' => 'class="boxText"',
                                           'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
      }
      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      return $this->tableBox($info_box_contents);
    }
  }

  class infoBoxHeading extends tableBox {
    function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false, $direct_output = true) {    //edit - noJS coolmenu
      $this->table_cellpadding = '0';

      if ($left_corner == true) {
        $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
      } else {
        $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
      }
      if ($right_arrow == true) {
        $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
      } else {
        $right_arrow = '';
      }
      if ($right_corner == true) {
        $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif');
      } else {
        $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
      }

      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
                                         'text' => $left_corner),
                                   array('params' => 'align="center" width="100%" height="14" class="infoBoxHeading"',
                                         'text' => $contents[0]['text']),
                                   array('params' => 'height="14" class="infoBoxHeading" nowrap',
                                         'text' => $right_corner));

      $this->tableBox($info_box_contents, $direct_output);    //edit - noJS coolmenu
    }
  }

class infoBoxFooter extends tableBox {
function infoBoxFooter($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/cornerb_left.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/cornerb_right.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxFooter"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxFooter" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}

  class contentBox extends tableBox {
    function contentBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->contentBoxContents($contents));
      $this->table_cellpadding = '1';
      $this->table_parameters = 'class="infoBox"';
      $this->tableBox($info_box_contents, true);
    }

    function contentBoxContents($contents) {
      $this->table_cellpadding = '4';
      $this->table_parameters = 'class="infoBoxContents"';
      return $this->tableBox($contents);
    }
  }

  class contentBoxHeading extends tableBox {
    function contentBoxHeading($contents) {
      $this->table_width = '100%';
      $this->table_cellpadding = '0';

      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
                                   array('params' => 'align="center" height="14" class="infoBoxHeading" width="100%"',
                                         'text' => $contents[0]['text']),
                                   array('params' => 'height="14" class="infoBoxHeading"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif')));

      $this->tableBox($info_box_contents, true);
    }
  }

  class errorBox extends tableBox {
    function errorBox($contents) {
      $this->table_data_parameters = 'class="errorBox"';
      $this->tableBox($contents, true);
    }
  }

  class productListingBox extends tableBox {
    function productListingBox($contents) {
      $this->table_parameters = 'class="productListing"';
      $this->tableBox($contents, true);
    }
  }
?>


Je vais essayer ce que tu m'as indiqué et je te dis.
amandloren
En testant ton code ds mon css pour modiifer le bas de mes box comme tu me l'as indiqué ds mon autre post, j'ai trouvé ton pb, ça vient en fait de :

margin-bottom: 10px;

supprime-le et ça supprimera ton espace.
padaben
RE ..;
RHAAAAAAAAAA %*$¤$£°##@ !!!! quel con !!! c'était pourtant devant ms yeux !!!!!

merci trop de fois pour cette illumination !

c'était trop simple

merci j'espere que tu as aussi résolu tes soucis wink.gif

++ et bon code !

je n'ai pas le pouvoir de mettre [resolu] au post !!! à bon entendeur ! merci smile.gif
amandloren
biggrin.gif biggrin.gif de rien pour l'illumination, ce forum est là pour ça, pour ma part non je n'ai pas trouvé soluce à mes soucis mais bon ce n'est pas le + urgent, je m'y pencherai plus tard, là je suis ma boxe catégorie afin de la mettre en horizontal mais ceci est une autre histoire !

Sur ceux, bonne fin de journée !
guettapan
A l'aide SVP
voila donc tout est presque niquel j'ai bien mais arrondi en bas de mes boxes, mais j'ai aussi une barre bleu coller juste en dessous.
je vous laisse mon boxe.php
merci de votre aide

<?php
/*
$Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

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

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

class tableBox {
var $table_border = '0';
var $table_width = '100%';
var $table_cellspacing = '0';
var $table_cellpadding = '2';
var $table_parameters = '';
var $table_row_parameters = '';
var $table_data_parameters = '';

// class constructor
function tableBox($contents, $direct_output = false) {
$tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
$tableBox_string .= '>' . "\n";

for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
$tableBox_string .= ' <tr';
if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
$tableBox_string .= '>' . "\n";

if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
$tableBox_string .= ' <td';
if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
$tableBox_string .= ' ' . $contents[$i][$x]['params'];
} elseif (tep_not_null($this->table_data_parameters)) {
$tableBox_string .= ' ' . $this->table_data_parameters;
}
$tableBox_string .= '>';
if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
$tableBox_string .= $contents[$i][$x]['text'];
if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
$tableBox_string .= '</td>' . "\n";
}
}
} else {
$tableBox_string .= ' <td';
if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
$tableBox_string .= ' ' . $contents[$i]['params'];
} elseif (tep_not_null($this->table_data_parameters)) {
$tableBox_string .= ' ' . $this->table_data_parameters;
}
$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
}

$tableBox_string .= ' </tr>' . "\n";
if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
}

$tableBox_string .= '</table>' . "\n";

if ($direct_output == true) echo $tableBox_string;

return $tableBox_string;
}
}

class infoBox extends tableBox {
function infoBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->infoBoxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
$this->table_cellpadding = '3';
$this->table_parameters = 'class="infoBoxContents"';
$info_box_contents = array();
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
'params' => 'class="boxText"',
'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
}
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
return $this->tableBox($info_box_contents);
}
}

class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxHeading"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxHeading" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}

class infoBoxFooter extends tableBox {
function infoBoxFooter($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left_bas.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left_bas.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right_bas.gif', ICON_ARROW_RIGHT) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right_bas.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxFooter"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxFooter"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxFooter" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}
class contentBox extends tableBox {
function contentBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->contentBoxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_box_contents, true);
}

function contentBoxContents($contents) {
$this->table_cellpadding = '4';
$this->table_parameters = 'class="infoBoxContents"';
return $this->tableBox($contents);
}
}

class contentBoxHeading extends tableBox {
function contentBoxHeading($contents) {
$this->table_width = '100%';
$this->table_cellpadding = '0';

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
array('params' => 'height="14" class="infoBoxHeading" width="100%"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxHeading"',
'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif')));

$this->tableBox($info_box_contents, true);
}
}

class errorBox extends tableBox {
function errorBox($contents) {
$this->table_data_parameters = 'class="errorBox"';
$this->tableBox($contents, true);
}
}

class productListingBox extends tableBox {
function productListingBox($contents) {
$this->table_parameters = 'class="productListing"';
$this->tableBox($contents, true);
}
}
?>
guinnessboy
Salut,

un poste un dimanche à 06h59 ???? tu rentrais de bringue ?????? biggrin.gif

Tu as une image du résultat ? Mais a priori je pense que la solution est plus dans la css.

Quelle classe CSS appliques tu au bas de box ?



padaben
lol guinessboy,
oui super tot le post !!

je dirai aussi dans le css.
déjà aussi guettapan si tu peux mettre ton code php entre [code ] et [/ code ] ca serait bien mieux pour la lecture.

pour le css, ou bien c'est dans ta classe infoBoxFooter, ou bien c'est dans un style qui se trouve apres.

déplace dans un 1er temps ta classe en bas de ton css, sait on jamais !

++
Ceci est une version "bas débit" de notre forum. Pour voir la version complète avec plus d'informations, la mise en page et les images, veuillez cliquer ici.
Invision Power Board © 2001-2024 Invision Power Services, Inc.