XF 2.2 BB code Media Sites


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


and this is the embed code:

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

But when I'm trying to add the link below

i'm getting this screen:

and the result is this:


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.


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

Thank you
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