Announcement

  •  » Extensions
  •  » Menu Random Photo - image types

#1 2019-03-04 19:32:29

Jonic
Member
2012-11-10
9

Menu Random Photo - image types

Hi all,

Currently I'm building a new site. I like to use the"Menu Random Photo" extension. It works great.

But I would like to display only image's no PDF's, movies etc.

Is there a way to do this?

Piwigo version: 2.9.4
PHP version: 7.2.1
MySQL version: 5.5.5-10.1.37-MariaDB


Jonic.

Offline

 

#2 2019-05-27 18:40:58

WuppiGER
Member
Germany
2016-05-31
38

Re: Menu Random Photo - image types

Same problem ... Thumbs for Videos ... i have a Workaround for this.
In DB-Table piwigo_images you have an col with name "representative_ext". On PICTURES there filled with NULL, on my MOVIES: JPG.

I use this for my workaround:

open:
plugins/MenuRandomPhoto/main.inc.php
(BEFORE: MAKE BACKUP!!!)

find:

Code:

WHERE i.level<='.$user['level'];

(~line 185!)

insert between "WHERE" and "i":

Code:

i.representative_ext IS NULL AND

This now your Line:

Code:

$sql['where'] = 'WHERE i.representative_ext IS NULL AND i.level<='.$user['level'];

Please give me feedback if this work / don't work. I have only 2 Videos on my gallery - hard to test *G*

Offline

 
  •  » Extensions
  •  » Menu Random Photo - image types

Board footer

Powered by FluxBB

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