XF2 [8WR] XenMedio 2 (Media) PRO

XF2 [8WR] XenMedio 2 (Media) PRO [Paid] 2.1.1.5

No permission to buy ($40.00)
I took another pass at fixing Imgur display myself (since the addon dev is ignoring this specific addon for whatever reason) and came up with a solution.

For anyone else who wants to fix it themselves and has a moderate amount of ability (know how to create template modifications), the first thing to do is to add /gallery/ URL support. Save this as an XML file and import it under Services for the addon:
XML:
<?xml version="1.0" encoding="utf-8"?>
<service>
  <key>imgur_gallery</key>
  <type>gallery</type>
  <name>Imgur Gallery</name>
  <url><![CDATA[https://www.imgur.com/gallery/{sval1}]]></url>
  <regex><![CDATA[https?://[\w\.]*?imgur\.com/gallery/(?P<sval1>[\w%]+)]]></regex>
  <playlist><![CDATA[]]></playlist>
  <embed><![CDATA[<blockquote class="imgur-embed-pub" lang="en" data-id="a/{sval1}"></blockquote>
<script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>]]></embed>
  <callback>EWR\Medio\Api\Imgur</callback>
</service>


Then, add a template modification (if you don't know about this section of the Admin panel, maybe this isn't for you) for one of the ".less" templates; I'll be going for a random spot within "EWRmedio_media.less". I'll assume you're modifying that one, in which case have it Find:
CSS:
.input.medio-duration {
and Replace with:
CSS:
/* fix XenMedio imgur iframe underflow  */
div.medio-aspect-box.medio-svc-imgur, div.medio-aspect-box.medio-svc-imgur_gallery {
    padding-top: 5px;
    div.medio-aspect-body { top: auto; bottom: auto; left: auto; right: auto; position: relative; }
}

$0


Then, a set of template modifications to add a class to all instances of "medio-aspect-box" so they reference the service name, so the above CSS can properly apply to them. For all 4 template modifications, you will have it Find:
HTML:
<div class="medio-aspect-box">
Modification for Template "EWRmedio_media_macros", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$media.Service.service_key}">
Modification for Template "EWRmedio_media_edit_macros", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$media.Service.service_key}">
Modification for Template "approval_item_ewr_medio_media", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$content.Service.service_key}">
Modification for Template "report_content_ewr_medio_media", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$content.Service.service_key}">


After all of that, you'll have Imgur /gallery/ URLs also accepted, and for either those or the existing /a/ URLs you'll no longer have the "underflow" display problem.
 
I took another pass at fixing Imgur display myself (since the addon dev is ignoring this specific addon for whatever reason) and came up with a solution.

For anyone else who wants to fix it themselves and has a moderate amount of ability (know how to create template modifications), the first thing to do is to add /gallery/ URL support. Save this as an XML file and import it under Services for the addon:
XML:
<?xml version="1.0" encoding="utf-8"?>
<service>
  <key>imgur_gallery</key>
  <type>gallery</type>
  <name>Imgur Gallery</name>
  <url><![CDATA[https://www.imgur.com/gallery/{sval1}]]></url>
  <regex><![CDATA[https?://[\w\.]*?imgur\.com/gallery/(?P<sval1>[\w%]+)]]></regex>
  <playlist><![CDATA[]]></playlist>
  <embed><![CDATA[<blockquote class="imgur-embed-pub" lang="en" data-id="a/{sval1}"></blockquote>
<script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>]]></embed>
  <callback>EWR\Medio\Api\Imgur</callback>
</service>


Then, add a template modification (if you don't know about this section of the Admin panel, maybe this isn't for you) for one of the ".less" templates; I'll be going for a random spot within "EWRmedio_media.less". I'll assume you're modifying that one, in which case have it Find:
CSS:
.input.medio-duration {
and Replace with:
CSS:
/* fix XenMedio imgur iframe underflow  */
div.medio-aspect-box.medio-svc-imgur, div.medio-aspect-box.medio-svc-imgur_gallery {
    padding-top: 5px;
    div.medio-aspect-body { top: auto; bottom: auto; left: auto; right: auto; position: relative; }
}

$0


Then, a set of template modifications to add a class to all instances of "medio-aspect-box" so they reference the service name, so the above CSS can properly apply to them. For all 4 template modifications, you will have it Find:
HTML:
<div class="medio-aspect-box">
Modification for Template "EWRmedio_media_macros", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$media.Service.service_key}">
Modification for Template "EWRmedio_media_edit_macros", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$media.Service.service_key}">
Modification for Template "approval_item_ewr_medio_media", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$content.Service.service_key}">
Modification for Template "report_content_ewr_medio_media", Replace with:
HTML:
<div class="medio-aspect-box medio-svc-{$content.Service.service_key}">


After all of that, you'll have Imgur /gallery/ URLs also accepted, and for either those or the existing /a/ URLs you'll no longer have the "underflow" display problem.

nice one, only hoping the author will fix it in the core product...thank you for this tho...
 
Also ran into this error when test submitting an Imgur /a/ URL (here, for reference) which had no title:
InvalidArgumentException: Attempted to convert NULL to string/binary [media_title] in src/XF/Mvc/Entity/Entity.php at line 740
  1. XF\Mvc\Entity\Entity->_castValueToType() in src/XF/Mvc/Entity/Entity.php at line 618
  2. XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 720
  3. XF\Mvc\Entity\Entity->bulkSet() in src/addons/EWR/Medio/Repository/Media.php at line 66
  4. EWR\Medio\Repository\Media->scrapeMedia() in src/addons/EWR/Medio/Pub/Controller/Media.php at line 430
  5. EWR\Medio\Pub\Controller\Media->actionSubmit() in src/XF/Mvc/Dispatcher.php at line 350
  6. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
  7. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  8. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  9. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
  10. XF\App->run() in src/XF.php at line 391
  11. XF::runApp() in index.php at line 20

Since the addon dev is currently unresponsive, I decided to fix it myself. I deleted the "/src/addons/EWR/Medio/hashes.json" file as a temporary measure to keep the following modification to this addon's files from being flagged as a security problem, then I added this extra line of code around line 48 of "/src/addons/EWR/Medio/Repository/Media.php":
PHP:
        if (!isset($data['title'])) $data['title'] = '';
That fixed it.
 
Interesting. I have this addon on an older version of Xenforo and came to see about updating. I already have the updated forum software. Support was never great but the addon worked well for the most part and I would like to upgrade. Looking at the forum here it seems as though this might be an unsupported addon now?
 
Obviously I never learn....crap1.PNG

Is it too much to ask for a complete and detailed installation tutorial?

I do like what this can provide when it works properly.
 
Last edited:
Jaxel updated XF2 [8WR] XenMedio 2 (Media) PRO with a new update entry:

2.1.0.7 - CHANGELOG

  • Added additional search constraints for the media library.
  • Normalized the ewrmedio_media phrase in the quick search menu.
  • Gallery service embeds will no longer be put into aspect ratio boxes.
  • *****ute has been added as a service. Like GameStop, FunnyOrDie and Soundcloud, not all information can be fetched, since they don't have a RESTful API.
  • YouTube embeds have been updated to follow GDPR.
  • YouTube embeds have been updated to support various mobile...

Read the rest of this update entry...
 
anyone please remind me how you get the updated files for this?
i forgot already since last time and couldnt find any notes about it on here.....the download link is straight to paypal....
how do you get the zip?
thank you
 
@Jaxel Since you are updating to fix other issues, you might want to include a fix like this for the next update, since an Imgur album/gallery with a blank title triggers a nullref error:

how do you get the zip?
You should get an e-mail with a personalized link; the link worked for me, anyway, leading to a page with a working download. If you're referencing an old e-mail, that old link probably won't work. Otherwise, hopefully Jaxel can help you out.
 
@Jaxel Since you are updating to fix other issues, you might want to include a fix like this for the next update, since an Imgur album/gallery with a blank title triggers a nullref error:
Can you give me a link to an album with no title?
 
@Jaxel

In some of the setup on the main page here,
  • FlickR (requires an API key)
  • Twitch (requires an API key)
  • YouTube (requires an API key)
How are these all acquired? I started with Youtube and believe it is in the correct place but when I tried to add it I get an error code.
s1.webp

I'm not getting error codes in the server logs. Is there somewhere or something I should be checking?
 
Well, at least I was already in the correct area. Now, there are error codes that I can see in the browser information. So where shall I look to fix the image I am attaching? This one is for Youtube which on their site shows a valid api.

med1.png

Thoughts?
 
Set up your permissions.

Where might these be? The permissions, from what I can tell, are correct and allowing me full access in the ACP of Xenforo. From what I can see in the permissions on the server they too are set as 755 or 644. Where else might I find permissions?
 
I posted something similarly related in the XF1 version of this add-on:

My add-on still works, but due to the tight quota on the YouTube Data API v3 - which I think was recently imposed - I'm hitting the limit daily, and once the limit is reached, any new submissions to my media library either don't work, or come up with the default thumbnail placeholder.

Once again, calling @Jaxel for support.
 
Top Bottom