Masonry Image Gallery

Ha ha :grinning_face_with_smiling_eyes:. But great that you solved it!

1 Like

Hi @Heddson,

Iā€™d like to second this request. Sometimes we have lots of images posted in one post and grid/masonry is not the best option for our forum. Is it possible to re-do the slick gallery component with the features you have in Masonry TC?

As I see, Masonry Image Gallery doesnā€™t play fine with Slick gallery TC as the images in slick gallery start showing as small thumbnails. Seems like Masontry component gets mixed into Slick component somehow.

Hereā€™s an example of Slick vs Masonry theme components conflict:

Hey! Havenā€™t had time to look at Slick TC, but will try do it.

3 Likes

Hey @Heddson

Currently there is a setting auto enabled categories to enable automatic Masonry Gallery in specific categories.
Could you add a similar setting such as auto disabled categories to disable automatic Masonry Gallery in specific categories? Happy to pay for the feature :slight_smile:

Is anyone else having an issue with the auto feature and empty lines in between images? Whenever there is an empty line, masonry gallery is not generated.

It has been that way a longer time now. I reckoned it just be that way, and it is not a bug :flushed:

Well, when apply the div tag manually, the issue doesnā€™t appear and masonry gallery is triggered despite the empty lines inbetween images.

Then it is a bug. Kind of.

Itā€™s not a bug, itā€™s by design. :sweat_smile:

The reasoning behind it was so you could force an image not to be part of the gallery (by adding an empty line). One situation could be in order to do something like this:


by adding:

![01|690x458](upload://7zW2bd5OUeGIz0oJoTcFvdiNfEc.jpeg) 

![02|333x500](upload://w6STfJO5Ie5MyIRC02ZFhXtmk1z.jpeg)
![03|397x500](upload://zwhs49h2t24IAOhSgmaDQa0PIEI.jpeg) 
![04|333x500](upload://islRhKn7yHfrg3N5CV6ZhPQfQP7.jpeg)

Anyways. I get that itā€™s perhaps not always the way you want it to behave, so I will add a setting to ignore empty lines.

That shouldnā€™t be to difficult to add, so I will add a setting for that as well.

Unfortunately I wasnā€™t able to reproduce your issue with Slick and Masonry.

Regarding Slick. I looked into it and it doesnā€™t seem to be possible to rewrite it the way I did with this TC. So that wonā€™t happen any time soon (unfortunately).

2 Likes

I just did rebuild and now I get this:

Any ideas?

1 Like

Hmm, thatā€™s strange. I didnā€™t do anything to the repoā€¦ Do you still get the error if you reinstall Masonry? Will check if I get the same issue on my own forum.

Error 500 when Iā€™m trying to install it.

Sounds like an issue of Discourse. You are using GitLab instead of GitHub ā€” can that be the problem now? Because it came after rebuilding to 2.9.0beta11 (208d22cfc2).

A temporary fix (to get it working) could be to download the zip from gitlab and install it manually in discourse.

1 Like

Yeah, I know. I actually did it right after that error 500 :wink:
That went without issues, of course.

1 Like

Iā€™ve updated the component with settings for allowing empty lines between images and disabling categories (both for creating galleries automatically).

Donā€™t think that the GitLab bug has been fixed yet. So if you already updated Discourse, you probably need to get the zip from GitLab.

3 Likes

Tested it on beta11, works like a charm! :heart: :heart: :heart:

1 Like

Just wanted to say my community loves this component. Many of our topics are image-heavy and it takes the reading experience from painful to pleasant. So thank you!

2 Likes

Hello. This component does not work for a published page. Can this be configured somehow?

Yeah, itā€™s not possible to use it on published pages. Published pages does unfortunately not seem to run javascript (from theme components).

1 Like

I think developers should think about this issue. If there is a page publishing function, then for its full use it would be worth making appropriate additions to the forum code. Or are you saying itā€™s absolutely impossible?

1 Like