MG 2.2 Media Gallery 2.2 - Lightbox navigation, attachment mirroring and more!

lightbox_5.pngXenForo Media Gallery (XFMG) 2.2 sees a range of new features and improvements. Some of these are a result of new integrations with XenForo 2.2 itself, while others are exclusive new features to XFMG itself.

Lightbox navigation​

Starting with XenForo 2.2 we are introducing a brand new lightbox which as well as being a much improved user experience also affords us some flexibility in how and where we use the lightbox.

One such use case which we couldn't resist treating you to for XFMG 2.2 is of course navigating through media items in the media gallery. Before we get into it, this is what the experience looks like.


lightbox_1.png lightbox_2.png lightbox_3.png lightbox_4.png lightbox_5.png lightbox_6.png


The lightbox as used in the media gallery supports all media types including media embeds, video and audio.

By default the lightbox opens up a very useful sidebar which displays most of the information and functionality that you get if you go to the full media page. If you prefer not to view that information then you can collapse the sidebar. Sections within the sidebar can be expanded and collapsed as required and we remember your preferences here so only the relevant sections are displayed.

The lightbox will initially only contain the items from the current page but, as you can see in the video, you can continue navigating beyond the page you're on and we will load additional items from the subsequent page dynamically.

If you need to view the full media details and access the full functionality you just need to click the "New window" icon in the lightbox toolbar or click the caption of the image.

You can navigate through any media list in this way be that the list of media in an album or category, all media in the New media page or the entire media gallery via the media index.

