Gunnar Jensen 5 Posted June 5, 2013 (edited) Léger, facile à mettre en place et gratuit, Background Manager est fait pour vous C'est ennuyeux de changer son fond d'écran à chaque nouvel évènement de l'année... j'ai donc développé ce module afin de gagner du temps. La code est basic mais donne la possibilité de changer de fond d'écran, de modifier sa position, sa répétition ou encore la couleur de la page de votre site. La traduction via l'admin est possible mais aucun fichier de langue n'est disponible dans le pack. Développé sur PrestaShop™ 1.5.4.1. ------------------------------------------------------------------------------------------------------------------------------ Light, easy and free to use, the background manager is for you It's so boring to change background's elements everytime (christmas, easter etc.) so I have developped this module to go faster. The code is basic but give you everything to manage your background css. The translation is enabled from the administration. Based on PrestaShop™ 1.5.4.1. ------------------------------------------------------------------------------------------------------------------------------ Aperçu / Preview backgroundmanager_1.1.zip Edited August 23, 2013 by Gunnar Jensen (see edit history) 4 Share this post Link to post Share on other sites
Fistou69 6 Posted June 5, 2013 (edited) Bonjour et bienvenu sur le forum. Module sympa..., simple mais efficace.. Toutefois sur une v1.5.4.1 après plusieurs essais avec différentes images, sur une image et toujours la même -> message erreur: [PrestaShop] Fatal error in module Zebra_Image: Allowed memory size of 134217728 bytes exhausted (tried to allocate 78524161 bytes) Petite question. Dans le même style de module est-il possible de rajouter une image de background dans le pied de page différente de celle qui serait en haut, les deux indépendante l'une de l'autre en fonction de la hauteur de la page. Salutations Edited June 5, 2013 by Fistou69 (see edit history) Share this post Link to post Share on other sites
jolvil 78 Posted June 5, 2013 Merci pour ce module. Testé OK sur PS 1.4. Ne marche pas avec PS 1.3, erreur serveur en front. Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted June 6, 2013 (edited) Fistou : Bizarre je n'ai eu aucun soucis et apparement Jolvil non plus. Tu devrais voir avec les variables : max_input_time memory_limit max_execution_time Pour ta demande : Je ne connais pas les structures des pages à l'avance donc ça risque d'être compliqué. Jolvil : Merci pour ce complément d'information. Edited June 6, 2013 by Gunnar Jensen (see edit history) Share this post Link to post Share on other sites
Fistou69 6 Posted June 6, 2013 Fistou : Bizarre je n'ai eu aucun soucis et apparement Jolvil non plus. j'ai cette erreur qu’avec un seul fichier .jpg. je pense que mon fichier est corrompu ou quelque chose comme ça. Sinon encore merci. Share this post Link to post Share on other sites
Fistou69 6 Posted June 6, 2013 (edited) Pour ta demande : Je ne connais pas les structures des pages à l'avance donc ça risque d'être compliqué. En fait c'est de pouvoir sur le même principe d'ajouter une image en haut en background pour avoir le header sur toute la largeur et de même en bas de page pour avoir un footer sur toute la largeur également. ces deux images background étant indépendante l'une de l'autre en fonction de la hauteur de la page. La structure des pages étant celle du thème de base de prestashop. Edited June 6, 2013 by Fistou69 (see edit history) Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted June 6, 2013 (edited) Je pense comprendre ce que tu demandes. Pour ce module je voulais quelque chose de très simple d'utilisation, je ne vais donc pas l'ajouter. Ceci dit pour le prochain je vais réfléchir à un module plus vaste qui pourrait comprendre ce genre d'action (modification des structures etc. ). Edited June 6, 2013 by Gunnar Jensen (see edit history) Share this post Link to post Share on other sites
Fistou69 6 Posted June 6, 2013 Très bien, alors bonne continuation. Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted June 6, 2013 Et merci à toi d'avoir pris du temps pour essayer ce module. 1 Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted June 9, 2013 (edited) Bonjour à tous Merci pour ce partage qui fonctionne bien, félicitation , beau travail , si je peux me permettre cela serait bien qu'on puisse insérer un lien. Amitiés Edited June 9, 2013 by SMOK KYF (see edit history) Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted June 10, 2013 SMOK : Tu veux dire transformer le background en pub ? Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted June 10, 2013 (edited) Bonjour , Jensen Pas spécialement de la pub : Par exemple insérer un lien (url) quand tu clique sur l'image cela te dirige vers une page , etc... S.t.p peux tu ajouter la position footer ?? Amitiés Edited June 10, 2013 by SMOK KYF (see edit history) Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted June 10, 2013 (edited) Intéressant, je vais y songer. La position footer existe déjà. Ils sont classés comme suit ( dans define the position) : - Aucun - Top - Bottom etc. Edited June 10, 2013 by Gunnar Jensen (see edit history) Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted June 10, 2013 (edited) Bonsoir , Jensen Merci c'est sympa , pour le Footer j'avais pas compris Bottom = Footer . Merci encore pour ce beau travail qui va rendre service à beaucoup de personnes. Bonne soirée Amitiés Edited June 10, 2013 by SMOK KYF (see edit history) Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted June 11, 2013 Bonjour , Jensen J'ai oublié de te dire est-ce que c'est normal quand tu ajoute une autre image l'autre disparaît ?? Amitiés Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted June 11, 2013 (edited) SMOK KYF : Oui c'est normal. Un fond ne peut avoir qu'un seul background. Le dernier arrivé remplace donc le précédant. Edited June 14, 2013 by Gunnar Jensen (see edit history) Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted June 12, 2013 Bonjour , Jensen Merci pour la réponse. Amitiés Share this post Link to post Share on other sites
CedricG 1 Posted July 24, 2013 Super boulot, merci beaucoup. Est-il possible de : - le centrer (center center) ? - background-attachment (fixe ou scrollable) ? enfin je rejoints SMOK KYF pour le background cliquable. Et ce sera PARFAIT! Merci, Cédric Share this post Link to post Share on other sites
pg47 0 Posted July 31, 2013 Plus complet que mon ancien module, il fonctionne parfaitement en 1.4. Petit regret : que la possibilité d'un background fixe lors du scroling de la page ne soit pas possible. Mais déja très bien comme ça. Merci Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 15, 2013 Bonjour, bravo et merci pour ce magnifique module. Je rencontre néanmoins un petit souci: je n'ai pas la possibilité de changer la première image chargé, même en désinstallant le module et en le réinstallant, il reprend toujours la même image avec les premiers réglages. Je suis sous PS 1.5.4.1. Merci pour votre réponse. Gilles WT-IMPORT.FR Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted August 15, 2013 Bonjour à tous As tu vidé le cache ?? Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 15, 2013 Bonjour à tous As tu vidé le cache ?? Non, comment faire ? Je suis novice désolé. Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted August 15, 2013 Quel navigateur internet as tu ?? Pour PrestaShop : http://www.prestatoolbox.com/free-modules/122-clear-the-cache-of-prestashop.html Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 15, 2013 Quel navigateur internet as tu ?? Pour PrestaShop : http://www.prestatoo...prestashop.html J'utilise Google Chrome, sinon IE10. Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 15, 2013 J'ai vidé le cache avec emptycache, mais le probleme persiste. Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted August 15, 2013 Ok vide le cache Chrome va sur paramètres après Afficher les paramètres avancés…ci joint capture Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 15, 2013 Ok vide le cache Chrome va sur paramètres après Afficher les paramètres avancés…ci joint capture Merci Smok Kyf. J'ai vidé le cache de Chrome et j'ai pu changé l'image. Merci énormément pour tes réponses et solutions rapides. Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted August 15, 2013 (edited) Ok, Bon courage !! Edited August 15, 2013 by SMOK KYF (see edit history) Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 15, 2013 J'ai une autre question qui n'a rien à voir (ou petut-etre que si), après presque chaque manipulation dans le BO Prestashop, je reste coincé sur une page blanche. Qu'est-ce qui peut causer le problème ? De plus c'est apparu il y a environ 3 jours et en même temps mon site est extrêment lent alors que jusque là il n'y avait pas de souci. Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted August 15, 2013 (edited) Moi cela fait 2 jours que j'ai ce problème c'est le serveur (hébergement) Méfie toi de certains modules !! Edited August 15, 2013 by SMOK KYF (see edit history) Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 15, 2013 Moi cela fait 2 jours que j'ai ce problème c'est le serveur (hébergement) Méfie toi de certains modules !! J'ai contacté Hostpapa, ils m'ont assuré que celà ne vient pas d'eux. Je les crois car j'ai 9000 produits en catalogue, tous fonctionnait bien jusqu'à ce que j'installe des modules de référencement (Twenga, etc etc) et des modules de paiement (Paypal, Kwixo, etc etc). Le probleme c'est que je ne sais pas quel module ralenti à ce point mon site ! Share this post Link to post Share on other sites
askinjew 122 Posted August 16, 2013 (edited) exelent it is work 1.5.4.1 but webside slow open thanks alot Edited August 21, 2013 by askinjew (see edit history) Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted August 21, 2013 Bonjour, Merci pour vos commentaires. Je vais me pencher sur une intégration du background fixe. @Gilles : Un problème de cache sur le site ? Share this post Link to post Share on other sites
WT-IMPORT 0 Posted August 21, 2013 Bonjour, Merci pour vos commentaires. Je vais me pencher sur une intégration du background fixe. @Gilles : Un problème de cache sur le site ? Oui surement. Sais-tu comment je devrais faire pour résoudre mon problème ? En tout cas merci pour ton module, j'en avais acheté des payants qui ne valent pas le tien ! Bravo. Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted August 21, 2013 WT - Import - Soit c'est un soucis de cache sur le navigateur. Dans ce cas faire un CTRL + F5 et ça passera sans problème. Au pire test en un autre pour être sur. - Sinon cela vient peut être d'un module de cache. Il faudrait désactiver tout les systèmes de cache y compris celui de Presta pour vérifier. A tous Je viens d'intégrer le position fixed et la position center center. Je vais mettre le package à jour dans les minutes qui suivent. Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted August 21, 2013 La nouvelle version est en ligne. J'ai supprimé la verison initiale pour laisser place à celle-ci. Share this post Link to post Share on other sites
CedricG 1 Posted August 21, 2013 (edited) Merci pour la version 1.1 (qui reste en 1.0 dans le BO) Penses-tu que le background cliquable soit faisable? http://www.bebeautebio.com/ Edited August 21, 2013 by CedricG (see edit history) Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted August 21, 2013 Bien vu CedricG. Je viens de mettre à jour le pack. Le background cliquable est faisable. Je m'y attèllerais dès que j'aurais un peu plus de temps devant moi. Share this post Link to post Share on other sites
ordimoy 0 Posted September 7, 2013 Léger, facile à mettre en place et gratuit, Background Manager est fait pour vous C'est ennuyeux de changer son fond d'écran à chaque nouvel évènement de l'année... j'ai donc développé ce module afin de gagner du temps. La code est basic mais donne la possibilité de changer de fond d'écran, de modifier sa position, sa répétition ou encore la couleur de la page de votre site. La traduction via l'admin est possible mais aucun fichier de langue n'est disponible dans le pack. Développé sur PrestaShop™ 1.5.4.1. ------------------------------------------------------------------------------------------------------------------------------ Light, easy and free to use, the background manager is for you It's so boring to change background's elements everytime (christmas, easter etc.) so I have developped this module to go faster. The code is basic but give you everything to manage your background css. The translation is enabled from the administration. Based on PrestaShop™ 1.5.4.1. ------------------------------------------------------------------------------------------------------------------------------ Aperçu / Preview Comment l'installer STP? Share this post Link to post Share on other sites
lesaonar 1 Posted September 19, 2013 (edited) Bonjour et merci pour ce module, qui facilite effectivement les changements (ou les tests). J'aurai tout de même une petite question : est-il possible de positionner à droite ET à gauche ? Car le résultat ne me plait pas trop tel quel, même si je dois faire des modifications manuelles. http://www.musicasens.com/ J'ai corrigé en mettant mosaïque (quel âne je fais), et en mettant une couleur de fond à ma page. Edited September 19, 2013 by lesaonar (see edit history) Share this post Link to post Share on other sites
SBR22 3 Posted September 25, 2013 Sous prestashop 1.4.6.2 cela marche nickel http://www.moto-parts.be/fr/ Merci pour cette contrib 1 Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted September 27, 2013 (edited) Merci à toi SBR22. J'espère que tu me feras une promo sur les pièces quand je devrais compléter ma R6 Edited September 27, 2013 by Gunnar Jensen (see edit history) Share this post Link to post Share on other sites
benjamin utterback 858 Posted November 20, 2013 Hello, Gunnar Jensen are you able to confirm that the changes made allow this module to be compatible to 1.5.6 and that the module was not compatible before? Thank you! Share this post Link to post Share on other sites
Loneildo 0 Posted November 22, 2013 Excellent module ! Encore merci pour ce boulot. Share this post Link to post Share on other sites
acc 1 Posted November 24, 2013 marche nickel sur 1.5.6.1 merci Share this post Link to post Share on other sites
neoset 11 Posted November 24, 2013 (edited) Testé sur la version 1.1 et 1.5.6.1 Jusqu'ici tout va bien, dites que vous avez besoin de modifier quelques lignes mais fonctionne bien pour moi. Ne pas enregistrer le texte dans le menu déroulant "Do you want to fix it?" une fois modifiés, mais les changements que j'ai faits. Tested on version 1.1 and 1.5.6.1 far so good, say you need to modify a couple of lines but works for me well. Do not save the text from the drop down "Do you want to fix it?" once changed but the changes I made. Désolé pour le langage. Sorry for the language. Edited November 24, 2013 by neoset (see edit history) Share this post Link to post Share on other sites
iAssist 1 Posted November 26, 2013 (edited) Excellent module, Merci beaucoup pour cette contributio. Fonctionne parfaitement sur ma 1.5, si vous souhaitez voir le résultat : http://www.iassist.fr Lors du changement d'une image ou d'un réglage de pas oublier en effet de vider le cache... Edited November 26, 2013 by ecrandeco (see edit history) Share this post Link to post Share on other sites
vinzter 8 Posted November 26, 2013 (edited) Bonsoir excellent module, Pour la version 1.5.6.1 j'ai modifié le fichier backgroundmanager.php comme suit afin de supprimer les noticed et les warnings Les modifications ont lieu aux lignes 10, 41, 137, 161, 162, 163 du fihier original pour arriver à ce résultat : <?php // Lock external access if( !defined( '_PS_VERSION_' ) ){ exit; } // Let's class it ! class BackgroundManager extends Module{ private $thumb_name = 'background_thumb.jpg'; private $background_name = 'background.jpg'; private $upload_directory = 'images/backgrounds/'; // Get modules informations public function __construct(){ $this->name = 'backgroundmanager'; $this->tab = 'BackgroundManager'; $this->version = "1.1"; $this->author = 'Gunnar Jensen'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Background Manager'); $this->description = $this->l('Module to manage the backgrounds of your website'); $this->confirmUninstall = $this->l('Delete this module ?'); } // Setup public function install(){ // Set hooks if( !parent::install() || !$this->registerHook( 'header' ) ){ return false; } else { return true; } // Set variables if( !Configuration::updateValue( 'current_background', '' ) || !Configuration::updateValue( 'thumb_background', '' ) || !Configuration::updateValue( 'background_place', '' ) || !Configuration::updateValue( 'background_repeat', '' ) || !Configuration::updateValue( 'background_position', '' ) ){ return false; } else { return true; } } // Add css and js public function hookHeader( $params ){ $this->context->controller->addCSS($this->_path.'css/backgroundmanager.css'); //Tools::addCSS( ( $this->_path ) . 'css/backgroundmanager.css', 'all' ); //Tools::addJS( ( $this->_path ) . 'js/color/jscolor.js', 'all'); } // Uninstall public function uninstall(){ // Delete Background if( Configuration::get( 'current_background' ) != '' ){ unlink( dirname( __FILE__ ) . '/' . $this->upload_directory . $this->thumb_name ); } // Delete Thumb if( Configuration::get( 'thumb_background' ) != '' ){ unlink( dirname( __FILE__ ) . '/' . $this->upload_directory . $this->background_name ); } if( !parent::uninstall() || !Configuration::deleteByName( 'current_background' ) || !Configuration::deleteByName( 'background_place' ) || !Configuration::deleteByName( 'background_repeat' ) || !Configuration::deleteByName( 'thumb_background' ) || !Configuration::deleteByName( 'background_color' ) || !Configuration::deleteByName( 'background_position' ) ){ return false; } else { return true; } } // Admin content public function getContent(){ // Try to validate $this->_preProcess(); // Aoutch ! This is done to dodge the end of _html // Position form $center = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $center = ( $center == 'center center' ) ? 'selected="selected"' : '' ; $top = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $top = ( $top == 'top' ) ? 'selected="selected"' : '' ; $bottom = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $bottom = ( $bottom == 'bottom' ) ? 'selected="selected"' : '' ; $left = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $left = ( $left == 'left' ) ? 'selected="selected"' : '' ; $left_top = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $left_top = ( $left_top == 'left top' ) ? 'selected="selected"' : '' ; $left_bottom = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $left_bottom = ( $left_bottom == 'left bottom' ) ? 'selected="selected"' : '' ; $right = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $right = ( $right == 'right' ) ? 'selected="selected"' : '' ; $right_top = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $right_top = ( $right_top == 'right top' ) ? 'selected="selected"' : '' ; $right_bottom = ( @$_POST[ 'background_place' ] ) ? $_POST[ 'background_place' ] : Configuration::get( 'background_place' ); $right_bottom = ( $right_bottom == 'right bottom' ) ? 'selected="selected"' : '' ; // Repeat form $horizontal = ( @$_POST[ 'background_repeat' ] ) ? $_POST[ 'background_repeat' ] : Configuration::get( 'background_repeat' ); $horizontal = ( $horizontal == 'repeat-x' ) ? 'selected="selected"' : '' ; $vertical = ( @$_POST[ 'background_repeat' ] ) ? $_POST[ 'background_repeat' ] : Configuration::get( 'background_repeat' ); $vertical = ( $vertical == 'repeat-y' ) ? 'selected="selected"' : '' ; $mozaic = ( @$_POST[ 'background_repeat' ] ) ? $_POST[ 'background_repeat' ] : Configuration::get( 'background_repeat' ); $mozaic = ( $mozaic == 'repeat' ) ? 'selected="selected"' : '' ; // Position $position_fix = ( @$_POST[ 'background_position' ] ) ? $_POST[ 'background_position' ] : Configuration::get( 'background_position' ); $position_fix = ( $position_fix == 'fixed' ) ? 'selected="selected"' : '' ; // Display content $this->_html.= ' <link href="' . $this->_path . 'css/admin.css' . '" type="text/css" media="all" /> <script type="text/javascript" src="' . $this->_path . 'js/color/jscolor.js' . '"></script> <h2 style="width:auto;padding:10px 10px 10px 10px;background:#394049;color:#fff;margin:0 0 50px 0;">'.$this->displayName . '</h2> <form id="background_settings" class="width3" style="margin:auto auto 40px auto;" method="post" action="' . $_SERVER[ 'REQUEST_URI' ] . '" enctype="multipart/form-data">'; if( Configuration::get( 'thumb_background' ) != '' ){ $this->_html.= ' <fieldset style="margin:0 0 10px 0;"> <legend> <img src="../img/admin/cog.gif" />' . $this->l('Preview') . ' </legend> <img src="' . Configuration::get( 'thumb_background' ) . '" /> </fieldset> '; } $this->_html.= ' <fieldset> <legend> <img src="../img/admin/cog.gif" />' . $this->l('Settings') . ' </legend> <div class="clear"></div> <label for="background">' . $this->l('Select your background') . ' : </label> <div class="margin-form"> <input type="file" id="background" name="background" value="" /> </div> <label for="background_place">' . $this->l('Define the position') . ' : </label> <select id="background_place" name="background_place" style="width:220px;"> <option value="">' . $this->l('None') . '</option> <option value="center center" ' . $center . ' >' . $this->l('Center') . '</option> <option value="top" ' . $top . ' >' . $this->l('Top') . '</option> <option value="bottom" ' . $bottom . ' >' . $this->l('Bottom') . '</option> <option value="left" ' . $left . ' >' . $this->l('Left') . '</option> <option value="left top" ' . $left_top . ' >' . $this->l('Left - Top') . '</option> <option value="left bottom" ' . $left_bottom . ' >' . $this->l('Left - Bottom') . '</option> <option value="right" ' . $right . ' >' . $this->l('Right') . '</option> <option value="right top" ' . $right_top . ' >' . $this->l('Right - Top') . '</option> <option value="right bottom" ' . $right_bottom . ' >' . $this->l('Right - Bottom') . '</option> </select> <br /><br /> <label for="background_position">' . $this->l("Do you want to fix it ?") . ' : </label> <select id="background_position" name="background_position" style="width:220px;"> <option value="">' . $this->l('No, thanks') . '</option> <option value="fixed" ' . $position_fix . ' >' . $this->l('Please, fix my background') . '</option> </select> <br /><br /> <label for="background_repeat">' . $this->l('Repeat') . ' : </label> <select id="background_repeat" name="background_repeat" style="width:220px;"> <option value="no-repeat">' . $this->l('None') . '</option> <option value="repeat-x" ' . $horizontal . '>' . $this->l('Horizontal') . '</option> <option value="repeat-y" ' . $vertical . '>' . $this->l('Vertical') . '</option> <option value="repeat" ' . $mozaic . '>' . $this->l('Mozaic') . '</option> </select> <br /><br /> <label for="background_repeat">' . $this->l('Select the background color') . ' : </label> <input id="background_color" name="background_color" style="width:220px;" class="color" value="' . Configuration::get( 'background_color' ) . '"> <br /><br /> <input type="submit" name="save" value="'.$this->l('Submit').'" class="button" style="width:100%;" /> <br /><br /> <input type="submit" name="background_delete" value="'.$this->l('Delete the background').'" class="button" style="width:100%;background:#FFDDDE;" /> </fieldset> </form> '; return $this->_html; } // Form treatment private function _preProcess(){ //$thumb_name = 'background_thumb.jpg'; //$background_name = 'background.jpg'; //$upload_directory = 'images/backgrounds/'; if( Tools::isSubmit( 'save' ) ){ // If loaded background if( isset( $_FILES[ 'background' ] ) && $_FILES[ 'background' ][ 'name' ] != '' && $_FILES[ 'background' ][ 'size' ] != 0 && $_FILES[ 'background' ][ 'error' ] == 0 ){ include_once( 'libs/Zebra_Image.php' ); // Thumb $thumb_image = new Zebra_Image(); $thumb_image->source_path = $_FILES[ 'background' ][ 'tmp_name' ]; $thumb_image->target_path = dirname( __FILE__ ) . '/' . $this->upload_directory . $this->thumb_name; $thumb_image->jpeg_quality = 100; $thumb_image->preserve_aspect_ratio = true; $thumb_image->resize( 572, 184, ZEBRA_IMAGE_CROP_CENTER ); Configuration::updateValue( 'thumb_background', $this->_path . $this->upload_directory . $this->thumb_name ); // Wallpaper $image = new Zebra_Image(); $image->source_path = $_FILES[ 'background' ][ 'tmp_name' ]; $image->target_path = dirname( __FILE__ ) . '/' . $this->upload_directory . $this->background_name; $image->jpeg_quality = 100; $image->preserve_aspect_ratio = true; $image->resize(); Configuration::updateValue( 'current_background', $this->_path . $this->upload_directory . $this->background_name ); } // Set bg position if( $_POST[ 'background_place' ] != Configuration::get( 'background_place' ) ){ Configuration::updateValue( 'background_place', addslashes( $_POST[ 'background_place' ] ) ); } // Set bg repeat if( isset( $_POST[ 'background_repeat' ] ) && $_POST[ 'background_repeat' ] != Configuration::get( 'background_repeat' ) ){ Configuration::updateValue( 'background_repeat', addslashes( $_POST[ 'background_repeat' ] ) ); } // Set bg color if( isset( $_POST[ 'background_color' ] ) && $_POST[ 'background_color' ] != Configuration::get( 'background_color' ) ){ Configuration::updateValue( 'background_color', addslashes( $_POST[ 'background_color' ] ) ); } // Set bg position if( isset( $_POST[ 'background_position' ] ) && $_POST[ 'background_position' ] != Configuration::get( 'background_position' ) ){ Configuration::updateValue( 'background_position', addslashes( $_POST[ 'background_position' ] ) ); } // Update CSS $background_position = ( Configuration::get( 'background_position' ) ) ? 'background-attachment:fixed;' : '' ; $color = ( Configuration::get( 'background_color' ) != '' ) ? Configuration::get( 'background_color' ) : 'transparent' ; $css_file = dirname( __FILE__) . '/css/backgroundmanager.css'; $handle = fopen( $css_file, 'w'); $style = "html,body{ background: " . $color . " url( '" . Configuration::get( 'current_background' ) . "' ) " . Configuration::get( 'background_place' ) . ' ' . Configuration::get( 'background_repeat' ) . ";" . $background_position . " }"; fwrite( $handle, $style ); fclose( $handle ); // ------------------------------------------ $this->_html .= ' <div class="conf confirm"> <img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'; $this->_html .= $this->l( 'Background enregistré' ); $this->_html .= '</div>'; } elseif( Tools::isSubmit( 'background_delete' ) && Configuration::get( 'current_background' ) != '' ){ // Erase picture unlink( dirname( __FILE__ ) . '/' . $this->upload_directory . $this->thumb_name ); unlink( dirname( __FILE__ ) . '/' .$this->upload_directory . $this->background_name ); Configuration::updateValue( 'current_background', '' ); Configuration::updateValue( 'thumb_background', '' ); } } } ?> La version d'ardi85 peut aussi fonctionner si on corrige la ligne 209 en remettant le code original de cette ligne. Et bien sur il faut aussi modifier le fichier xml pour mettre à jour la version en 1.1 et non 1.0 En tout cas ces modifications corrigent l'affichage des problèmes "noticed" et "warnings" qui s'affichent quand j'active le mode développeur. Cordialement Vincent Edited December 30, 2013 by vinzter (see edit history) Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted November 28, 2013 (edited) Bonjour tout le monde et merci pour vos remarques. Malheureusement je ne suis plus sur Presta depuis un petit moment et je ne peux pas adapter mon code en version 1.5.6 tout de suite (désolé). D'après Neoset il passe quand même sous cette version. Sinon regardez les patchs provisoires proposés en attendant. Community Jedi : I don't have the time to check it right now but I tell it to you as soon as possible (and I'll prepare a new version). Edited November 28, 2013 by Gunnar Jensen (see edit history) Share this post Link to post Share on other sites
cockpitinferno 25 Posted November 28, 2013 merci pour ton module, marche nickel sur 1.5.6 Share this post Link to post Share on other sites
neoset 11 Posted December 3, 2013 Eh bien, ma version originale de Gunnar me fonctionne parfaitement sur 1.5.6.1. Ce module est destiné à l'origine 1.5.4.1. Non, parce que vous devez modifier. Php du module. Share this post Link to post Share on other sites
Gunnar Jensen 5 Posted December 3, 2013 Merci pur vos retours ( Neoset & Cockpitinferno ). Donc à priori pas besoin d'update pour le moment Share this post Link to post Share on other sites
neoset 11 Posted December 3, 2013 (edited) Après plusieurs essais, j'ai remarqué que le module d'origine + modification de backgroundmanager.php de Vinzter fournit plus de fluidité dans le Front Office. Aborde également la question de "Do you want to fix it?" et maintenant il enregistre le texte dans le menu déroulant. Ces changements éprouvés dans la version 1.5.6.1 Une salutation. Edited December 3, 2013 by neoset (see edit history) Share this post Link to post Share on other sites
stephrose 0 Posted December 29, 2013 (edited) Bonjour, merci au développeur. Pour ma part v1.5.6.1, le module ne reconnait pas l'image sur le front-office, alors que dans le back-office, j'ai un aperçu de l'image. J'ai remplacé le code du .php par celui de vinzter : erreur de syntaxe et une classe manquante. en remplaçant ensuite dans le .xml le numéro de version : plus d'erreur. (ne pas faire la blonde : et bien remplacer après CDATA le n° de version) idem au code non modifié : image reconnu dans le background et non afficher dans le FO, si ce n'est avec un point d'interrogation" vérif sur mozilla et chrome. Par avance merci. Edited December 29, 2013 by stephrose (see edit history) Share this post Link to post Share on other sites
savana 0 Posted January 22, 2014 Merci pour ce module, marche très bien sur la v 1.5.2 Share this post Link to post Share on other sites
LoganTPC 0 Posted February 13, 2014 Merci pour ce fabuleux module qui fait gagner pas mal de temps lors des tests !J'ai jsute un petit souci pour ma part, car il fonctionne tres bien sur chrome, mais pas sur firefox.. cela fait il ca chez quelqu'un d'autre ? Monsite.fr Share this post Link to post Share on other sites
ThibZero 2 Posted March 18, 2014 Bonjour, un grand merci pour ce module Merci pour ce fabuleux module qui fait gagner pas mal de temps lors des tests !J'ai jsute un petit souci pour ma part, car il fonctionne tres bien sur chrome, mais pas sur firefox.. cela fait il ca chez quelqu'un d'autre ? Monsite.fr J'utilise prestashop 1.5.4.1 et le module fonctionne parfaitement, j'ai testé Chrome, Firefox et internet explorer, je viens d'ailleurs de m'apercevoir qu' IE prend enfin en compte le border radius Mon site Peut-être un problème avec un autre module? Share this post Link to post Share on other sites
belladona 3 Posted March 29, 2014 Salut à tous, Merci pour avoir créé ce module, je l'ai apprécié sous 1.5.x Malheureusement il ne fonctionne plus sur 1.6.x, Il n'y a plus qu'à attendre que quelqu'un nous fasse le plaisir de l'upgrader. Cordialement, 1 Share this post Link to post Share on other sites
savana 0 Posted May 5, 2014 Oui je confirme qu'il ne marche plus sur 1.6 Share this post Link to post Share on other sites
vinzter 8 Posted May 5, 2014 (edited) Il marche chez moi sous 1.6 (avec mes modifs cités plus haut + des modifs sur le template). Quel template utilisez-vous ? Celui par défaut ? Edited May 5, 2014 by vinzter (see edit history) Share this post Link to post Share on other sites
sarah1998 0 Posted May 21, 2014 Salut à tous En effet pour la version 1.6 , le module ne fonctionne pas après l'avoir installé, aucune image n'apparait ni dans le back office, ni dans le front office. J' utilise le thème par défaut avec peu de modifications graphiques C'est dommage est ce que quelqu'un aurait une solution ou peut etre y aura t il une mise à jour de ce module ? Merci de vos réponse Share this post Link to post Share on other sites
Creastyle 17 Posted June 13, 2014 (edited) fonctionne impécablement bien sur 1.5.6.0 merci pour ce module et pour le travail que vous avez fait ! résultat ici : http://www.coque-perso.fr/ Edited June 13, 2014 by Myskin (see edit history) Share this post Link to post Share on other sites
Antonioni 0 Posted July 18, 2014 Bonjour, auriez vous un idée pour que je puisse modifier mon fond d écran en couleur simple et blanche.. Tout comme mon site il reste simplissime mais j'aimerai pouvoir modifier les couleurs avec l outils de personnalisation et le fond manuellement, afin qu'il reste blanc. Cordialement, http://oseduction.fr Share this post Link to post Share on other sites
vinzter 8 Posted July 26, 2014 (edited) Salut à tous En effet pour la version 1.6 , le module ne fonctionne pas après l'avoir installé, aucune image n'apparait ni dans le back office, ni dans le front office. J' utilise le thème par défaut avec peu de modifications graphiques C'est dommage est ce que quelqu'un aurait une solution ou peut etre y aura t il une mise à jour de ce module ? Merci de vos réponse Bonsoir, C'est parce que le module est surchargé par le css du configurateur de theme. Cordialement Edited July 26, 2014 by vinzter (see edit history) Share this post Link to post Share on other sites
peter_lang 1 Posted August 6, 2014 Hi i have installed your module. I have uploaded an image but i see only white background ... is there any entry with white bg? I am using the version 1.6 with the bootsthrap theme. thy for help Share this post Link to post Share on other sites
akornature 1 Posted October 3, 2014 Je suis trop deçu. Il marche pas en version 1.6 J'ai crue a mon sauveur... snif... Share this post Link to post Share on other sites
sastendanceshop 6 Posted October 3, 2014 Une version PS1.6 est t-elle prévu ? Cdlt 1 Share this post Link to post Share on other sites
mandine35 0 Posted November 9, 2014 Bonjour, Ce module fonctionne t-il sous Prestashop 1.5.3.1? Je ne suis pas pro et n'ose pas trop l'installer sans avoir d'avis. Merci d'avance ! Share this post Link to post Share on other sites
Sam42 6 Posted December 3, 2014 (edited) Bonjour les amis, Petit mail pour vous informer que j'ai effectué un test de ce module sous Prestashop 1.6 et il semble fonctionner. Il suffit de désactiver la couleur de l'arrière plan présent dans le fichier global css de votre thème. Pour ce faire : - Installer le module et configurer une couleur d'arrière plan - rendez-vous sur le fichier global css de votre thème www.maboutique.fr/thèmes/monthème/css/global.css ligne 5257 et modifier le "background" de "columns-container" en gardant uniquement "none". .columns-container { background: none;} En espérant que cela fonctionne pour vous. Cordialement. Edited December 3, 2014 by Sam42 (see edit history) Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted December 3, 2014 Bonjour Sam42 tu veux dire supprimer columns-container { background : ? Merci Amitiés Share this post Link to post Share on other sites
Sam42 6 Posted December 3, 2014 (edited) Bonjour G.Solidarité, Non juste mettre none après background comme suit: .columns-container { background: none; } Cordialement. Edited December 3, 2014 by Sam42 (see edit history) Share this post Link to post Share on other sites
Soyons Solidaire 249 Posted December 3, 2014 Merci du retour, Bien compris. Amitiés Share this post Link to post Share on other sites
robin71 1 Posted December 28, 2014 Hello, Ce module est il compatible avec le thème Endora ? Bonne année a tous Robin71 PS: 1.5.6.2 thème: Endora Site: http://www.helicoservices.com Share this post Link to post Share on other sites
gaiarome 1 Posted January 6, 2015 (edited) Bonjour, ayant eu envie mettre une image en fond, j'en ai choisi une puis ai chang d'ide et ai essayé d'en mettre une autre à la place: mon image ne change pas, malgré le fait que j'ai vidé le cache et viré manuellement le fichier changebackground-s1.jpg . J'ai installé ajd la version 1.6 et mon presta est version 1.6.0.9 Avez-vous une solution, une explication? Merci! Edited January 6, 2015 by gaiarome (see edit history) Share this post Link to post Share on other sites
N°6 26 Posted May 16, 2015 Bonjour, je confirme, cela fonctionne parfaitement. Merci pour cette contribution. Share this post Link to post Share on other sites
mpellerin 0 Posted June 30, 2015 Pour info il faut mettre à "none" dans le theme utilisé par le configurateur, c'est à dire si vous choisissez une couleur du thème configurator cela se traduit par l'utilisation de "thème5.css" par exemple et c'est là qu'il faut mettre "none" à la ligne pour la version 1.6.014 .header-container, .columns-container { background: none;}#header { background: none; Enjoy ! Share this post Link to post Share on other sites
rodric 0 Posted August 17, 2015 Bonsoir Fonctionne bien sur la 1.6.1 avec un thème theme_forest Génial un Grand merci Share this post Link to post Share on other sites
MissMaster 0 Posted September 18, 2015 Bonjour, Le fichier modifié du module c'est celui en page 1 du topic ? Bonjour G.Solidarité, Non juste mettre none après background comme suit: .columns-container { background: none; } Cordialement. Share this post Link to post Share on other sites
sthardust 0 Posted June 17, 2016 Bonjour, Sympa ce module mais en ce qui me concerne, sur le défault bootstrap de la V 1.6 de prestashop, il ne modifie que le footer. Auriez-vous une suggestion ? D'avance merci :-) Stéphane Share this post Link to post Share on other sites
optim56 1 Posted October 4, 2016 Bonjour, Il fonctionne très bien sur 1.6.1.4 mais je recherche à le rendre cliquable. Il faut modifier le css mais après dans quel fichier php rajouter une ligne avec le lien? Merci Share this post Link to post Share on other sites
Shivan666 0 Posted August 7, 2017 Merci Gunnar pour votre travail. Marche parfaitement sur presta 1.5.5 rien à dire Mais si d'aventure on peut rendre le background cliquable, pourquoi pas Share this post Link to post Share on other sites
Manu Mfashion 2 Posted June 16, 2018 Ce module semble ne pas fonctionner avec Prestashop 1.7.3.3 erreur http 500 J'ai dû le désactiver pour que mon site s'affiche à nouveau Share this post Link to post Share on other sites