Skip to main content

Image survol

More
15 years 1 week ago - 15 years 1 week ago #25855 by marcmarc
Image survol was created by marcmarc
Bonjour,
dans la vue en liste, je voudrais afficher une image plus grosse lorsque l'on survole les imagettes de produits.

pour celà j'ai :
1) installé le plugin tooltips de nonumber ( www.nonumber.nl/extensions/tooltips ).
2) modifié le fichier listing_img.php pour y intégrer les tags du plugin {tip}{/tip}

j'ai fais un test avec une image "en dur" = pas de problème, j'obtiens le comportement attendu.

mon problème :
je ne sais pas comment appeler l'image thumbnail définie dans la configuration générale
Code:
<?php $link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway);?> <div style="height:<?php echo $this->image->main_thumbnail_y;?>px;text-align:center;clear:both;" class="hikashop_product_image"> <?php if($this->params->get('link_to_product_page',1)){ ?> <a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>"> <?php } ?> {tip <?php echo /* c'est ici que je voudrais afficher l'image thumbnail de la taille définie dans la config générale */ ?> } <?php echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x, $this->image->main_thumbnail_y); ?> {/tip}

pouvez-vous m'aider ?
merci

edit : le code ne s'affiche pas correctement une fois publié dans le forum : que faut-il faire ?
Last edit: 15 years 1 week ago by marcmarc.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #25866 by nicolas
Replied by nicolas on topic Re: Image survol
Bonjour,

L'URL de la miniature peut être retrouvée comme cela:
$this->image->uploadFolder_url.'thumbnail_'.$this->image->main_thumbnail_y.'x'.$this->image->main_thumbnail_x.'/'.$image->file_path

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #25876 by marcmarc
Replied by marcmarc on topic Re: Image survol
merci de votre réponse.

le code : $this->image->uploadFolder_url.'thumbnail_'.$this->image->main_thumbnail_y.'x'.$this->image->main_thumbnail_x.'/'.$image->file_path;
me donne le chemin (/media/com_hikashop/upload/thumbnail_60x60/) mais il manque le nom du fichier.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #25884 by nicolas
Replied by nicolas on topic Re: Image survol
En effet, il faut changer $image->file_path par $this->row->file_path pour ce fichier là.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #25890 by marcmarc
Replied by marcmarc on topic Re: Image survol
merci, c'est bien ça.

malheureusement mon "truc" n'a pas l'air de fonctionner dès lors qu'il y a une variable.
par exemple,
- ça, ça marche : echo '{tip <img src="/media/com_hikashop/upload/parurehellokitty.jpg" /> }';

- ça, ça ne marche pas : echo '{tip <img src="'.$this->image->uploadFolder_url.'thumbnail/'.$this->row->file_path.'/> }';

j'imagine que c'est le plugin qui est en cause.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #25891 by nicolas
Replied by nicolas on topic Re: Image survol
Votre second code a pourtant l'air bon donc en effet cela vient peut être du plugin.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #25893 by marcmarc
Replied by marcmarc on topic Re: Image survol
je vais donc voir de ce côté là et je mettrais ici le code résultant si ça fonctionne.
à bientôt

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #25948 by marcmarc
Replied by marcmarc on topic Re: Image survol
ça y est, ça marche...
je ne peux pas poster le code puisque le php est supprimé à l'affichage dans le forum mais voilà une copie d'écran avec la modif.

Please Log in or Create an account to join the conversation.

Time to create page: 0.190 seconds
Powered by Kunena Forum