[OzzModz] XFMG: Attachment Mirroring Album

[OzzModz] XFMG: Attachment Mirroring Album [Paid] 2.0.2 Patch Level 1

No permission to buy ($10.00)

Ozzy47

Well-known member
Ozzy47 submitted a new resource:

[OzzModz] XFMG: Attachment Mirroring Album - Mirror attachments to the Media Gallery album.

Addon comissioned by @Forsaken

Requirements:
XenForo Media Gallery 2.2.0+


Description:
Allows to mirror attachments directly to the Media Gallery album

Features:

  • Linking to existing and creating new mirroring albums (also available during content creation)
  • Multiple content linking to album (conveniently separated by tabs)
  • Mirroring existing attachments from existing content
  • Slider with latest media from linked album
...

Read more about this resource...
 
How does this work for existing showcase items? Would the addon enable mirroring for those items or would it only work for new attachments on showcase items?
 
How does this work for existing showcase items? Would the addon enable mirroring for those items or would it only work for new attachments on showcase items?
It has an option for existing attachments, as well as an option to automatically apply the linked album to linked discussions for Bob's add-ons.

The mirroring of existing attachments works for any of the currently supported content types, as I needed it for a pet thread and member picture thread.
 
Code:
#0 src/addons/OzzModz/XFMGAttachmentMirroringAlbum/ControllerPlugin/MediaAlbumMirror.php(88): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/vhosts...', 88, Array)
#1 src/addons/OzzModz/XFMGAttachmentMirroringAlbum/XenAddons/AMS/Pub/Controller/Category.php(43): OzzModz\XFMGAttachmentMirroringAlbum\ControllerPlugin\MediaAlbumMirror->applyMirrorAdd(Object(OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Service\ArticleItem\Create), Object(SV\ElasticSearchEssentials\XenAddons\AMS\Entity\ArticleItem))
#2 src/addons/XenAddons/AMS/Pub/Controller/Category.php(309): OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category->setupArticleCreate(Object(SV\ElasticSearchEssentials\XenAddons\AMS\Entity\Category))
#3 src/addons/OzzModz/XFMGAttachmentMirroringAlbum/XenAddons/AMS/Pub/Controller/Category.php(12): XenAddons\AMS\Pub\Controller\Category->actionAdd(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(352): OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category->actionAdd(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\AMS:C...', 'Add', Object(XF\Mvc\RouteMatch), Object(OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category), NULL)
#6 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category), NULL)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#9 src/XF.php(517): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Running into this error when I am making an article and am trying to mirror attachments while making the post.

I can work around it by publishing the post without mirroring or attachments, set up mirroring under thread options, and then editing and attaching attachments before publishing it.
 
Code:
#0 src/addons/OzzModz/XFMGAttachmentMirroringAlbum/ControllerPlugin/MediaAlbumMirror.php(88): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/vhosts...', 88, Array)
#1 src/addons/OzzModz/XFMGAttachmentMirroringAlbum/XenAddons/AMS/Pub/Controller/Category.php(43): OzzModz\XFMGAttachmentMirroringAlbum\ControllerPlugin\MediaAlbumMirror->applyMirrorAdd(Object(OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Service\ArticleItem\Create), Object(SV\ElasticSearchEssentials\XenAddons\AMS\Entity\ArticleItem))
#2 src/addons/XenAddons/AMS/Pub/Controller/Category.php(309): OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category->setupArticleCreate(Object(SV\ElasticSearchEssentials\XenAddons\AMS\Entity\Category))
#3 src/addons/OzzModz/XFMGAttachmentMirroringAlbum/XenAddons/AMS/Pub/Controller/Category.php(12): XenAddons\AMS\Pub\Controller\Category->actionAdd(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(352): OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category->actionAdd(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\AMS:C...', 'Add', Object(XF\Mvc\RouteMatch), Object(OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category), NULL)
#6 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\XFMGAttachmentMirroringAlbum\XenAddons\AMS\Pub\Controller\Category), NULL)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#9 src/XF.php(517): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Running into this error when I am making an article and am trying to mirror attachments while making the post.

I can work around it by publishing the post without mirroring or attachments, set up mirroring under thread options, and then editing and attaching attachments before publishing it.

Should be fixed in the latest version.
 
I love how this works on the thread level, but it would be amazing if this could be expanded to support categories too.

On my site, we attend car shows, so I'll create a new media category for each show and everyone uploads there.

There is also a show discussion thread and invariably people will attach images to it, so it would be great if they could be auto mirrored to the gallery category.

The built in xenforo mirroring is no good as I don't wanna mirror the whole node, just single threads.
 
This seems to have some bugs to be ironed out

  • Adding existing thread to an album doesn't seem to import attachments? (had Mirror existing attachments checked)
    • It is supposed to mirror all attachments right? not just from e.g. OP user?
  • When 2 threads are added to album it shows one of them double, and links also point to same
    1667399811578.png
    • And when visiting thread 2 it doesn't show others?
      1667399915467.png
 
Would it be possible to mirror threads also into categories (like the core XF functionality does it) instead of only allowing albums? :)
 
Appreciate it :) 👍

I decided to look into it and at least the tabs issue seems to be due to getContainer() in src/addons/OzzModz/XFMGAttachmentMirroringAlbum/AlbumMirror/AbstractHandler.php that reuses the container if it has already been defined, which seems to make it get stuck on a single thread entity..
 
To get thread view to show all mirrors in the tab-group, the template modification ozzmodz_xfmgama_thread_view_tab needs to pass all mirrors, as well as current page id for it to work..

Currently it seems to only pass the thread itself rather than all mirror-items added to the album.
 
Would it be possible to mirror threads also into categories (like the core XF functionality does it) instead of only allowing albums? :)
I'd totally buy this addon if it could do that (I don't use Albums at all) :)

Car show season is a coming now, so it would be great to have this done by then!
 
But there is a small nuance: current XFMG mirror manager completely dependent on media gallery categories.

So we can either link attachments to albums in the Category with type "Albums only", or create own Mirror manager & creator but it will be completely incompatible with other add-ons also many functions will be overridden.

This was the reasons for doing albums, and not supporting categories.
 
Top Bottom