We think this is an awesome way to navigate through the media gallery but if you prefer to keep things as they are (we won't be offended!) then you can disable it:

localhost_22x_admin.php_options_groups_xfmg_.png

We should also take this opportunity to note that all of the lightbox functionality you see here is a general concept baked into the core lightbox itself so should any add-on developers which to add a similar navigation or sidebar concept to their existing lightbox implementations then this should be fairly trivial to do.

Attachment mirroring​

For a very long time you have been telling us that you would like to have a slightly closer relationship between attachments in threads and posts and the media gallery, and the new "Attachment mirroring" system in XFMG 2.2 aims to somewhat bridge that gap. It starts with a forum-level or media category-level configuration:

localhost_22x_admin.php_media-gallery_categories_nature.4_edit.png

While viewing a media category you can pick which forums attachments are mirrored from...

localhost_22x_admin.php_forums_travel-and-nature-forum.2_edit.png

... and while viewing a forum you can pick which media category attachments are mirrored to.

Once you have specified which media category your forum should mirror attachments to, any attachments which are added to posts in that forum will be automatically created as media items in the specified gallery.

As an example, here is a post containing an image I have attached inside the "Travel and nature" forum:

1595337617664.png

And here it is now displayed in the media gallery:

localhost_22x_media_navagio-jpg.134_ (2).png

As you can see here we make display a clear reference to the fact that the media item originated from a particular thread with the "Originally posted in: Thread 'Travel photos'" line. Thins links and takes you straight back to the post where the attachment was originally posted.

While viewing the thread, we also make clear that the attachment has been also posted over in the media gallery too. Of course images open up in the lightbox and when you do so, the media information opens up in the sidebar with an additional link that links back to the full media gallery view if needed:


But what about all of those existing threads with great images you might want to bring over to the media gallery? We've added a rebuild which will take care of that for you:

1595339325217.png

This allows you to have old items that were not yet mirrored synced into the media gallery, plus it will move or remove items from the media gallery as applicable if you disable mirroring or change the target category.


But wait... there's more!​

In addition to these great features we have also added (or in the process of adding) support for the following previously announced XF 2.2 features including:
 

frm

Well-known member
So if you share the URL or copy and paste, or even just refresh the page when in the lightbox you end up back on the normal media item with no way to get the lightbox up again (from the page you're on)
It would be nice if it followed FB's behavior of loading the "regular" post view but quickly brought it into the lightbox.

Unsure if this is intentional in XF or just overlooked and requires a suggestion.

Apologies for this long URL...

 

Kintaro

Well-known member
We think this is an awesome way to navigate through the media gallery
Me too!
 

manicomio

Active member

Chris D

XenForo developer
Staff member
The first post was made before mirroring was enabled so it was never mirrored to the media gallery so it doesn’t have a media gallery to page and therefore no sidebar.
 

gib

Active member
Really liking the attachment mirroring :)

Not sure if it's a bug or an oversight, but when you upload photos into a mirrored forum, the metadata isn't shown in the lightbox sidebar.
If I upload the same image to the relevant media gallery, the photo's metadata shows up in the sidebar when I view it from the media gallery.

Is it only meant to be visible if uploaded to the media gallery ?
 

Chris D

XenForo developer
Staff member
That might be worth a bug report. Not certain we can do anything about it but we should look into it.
 

gib

Active member
That might be worth a bug report. Not certain we can do anything about it but we should look into it.
It's not a problem for me, just a little incosistency, really like the lightbox view option in media galleries, good job
 

manicomio

Active member
Too bad the sidebar activity (reactions, comments) doesn't get displayed on the lightbox while on mobile. While on mobile we can only see an image activty when going to the 'View media Item' link on the lightbox. I know real estate is tight but it feels like mobile only users will miss out.
 

RobinHood

Well-known member
I also observed that and was planning to make a few suggestions after thinking about it a bit more.

Son's version has a toggle when flipping through the lightbox to open the sidebar and engage with the media without leaving the lightbox which is works well and is needed for a good experience on mobile. Similar on facebook, although there an overlay loads up for the comments.

It could do with a way to react to the media from within the lightbox, an icon towards the bottom of the media. Similar to Instagram, facebook and Son's gallery.

It also throws me a how the comment order is reversed. Although I was waiting to try it a bit more before making any suggestions regarding that.
 

manicomio

Active member
It also throws me a how the comment order is reversed. Although I was waiting to try it a bit more before making any suggestions regarding that.
Yeah I don't know how I feel about that. Initial reactions was that it was bad but thinking about it more, in the context of a lightbox, I think it makes sense to have latest comment at the top. It minimizes scrolling.
 

RobinHood

Well-known member
Yeah I don't know how I feel about that. Initial reactions was that it was bad but thinking about it more, in the context of a lightbox, I think it makes sense to have latest comment at the top. It minimizes scrolling.
Although you could just do what the current profile post system does, and other social media sites is to collapse the first chunk of posts if there is a lot, and show just the recent few posts (or all the lasts posts since your last visit if it can be tracked), with the reply box at the bottom as usual.
 

manicomio

Active member
It could do with a way to react to the media from within the lightbox, an icon towards the bottom of the media. Similar to Instagram, facebook and Son's gallery.
Currently swiping behavior is, sideway scrolls through images, and up or down closes the lightbox. If closing the lightbox gets change to an X button then scrolling up or down could be set to scroll down to reactions and comments fully.

The more friction there is to comment and react the less engagement this feature will have. As it currently is needing to go to another page and breaking the thread consumption it won't be used. An Instagram style second action icon towards the bottom of the media, while better would still receive less engagement. Anything short of the full feature as in the desktop mode won't be used. Desktop mode behaves perfect and I can see lots of engagement coming from this.
 

manicomio

Active member
Although you could just do what the current profile post system does, and other social media sites is to collapse the first chunk of posts if there is a lot, and show just the recent few posts (or all the lasts posts since your last visit if it can be tracked), with the reply box at the bottom as usual.
Yes I agree this would be the ideal and most expected behavior for users. And the bold part would be awesome.
 

Alpha1

Well-known member
But what about all of those existing threads with great images you might want to bring over to the media gallery? We've added a rebuild which will take care of that for you:
Is there a cli rebuild for this as well? We have a lot of attachments.
 

Chris D

XenForo developer
Staff member
It is not currently a CLI rebuild. You should suggest it so we can keep that in mind. Please also include in that your actual use case, i.e. how many forums you will mirror attachments to, how many attachments you expect to be mirroring, into how many gallery categories etc.
 

Alpha1

Well-known member
To give you an idea now: My XFRM categories match my forum nodes. I want to match 190 forum nodes to 190 XFMG categories.
 

Alpha1

Well-known member
You should suggest it so we can keep that in mind.
Are suggestions still appreciated? I see that 'most solutions' has been added to notable members, but nothing about suggestions. No most suggestions, most suggestion votes, nor most implemented suggestions. it seems that answers are now valued much higher than suggestions. Do you prefer people to switch from suggestions to answering questions?
 
Top