XF 2.2 BB code Media Sites

ChrisTERiS

Well-known member
I'm trying to add Mega.nz as a new media site. Here are my settings:

1634748909669.webp

and this is the embed code:

HTML:
<div class="bbMediaWrapper">
    <div class="bbMediaWrapper-inner">
        <iframe width="640" height="360" frameborder="0" src="https://mega.nz/embed/{$id}" allowfullscreen ></iframe>
    </div>
</div>

But when I'm trying to add the link below

i'm getting this screen:
1634749089870.webp

and the result is this:

1634749140501.webp

What is strange that if you try the above link in your browser it works fine, and also, in my own php script, it works fine.

1634749225453.webp

Anybody can point me on what I've wrong in my settings?

Thank you
Chris
 
For anyone else that is trying to solve the Mega link issue, the problem is in the # in the URL, which XF interprets as a delimiter. This causes the match urls to capture only the first half of the URL, resulting in Mega saying the file is 'no longer accessible'.

Under advanced options in your BB code media site, be sure to check Use 'Match URLs' as PCRE regular expressions.

You can then use the following match url: #https://mega\.nz/embed/(?P<id>.+)$#siU

And template code: <iframe width="560" height="315" src="https://mega.nz/embed/{$id}" frameborder="0" allowfullscreen></iframe>
 
Top Bottom