MG 2.2 Get rid of "Share this media" block

PapaTango

Member
I am having an issue with something that 'ought' to be managed in sidebar block preferences. In both the gallery views, and individual image lightbox side navigation, we have this thing:

share media box.webp

I can find no control to make them go away. Attempts to edit the 'xfmg_album_view' template by removing the macro instruction set disappeared it from the Gallery vies, but then threw server errors when templatebuilder.php went looking for the macro. It was still present on the individual image view.

This has to go away, as neither myself or my members want this info in everyone's face and ready for use/abuse. This will be a migration forum launch, and this is one of the last hurdles to production... :unsure:

Thoughts?
 
Brilliant! Thank you Brogan.

On Edit: I just checked the server error log, and once again 'templater.php' is upset over not being able to find the macro instruction for the share box. This is it, and it generates every time a gallery or individual image is accessed:

Template error: [E_USER_WARNING] Macro public:xfmg_media_view_macros:share_sidebar is unknown
  • 22 minutes ago
  • src/XF/Template/Templater.php:658
 
Last edited:
I also had to replicate this in xfmg_album_view by commenting out lines 493 to 526. Another error in templater.php is thrown for that.

Getting there, but considering there will be dozens to hundreds of such page calls in under an hour by users--that log could get really clogged up...
 
I found my solution.


Thankfully, this does not throw errors!
 
Back
Top Bottom