Announcement

#1 2020-10-28 09:25:26

piwent
Member
2020-10-24
92

"Media Icons" plugin not working. Seems to be a theme problem.

Hello,

I have installed the Media Icons plugin. I have uploaded an mp4 video. It plays just fine (using Charlie's). However I am not seeing the video icon overlaying the thumbnail on the album or search results pages. In the Media Icon settings area I have all file types selected. In the advanced tab, the samples look as I expect them to.

I have tried with Modus, Smartpocket, and Bootstrap Darkroom. None work. I have also tried with a .wav file and .pdf. Nothing works.

EDIT: However it does work with Elegant, Kardoom and Clear.

Any help would be most appreciated. I have no idea how to trouble shoot themes. Even if you could just point me in the right direction, that would be great.

If there is another plugin that would work better (or work at all!) that would be great. It doesn't look like the author who started this thread has been back to it in years. On the plugin page it claims to work up to 2.10

    Piwigo 2.10.2
    Operating system: Linux
    PHP: 7.2.34 (Show info) [2020-10-28 01:17:27]
    MySQL: 5.7.28-log [2020-10-28 01:17:27]
    Graphics Library: ImageMagick 6.9.7-4

Last edited by piwent (2020-10-28 09:48:36)

Offline

 

#2 2020-10-28 10:39:23

piwent
Member
2020-10-24
92

Re: "Media Icons" plugin not working. Seems to be a theme problem.

OK, I was able to to some more digging.

In the Modus theme, where it doesn't work, this is what the code for the thumbnail looks like:


Code:

<li style=width:315px;height:144px>
<a href="picture.php?/339/category/15">
<img src="_data/i/upload/2020/10/27/pwg_representative/20201027233950-1cbeff0f-me.jpg" width=315 height=144 alt="BatchManagerPt01-Filters">
</a>
<div class=overDesc>BatchManagerPt01-Filters 
<span class=albSymbol title="posted on Tuesday 27 October 2020">✽</span></div>
</li>

And this is from Clear, where it does work:

Code:

<li> 
<span class="wrap1"> 
<span class="wrap2"> 
<a href="picture.php?/339/category/15"> 
<span class="media_icon media_icon_music_logo"></span>
<img class="thumbnail" media_icon="BatchManagerPt01-Filters.mp4" src="_data/i/upload/2020/10/27/pwg_representative/20201027233950-1cbeff0f-th.jpg" alt="BatchManagerPt01-Filters" title="Dimensions : 1920x878 - Filesize : 5565 KB"> 
</a> 
</span><span class="thumbLegend"> 
<span class="thumbName">BatchManagerPt01-Filters</span>
<img title="photos posted during the last 7 days" src="themes/default/icon/recent.png" alt="(!)">
</span>
</span> 
</li>

So it's obviously a theme thing, right?

Is this fixable? OR do I have to give up on the Modus theme? I really don't want to as it seems to be one of the most modern, and it can work on mobile.

Are some themes categorically different from others?

It looks like the icon gets placed there from a script that Media Icon adds in the header:

Code:

<script type="text/javascript">
  //Add Media Icon markups to thumbnails
  function media_icon_markup() {

      //Youtube
      $("img[media_icon^=youtube]").before('<span class="media_icon media_icon_youtube_logo"></span>');
      //Vimeo
      $("img[media_icon^=vimeo]").before('<span class="media_icon media_icon_vimeo_logo"></span>');
      //Dailymotion
      $("img[media_icon^=dailymotion]").before('<span class="media_icon media_icon_dailymotion_logo"></span>');
      //Wat
      $("img[media_icon^=wat]").before('<span class="media_icon media_icon_wat_logo"></span>');
      //Wideo
      $("img[media_icon^=wideo]").before('<span class="media_icon media_icon_wideo_logo"></span>');
      //Video
      $("img[media_icon$=webm]").before('<span class="media_icon media_icon_video_logo"></span>');
etc...

That script is present for both themes. But the span class doesn't get added in the Modus theme.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact