It's not possible, sorry. If you want to post a link without it being transformed you can use thepoenn wrote:Is it possible to disable some of its supported sites?
URL
BBCode and it shouldn't be replaced with an embedded product.It's not possible, sorry. If you want to post a link without it being transformed you can use thepoenn wrote:Is it possible to disable some of its supported sites?
URL
BBCode and it shouldn't be replaced with an embedded product.$xml = MediaPack::parse($m[1]);
Code: Select all
if (!isset(MediaPack::$parser))
{
MediaPack::$parser = MediaPack::getParser();
}
MediaPack::$parser->disableTag('AMAZON');
Code: Select all
MediaPack::getCachedParser()->disableTag('AMAZON');
$xml = MediaPack::parse($m[1]);
As I posted above, it's possible to edit listener.php (not bundle.php) but you should not edit any file if you're not sure.John connor wrote:In the bundle.php Amazon is listed there, but I'm not sure how to modify with breaking the code.
Code: Select all
return preg_replace_callback(
'(<!-- m -->.*?href="([^"]+).*?<!-- m -->)',
function ($m)
{
MediaPack::getCachedParser()->disableTag('AMAZON');
$xml = MediaPack::parse($m[1]);
return ($xml[1] === 'r')
? '<!-- s9e:mediaembed:' . base64_encode($xml) . ' -->' . $m[0]
: $m[0];
},
$text
What would the correct syntax be for disabling more than one site? For example, if I wanted to disable amazon, facebook and foxnews?JoshyPHP wrote:I've just uploaded an update: https://github.com/s9e/phpbb-ext-mediae ... 151024.zip
In this version, if you want to disable a site by editing the source, you'll have to replace line 88 with the following:Code: Select all
MediaPack::getCachedParser()->disableTag('AMAZON'); $xml = MediaPack::parse($m[1]);
That would require more work than I can provide at the moment. To be honest, unless someone wants to sponsor its development I don't think I'll ever have time to create a UI for this extension.Difadon wrote:Maybe is greaf if you add acp control (for allow/disable websites).
Sorry, I have to focus only on the most popular sites at the moment.Difadon wrote:You can add support for some czech webpage?
Just repeat the first line for each site.Pond Life wrote:What would the correct syntax be for disabling more than one site? For example, if I wanted to disable amazon, facebook and foxnews?
Code: Select all
MediaPack::getCachedParser()->disableTag('FACEBOOK');
MediaPack::getCachedParser()->disableTag('FOXNEWS');
Thank you.JoshyPHP wrote:Just repeat the first line for each site.
Code: Select all
MediaPack::getCachedParser()->disableTag('FACEBOOK'); MediaPack::getCachedParser()->disableTag('FOXNEWS');