Annonce

  •  » Styles
  •  » Problème affichage thème Stripped + jplayer

#1 2012-04-13 20:46:10

Pompon
Membre
Paris (FR)
2005-11-19
49

Problème affichage thème Stripped + jplayer

Hello,

Comme hurqalia dans son sujet "Problème Captcha et JPlayer avec Stripped", j'ai un souci d'affichage des vidéos avec le plugin jplayer (v.0.1) avec le thème Stripped (v.2.1.1) sous Piwigo (v.2.3.4).
RAS avec le thème préinstallé Sylvia.
Captures en pièces jointes.

Je préfère repartir sur un nouveau sujet plutôt que de continuer sur le sien qui traitait de deux problèmes.
Je préviens en parallèle par MP hurqalia & Zaphod (auteur du thème).


J'ai constaté qu'il n'y a avait pas de souci avec le thème Stripped Blue (v.2.2.1) et je suis parti à la recherche du code fautif.
Attention je n'y connais pas grand chose et même si j'ai réussi à corriger le problème, j'aimerai savoir si le résultat est propre au niveau du code...


-Dans le fichier themes/stripped/theme.css :

Mettre en commentaire ou supprimer :

Code:

.js #theImageAndTitle, .js #theImg, .js #imageTitleContainer {
  opacity:0;
  filter:alpha(opacity=0);
}

- Dans le fichier themes/stripped/js/scripts-tpp.js :

*Remplacer :

Code:

// Image autosize function inspired from Autosize Plugin (from cljosse)

  var img_ratio=image_w / image_h;

Par :

Code:

// Image autosize function inspired from Autosize Plugin (from cljosse)

  var img_W0=0;

  var img_H0=0;

  var img_ratio=0;

ET


*Remplacer :

Code:

  if (Image.length != 1) {
        if (TitleBox.length !=0) TitleBox.css("width","97%");
        return;
      }

      marge_inf = ImageContainer.height()-Image.height()+marge_inf;
      var win_height = Fenetre.height();
      var img_H = win_height - marge_sup - marge_inf;
      var max_H = img_H;

      
      if (img_H >= image_h) img_H = image_h;
      if (img_H <= Hmin) img_H = Hmin;

      var img_W = Math.round(parseFloat(img_H * img_ratio));
      

      var marge_image = ImageCadre.outerWidth() - Image.width();
/* à modifier */
      var ext_width;
      
      if (options.themeStyle == 'original') { ext_width = jQuery("#content").width();} else {ext_width = Fenetre.width();};
      var max_W = ext_width - marge_image - marge_cote * 2;
      
      if (img_W > max_W) {
        img_H = Math.round(parseFloat(max_W / img_ratio));
        img_W = max_W;
      }

Par :

Code:

if (Image.length != 1) {

        if (TitleBox.length !=0) TitleBox.css("width","97%");

        return;

      }

      

      var marge_inf = ImageContainer.height()-Image.height()+marge_inf_sup;

      var pos0 = jQuery(Image).offset();

      if (!pos0) return;

      var img_top = Math.round(parseFloat(pos0.top));

      var win_height = jQuery(window).height();

      var img_H = win_height - img_top - marge_inf;

      var max_H = img_H;

      

      if (img_W0==0){

        img_W0=Image.width();

        img_H0=Image.height();

        img_ratio=img_W0/img_H0;

      }



      if (img_W0 == 0) return;



      if (img_H >= img_H0) img_H=img_H0;

      if (img_H <= Hmin) img_H=Hmin;



      var img_W = Math.round(parseFloat(img_H * img_ratio));

      

      var max_W = jQuery("#content").width() - Image.outerWidth() + Image.width();

      if (img_W > max_W) {

        var img_H = Math.round(parseFloat(max_W / img_ratio));

        if (img_H <= Hmin) {

          img_H = Hmin;

          img_W = Math.round(parseFloat(img_H * img_ratio));

        } else {

          img_W = max_W;

        }

      }

Tests OK sur Firefox & Safari sur mac aussi bien sur les vidéos que les images.


Environnement mac et hébergement chez free.

Hors ligne

#2 2012-04-13 21:35:58

Zaphod
Former Piwigo Team
Toulouse
2006-11-13
2422

Re: Problème affichage thème Stripped + jplayer

Merci de t'intéresser au problème.

Si tu as un lien vers un exemple en live je suis preneur.

Parce que par exemple ce bout là :

Code:

.js #theImageAndTitle, .js #theImg, .js #imageTitleContainer {
  opacity:0;
  filter:alpha(opacity=0);
}

Est nécéssaire pour l'affichage sous IE (entre autres).

Stripped blue est basé sur une vieille version de stripped qui n'a pas évolué...

Hors ligne

#3 2012-04-13 22:47:03

Pompon
Membre
Paris (FR)
2005-11-19
49

Re: Problème affichage thème Stripped + jplayer

Lien vers une galerie de test envoyé par MP à Zaphod.

Je regarderai demain si le problème d'affichage est présent sur Windows également car je n'ai qu'un mac sous la main pour le moment...


Environnement mac et hébergement chez free.

Hors ligne

#4 2012-04-14 06:33:51

Pompon
Membre
Paris (FR)
2005-11-19
49

Re: Problème affichage thème Stripped + jplayer

Test sur Internet Explorer 8, pas exactement le même problème mais ce n'est pas le top (cf. capture).
Uniquement avec le thème Stripped.

Même souci d'affichage sur Firefox11 sur PC & sur mac ;-)


Environnement mac et hébergement chez free.

Hors ligne

  •  » Styles
  •  » Problème affichage thème Stripped + jplayer

Pied de page des forums

Propulsé par FluxBB

github twitter newsletter Faire un don Piwigo.org © 2002-2024 · Contact