A1TH Posted September 18, 2012 Share Posted September 18, 2012 (edited) Bonjour, J’ai un problème avec le bloc publicité (Bloc publicité v0.3) je suis sous la PS 1.4.9.0. En effet, au niveau du back office, lorsque le upload une nouvelle image, il semble qu’elle n’est pas pris en charge et n’apparaît pas après enregistrement. Au niveau du site, le bloc publicité n’apparaît pas, « pas d’image » , c’est invisible, par contre en passant la souris, le bloc est présent ainsi que le lien. L’image a bien été chargée comme suit : modules/blockadvertising/advertising_custom.jpg ; A l’installation cette même image s’appelait : modules /blockadvertising/advertising.jpg ; Bref, après avoir fouiller dans les forums, je n’arrive pas à résoudre mon problème qui est que l’image ne s’affiche pas, dans le back office et sur le site. Merci de votre aide. Edited September 19, 2012 by A1TH (see edit history) Link to comment Share on other sites More sharing options...
xlynx Posted September 18, 2012 Share Posted September 18, 2012 (edited) Hey, C'est probablement un problème de (adblocks, ou d'anti pub), votre navigateur bloque les images car : 1)Dans le fichier /modules/blockadvertising/blockadvertising.tpl , il y'a un div avec avec une classe advertising_block <!-- MODULE Block advertising --> <div class="advertising_block"> <a href="{$adv_link}" title="{$adv_title}"><img src="{$image}" alt="{$adv_title}" title="{$adv_title}" width="155" height="163" /></a> </div> <!-- /MODULE Block advertising --> Donc changer le nom de cette class autrement que advertising ou pub ... Exemple : presents_block 2) Dans le fichier /modules/blockadvertising/blockadvertising.php Repérez toutes les valeurs "advertising_custom" et renommez les comme vous le voulez , autrement que advertising ou pub . Exemple : presents_custom 3)Renommer ainsi le fichier jpg "advertising.jpg" en "presents_custom.jpg" par exemple Par la suite votre navigateur ne va plus considérer l'image comme une pub. Good luck Edited September 18, 2012 by xlynx (see edit history) 1 1 Link to comment Share on other sites More sharing options...
A1TH Posted September 18, 2012 Author Share Posted September 18, 2012 Merci xlynx, c'est résolu. Ta technique fonctionne. Link to comment Share on other sites More sharing options...
xlynx Posted September 18, 2012 Share Posted September 18, 2012 Hey, De rien mate :-) Good luck pour la suite. xlynx Link to comment Share on other sites More sharing options...
parfimp Posted December 13, 2012 Share Posted December 13, 2012 Bonsoir ou bonjour selon, oké pour le point 1- il suffit de remplacer advertising par un mot de notre choix. Pour le point 2- j'éprouve un peu plus de difficultés en ce sens que je n'ai pas trouvé la référence exacte "advertising_custom" et je me demande s'il faut remplacer systématiquement tous les "advertising" que l'on rencontre, y compris dans les noms du script et que ce soit en un mot ou même sur une expression contenant le mot? Cordialement, Parfimp Link to comment Share on other sites More sharing options...
LucyD Posted March 21, 2014 Share Posted March 21, 2014 Je fais remonter ce post car avec la version 1.5.5.0 de Prestashop, le terme "advertising_custom" ne se retrouve pas dans le fichier /modules/blockadvertising/blockadvertising.php mais dans le fichier le fichier /modules/blockadvertising/blockadvertising.tpl J'ai modifié "advertising" par "presents" comme suggéré mais ça n'a rien fait. Je suis allé dans le fichier .php et là j'en ai à la pelle des "advertising" mais pas des "advertising_custom" et comme demande Parfimp, je me demande si je dois remplacer tous les terme "advertising" en "presents" dans ce fichier là pour que ça puisse contourner Adblock.. :-/ MERCI !! Link to comment Share on other sites More sharing options...
xlynx Posted March 21, 2014 Share Posted March 21, 2014 (edited) Bonjour, Suivez mes instructions please : Ouvrez le fichier "blockadvertising.tpl" > changez cette ligne : Ligne 27 "<div class="blockadvertising_block">" en "<div class="presents_block">" puis enregistrez. Ouvrez le fichier "blockadvertising.php" > changez ces lignes : Ligne 65 : $this->adv_imgname = 'advertising'; en $this->adv_imgname = 'presents'; Ligne 84 : "if (in_array($file, array('advertising.jpg', 'advertising.gif', 'advertising.png')))" en "if (in_array($file, array('presents.jpg', 'presents.gif', 'presents.png')))" puis enregistrez. Ligne 106 : if ($this->adv_imgname != 'advertising' && file_exists(_PS_MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'.'.Configuration::get('BLOCKADVERT_IMG_EXT'))) en if ($this->adv_imgname != 'presents' && file_exists(_PS_MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'.'.Configuration::get('BLOCKADVERT_IMG_EXT'))) Ligne 133 : // Set the image name with a name contextual to the shop context $this->adv_imgname = 'advertising'; if (Shop::getContext() == Shop::CONTEXT_GROUP) $this->adv_imgname = 'advertising'.'-g'.(int)$this->context->shop->getContextShopGroupID(); elseif (Shop::getContext() == Shop::CONTEXT_SHOP) $this->adv_imgname = 'advertising'.'-s'.(int)$this->context->shop->getContextShopID(); en // Set the image name with a name contextual to the shop context $this->adv_imgname = 'presents'; if (Shop::getContext() == Shop::CONTEXT_GROUP) $this->adv_imgname = 'presents'.'-g'.(int)$this->context->shop->getContextShopGroupID(); elseif (Shop::getContext() == Shop::CONTEXT_SHOP) $this->adv_imgname = 'presents'.'-s'.(int)$this->context->shop->getContextShopID(); Ligne 185 : if ($this->adv_imgname == 'advertising') en if ($this->adv_imgname == 'presents') Vous de devez maintenant nommer le fichier image en "presents.jpg" ! au lieu de "advertising.jpg" Bon courage! xlynx Edited March 21, 2014 by xlynx (see edit history) 1 Link to comment Share on other sites More sharing options...
LucyD Posted March 21, 2014 Share Posted March 21, 2014 M E R C I !!! Ca fonctionne ! Je me tapais la tête contre les murs et voilà, un miracle, merci xlynx !!! Link to comment Share on other sites More sharing options...
xlynx Posted March 21, 2014 Share Posted March 21, 2014 Pas de problème :-) Bonne journée ! Xlynx Link to comment Share on other sites More sharing options...
Shido Posted April 24, 2014 Share Posted April 24, 2014 (edited) Bonjour, J'ai fais ces manipulations sous 1.5.6.2, l'image s'affiche bien dans le BO mais toujours pas sur le FO sauf si je désactive Adblock. Une idée ? Merci Edited April 24, 2014 by Shido (see edit history) Link to comment Share on other sites More sharing options...
xlynx Posted April 24, 2014 Share Posted April 24, 2014 Bonjour, Essayez de vider le cache smarty et un force compile, videz aussi le cache de votre navigateur. Good luck xlynx 1 Link to comment Share on other sites More sharing options...
Shido Posted April 24, 2014 Share Posted April 24, 2014 Mea culpa ça fonctionne après vidage de cache et smarty Merci xlynx Link to comment Share on other sites More sharing options...
xlynx Posted April 24, 2014 Share Posted April 24, 2014 Parfait! Pas de problème Bonne journée xlynx Link to comment Share on other sites More sharing options...
desbonsprix Posted May 24, 2014 Share Posted May 24, 2014 Merci !!! J'avais le même soucis et maintenant réglé ... Greg Link to comment Share on other sites More sharing options...
Anthony Douchez Posted July 3, 2014 Share Posted July 3, 2014 Bonjour, J'ai réalisé la manipulation mais l'affichage est plus petit que la taille d'origine Avez-vous une idée ? Merci d'avance Link to comment Share on other sites More sharing options...
xlynx Posted July 3, 2014 Share Posted July 3, 2014 Hello, Jetez un coup d’œil dans le fichier "blockadvertising.tpl" , il y'a les deux paramètres width="xx" et height="xx" . Good luck :-) xlynx Link to comment Share on other sites More sharing options...
Pczudaki Posted October 1, 2015 Share Posted October 1, 2015 Bonjour, Je me permet de remonter le sujet. J'ai le même problème, je suis tous ce que vous avez dit mais rien à faire mes images n'apparaissent pas. Les modification peuvent être différente en fonction des version de prestashop? Car toutes les modifications que ne peux faire ne sont pas au même emplacement que vous. Merci d'avance Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now