J'ai été ravi de trouver un portage de ce thème pour le travail (on va passer de phpBB 3.1.6 an 3.2.7).
Par contre l'ancien administrateur avait modifié l'image logo_hd.png et l'image était bien plus grande.
En analysant le style, je me rend compte que le logo est défini comme suit :
- Code: Tout sélectionner
<a id="logo" class="logo" href="./index.php?sid=55db9d231dba52fed5e98bdb70e4f4b2" title="Accueil"><img src="./styles/basic_darkblue/theme/images/logo_hd.png" data-src-hd="./styles/basic_darkblue/theme/images/logo_hd.png" alt="Forum xxxxx" style="width: 136px;"></a>
or dans le style / template, il n'y a pas style="width: 136px;", je ne sais pas d'où le navigateur sort ça !!
Quand je le retire tout est bon. Comment patcher le thème pour supprimer ce problème ?
PS : oui je sais ce n'est pas bien de modifier un thème mais dans les entreprises les gens font ce qu'ils peuvent puis ils partent et on doit faire avec...
EDIT : c'est bon, j'ai trouvé : j'ai modifié la fonction function replaceImage() dans "basic\template\forum_fn.js", mis en commentaire le $this.css('width', (img.naturalWidth ? img.naturalWidth : img.width) + 'px');
- Code: Tout sélectionner
/** * HD images */ if (window.matchMedia && window.matchMedia('(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 1.5dppx)').matches) { $container.find('img[data-src-hd]').each(function() { var img = this, $this = $(this), hdImage = new Image(), hdLoaded = false, normalLoaded = false; function replaceImage() { /* $this.css('width', (img.naturalWidth ? img.naturalWidth : img.width) + 'px'); */ img.setAttribute('src', img.getAttribute('data-src-hd')); } if (img.complete) { normalLoaded = true; } else { img.onload = function() { if (normalLoaded) { return; } normalLoaded = true; if (hdLoaded) { replaceImage(); } }; } hdImage.onload = function() { hdLoaded = true; if (normalLoaded) { replaceImage(); } }; hdImage.src = img.getAttribute('data-src-hd'); }); }