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:
 
Do XFMG usergroup quota's have any effect on mirroring?

For example what happens when a user posts attachments after they have already maxed out their XFMG quota?
 
@Mike @Chris D Thanks for confirming, having multiple pointers to the same physical file is great news. :) Just one train of thought at the moment... are there any exposed options where we can specify for which attachments are to be mirrored or is it 'the whole node or nothing'? Is the function where the mirroring takes place exposed so add-ons can inject their own logic if wanted?

The above comes out of the users inserting their own 'reaction' type GIFs or smilies and those would not want to be mirrored to MG. With the popularity of Giphy, for example, even some of our older users are inserting 'reaction GIFs' into their posts and it'd be nice to be able to have some criteria like 'do not mirror certain file types like GIF extension and/or files that have dimensions lowers than X'.
 
This is really great. I wasn't even sure if I would continue using XFMG in the future, but attachment mirroring is a real game changer.

Features like these — which help expose/surface/segment valuable data posted inside our forums — are the types of modern functionality that forums desperately need. Hoping to see even more in the future. 👍
 
Yes but that doesn’t get negated by the fact that the duplicate URLs are necessary for the reasons already mentioned.
I've posted a suggestion to have canonical URLs for attachments:
 
You guys knocked this out of the park. ⚾ Love it!. Also, the new Lightbox nav adds so much to the viewing pleasure. :)
 
mostly

I was talking about YouTube videos, for example. I just tested it in the test forums and unfortunately, it does not seems to share the same attributes as attachment images
 
Last edited:
Youtube videos... are hosted on Youtube. How do you expect it to be magically on your Media Gallery?
 
Youtube videos... are hosted on Youtube. How do you expect it to be magically on your Media Gallery?
I get it. It would be kinda interesting to be able to browse YouTube embeds across your site. But yeah, not what this is going for.
 
Ah, I see. The update says "attachment mirroring", so I was thinking from that angle as it pretty much is obvious what it does.

A YouTube gallery mirroring is a different thing though, but it could be interesting, yes.
 
A YouTube gallery mirroring is a different thing though, but it could be interesting, yes.
This is getting into the territory of embedded media not just YT. All embeds including images. Could get messy I like what it does, for now.
 
I suppose that could get unwieldy if there's 1000s of albums but it could use public albums an admin created, but I won't suggest it. I'm happy to see this and will try it with cats. Thanks!
 
Last edited:
Sooooo pleased to see these improvements and to see the gallery get some love again.

The new lightbox is a massive improvement.

One issue I have noticed though, is that in the gallery it seems the URL defaults to the normal media, not the lightbox version.

There is also no way to trigger the lightbox for the album the media is in, when you're on the full media page for that item.

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)

Son's gallery seems to get around this by defaulting to the lightbox version and adding a ?regular=1 query string to break out of the lightbox if you need to view the regular page. There is also then an instagram style row of icons below the image to provide image interaction including one to expand the lightbox again.

I'll make some separate suggestions regarding this and other things, and not sure if the current system is as designed or an over site, or if there's any more HYS due for the add ons, just making the observation that the current setup doesn't seem to have a way to easily move between the lightbox and the normal page for an item, which seems like something that would be very useful / kind of needed.
 
Top Bottom