e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 214 forks source link

Gallery slideshow not work #4930

Open fizi opened 1 year ago

fizi commented 1 year ago

I use this menu and call it directly to theme: {MENU: path=gallery/slideshow} The images appears but I can't change the categories in admin area. (only one categories images appears) I think the menu or shortcode wrong. Thanks help!

tgtje commented 1 year ago

@fizi quick question : assuming you created a new category, did you also add 'a' image to this gallery ? ( an image may belong to more than 1 category > via mediamanager> edit).

git version php 8.x ; no issues

Jimmi08 commented 1 year ago

This is query for category 3:

SELECT * FROM e107_core_media WHERE `media_category` REGEXP '(^|,)gallery_image|gallery_3|gallery_image_3(,|$)' 
        AND `media_userclass` IN (253,254,250,251,0) 
        AND `media_type` LIKE 'image/%'  ORDER BY media_id DESC LIMIT 0 ,16;

Result: image

As you see, it displays category 2 .

fizi commented 1 year ago

Yes, the categories have the images.

tgtje commented 1 year ago

doesn't tell me what you did helas : i make it visible :

https://user-images.githubusercontent.com/1811857/209405064-d59b618e-10be-49a8-86f0-78a9d5633214.mp4

setting

intn

tgtje commented 1 year ago

gallall tested both system menu manager add to area and in layout used your {MENU: path=gallery/slideshow}

fizi commented 1 year ago

The category for all images selected, but images of the selected category (on admin) not appears. Only one category's images appears. I don't know why? I made everything. Not work for me.

Jimmi08 commented 1 year ago

@tgtje always all images are displayed. try to put one image to new gallery category and select this category in slideshow prefs.

@fizi you didn't anything wrong. There is error in regex used in query because category value (string) is not correct.

fizi commented 1 year ago

It seems the problem in the portfolio too. I set the category in the shortcode but not change the category.

fizi commented 1 year ago

I modified the eshortcode.php file: `$list = e107::getMedia()->getImages('galleryimage|gallery' . $this->sliderCat . '|galleryimage' . $this->sliderCat. '|galleryfile' . $this->sliderCat. '|galleryvideo' . $this->sliderCat, 0, $limit, null, $orderBy);` I don't know right or not but work for me.

But.... the slideshow gallery not responsive. How make the {GALLERY_SLIDES=4} for the breakpoint 1200px {GALLERY_SLIDES=3} for breakpoint 979px {GALLERY_SLIDES=2}?

And Why the caption always "Gallery" and not the subcategory name (example: "Team")?