Aide - Recherche - Membres - Calendrier
Version complète : contribution lytebox
Forum osCommerce-fr > Adapter OsCommerce MS2 > Design
Madmaxx
ne trouvant pas ce que je souhaité, ou alors ne pouvant l'adapter a mon code déjà fait ou à diffèrent type de navigateur ( surtout internet explorer en fait biggrin.gif)
j'ai fait petit truc rapide, facile, rapide, W3C valide (oui je sais je saoule avec cela biggrin.gif )
j'ai ressorti d'un vieux secteur du disque dur une autre adaptation de lightbox ( que j'ai utilisé sur des sites statiques pur xhtml/css)
lytebox
Bon dimanche @+
CODE
/*
* -=[ lightbox effect ]=-
*
* http://www.oscommerce-fr.info/forum
*
* Contribution réalisée par madmaxx
* http://www.oscommerce-fr.info/forum/index.php?showuser=26412
* http://forums.oscommerce.com/user/271248-madmaxx/
*
* source original
* http://www.dolem.com/lytebox
*
*******************************************************
*
*un autre effect lightbox
*integration facile, rapide, et légère
*code validé W3C
*fonctionne sous firefox (gecko), et internet explorer7 (seul version testé)
*
*
*******************************************************
* osCommerce, Open Source E-Commerce Solutions
* http://www.oscommerce.com
* Copyright © 2002 osCommerce
* Released under the GNU General Public License
*
*/
Shibari_59
Bonjour

je l'utilise, c'est simple en effet seulement lorsque le nom du produit comporte une apostrophe genre "l'oeuf'i" l'mage miniature n'apparait pas donc impossible de l'agrandir bien évidement ....

code d'origine (osc quoi que j'ai vu lightbox qui traine d'un essai) cela dis ce n'est pas en cause
Code
<script language="javascript"><!--
      document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . '&image=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"') . '<br>' . tep_template_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>
<noscript>
      <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes ($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';  ?>


code modifier qui pose le problème de l'
Code
<script type="text/javascript"><!--
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_lrg']) . '"rel="lytebox" title="'. $product_info['products_name'] . $product_info['products_model'] . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' .  tep_template_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lytebox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' .  tep_template_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>



Je cherche aussi à corriger, ref produit collé à son nom sans espace mais je devrais le trouver ca

Merci pour votre aide si vous avez des idées ..

ps je me dis que le problème n'est pas sur ce bout de code mais dans le js
Shibari_59
j'ai trouvé ...

ca pourra servir

Code
document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_lrg']) . '"rel="lytebox" title="'.  addslashes($product_info['products_name']) . $product_info['products_model'] . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' .  tep_template_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>


le problème était sur l'appel du nom du produit dans le title

remplacer
rel="lytebox" title="'. $product_info['products_name'] . $product_info['products_model']

par
rel="lytebox" title="'. addslashes($product_info['products_name']) . $product_info['products_model'] .

on peut aussi oter
$product_info['products_model'] .

la réf produit n'ayant pas vraiment d'interet sur l'image agrandie.

Madmaxx
avec un peu de retard biggrin.gif
merci a toi wink.gif
Touffy
Top !

Cela marche bien !

Meme sur des formulaires !

Merci les gars !
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-2013 Invision Power Services, Inc.