s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
I don't think so, but anything's possible.
  1. Does the text editor feel faster when you disable deferred loading?
  2. Do you somehow scroll or resize the page continuously while editing the text?
  3. How many embeds on the page approximately?
  4. What browser is it?
 
I don't think so, but anything's possible.
  1. Does the text editor feel faster when you disable deferred loading?
  2. Do you somehow scroll or resize the page continuously while editing the text?
  3. How many embeds on the page approximately?
  4. What browser is it?
1 - eh, its debateable
2 - unless its without my knowledge, no.
3 - really varies. The heavy ones cause the browser to lock up immediately. I think it also has to do with the theme I'm using. When I switch to my backup theme I get less problems.
4 - OSX Firefox
 
When deferred loading is disabled, the page contains no extra code whatsoever so if it was related you should see a difference.
When deferred loading is enabled and there's no embedded media on the page, nothing happens.
When deferred loading is enabled and there are deferred iframes on the page, there's a very small piece of code (virtually instantaneous) executed every 100ms and a bigger routine executed 200 ms after you stop scrolling or resizing the page. With ~100 iframes on the page it takes ~1 ms on my desktop computer. If there are more than 3 deferred iframes, there's another routine run once per minute that unloads iframes that are not visible to reclaim some memory. It takes 1-5 ms for 100 iframes.

I don't think any of those could interfere with the editor's responsiveness.
 
When deferred loading is disabled, the page contains no extra code whatsoever so if it was related you should see a difference.
When deferred loading is enabled and there's no embedded media on the page, nothing happens.
When deferred loading is enabled and there are deferred iframes on the page, there's a very small piece of code (virtually instantaneous) executed every 100ms and a bigger routine executed 200 ms after you stop scrolling or resizing the page. With ~100 iframes on the page it takes ~1 ms on my desktop computer. If there are more than 3 deferred iframes, there's another routine run once per minute that unloads iframes that are not visible to reclaim some memory. It takes 1-5 ms for 100 iframes.

I don't think any of those could interfere with the editor's responsiveness.
I figured as much but I wanted to get your take on it. It definitely improves the browsability with Firefox though.
 
Hello,

I am having now this error on my server as well.
Code:
ErrorException: Missing argument 4 for s9e_MediaBBCodes::match() - library/s9e/MediaBBCodes.php:602
With the detailed following informations:
Code:
#0 XXXXXXXXXXX/library/s9e/MediaBBCodes.php(602): XenForo_Application::handlePhpError(2, 'Missing argumen...', 'XXXXXXXXXXX/...', 602, Array)
#1 [internal function]: s9e_MediaBBCodes::match('https://www.you...', 'P5MqJ2ZlhQw', Array)
#2 XXXXXXXXXXX/library/sonnb/XenGallery/Model/VideoData.php(325): call_user_func_array(Array, Array)
#3 XXXXXXXXXXX/library/sonnb/XenGallery/Model/VideoData.php(142): sonnb_XenGallery_Model_VideoData->_getMediaKeyFromCallback('https://www.you...', 'P5MqJ2ZlhQw', Array)
#4 XXXXXXXXXXX/library/sonnb/XenGallery/ControllerPublic/XenGallery/Video.php(262): sonnb_XenGallery_Model_VideoData->parseMediaUrl('https://www.you...')
#5 XXXXXXXXXXX/library/XenForo/FrontController.php(347): sonnb_XenGallery_ControllerPublic_XenGallery_Video->actionEmbedVideo()
#6 XXXXXXXXXXX/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 XXXXXXXXXXX/index.php(13): XenForo_FrontController->run()
#8 {main}

And the following request:
Code:
array(3) {
  ["url"] => string(51) "http://XXXXXXXXXXXXXXX/galerie/videos/embed-video"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(8) {
    ["url"] => string(43) "https://www.youtube.com/watch?v=XXXXXXXXXXXXX"
    ["_xfToken"] => string(8) "********"
    ["content_data_hash"] => string(32) "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    ["album_id"] => string(3) "314"
    ["insert"] => string(8) "Insérer"
    ["_xfRequestUri"] => string(35) "/galerie/albums/XXXXXXXXXXXXXXXXXX/add-video"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

I use Xenforo 1.4.4, S9 Media Pack 20150227 and I try to insert a video in Gallery.
 
Judging by the error message it's a bug in sonnb_XenGallery_Model_VideoData. In XenForo 1.4, media site callbacks take 4 arguments but it only provides 3. The signature, taken from XenForo's media site form is as follows:
Code:
public static function matchCallback($url, $matchedId, array $site, $siteId)
Tagging @sonnb to save you some time.
 
Judging by the error message it's a bug in sonnb_XenGallery_Model_VideoData. In XenForo 1.4, media site callbacks take 4 arguments but it only provides 3. The signature, taken from XenForo's media site form is as follows:
Code:
public static function matchCallback($url, $matchedId, array $site, $siteId)
Tagging @sonnb to save you some time.
Thanks for tagging. Seem XF changed the signature in some older releases. I will update this.
 
JoshyPHP updated s9e Media BBCodes pack with a new update entry:

Updated Imgur, changed some CSS related to quotes, shortened the attribution notice

  • Updated Imgur. They have changed some markup related to image albums.
  • XenForo limits the size of iframes in quotes but the CSS does not apply to the wrapper needed to make them responsive, which results in blank space around the embed. This update fixes that.
  • Shortened the attribution notice to make it fit on the same line as XenForo's copyright on my screens

Read the rest of this update entry...
 
I am still learning how to add my own custom sites, but I can't tell you how much I appreciate this add-on!

I do have one request for help:

Is there a way to make the add-on output the original link under the embed? I don't want to manually setup 98 tapatalk definitions right now, and this would allow my tapatalk users to see the link to click right away.

Thank you for any assistance
 
Could you add KissAnime and KissCartoon?
I've thought about it but I don't think it's a good fit, sorry.

Is there a way to make the add-on output the original link under the embed?
No, unfortunately that's impossible at the moment. XenForo discards the original URL and the add-on does not save it either. The best workaround at the moment is to not use the "Media" button and post URLs directly, and to go to your Admin CP and look for the option that automatically turns links into embedded media. The option has 3 settings, the third one adds a link under the embedded media.
 
I've thought about it but I don't think it's a good fit, sorry.


No, unfortunately that's impossible at the moment. XenForo discards the original URL and the add-on does not save it either. The best workaround at the moment is to not use the "Media" button and post URLs directly, and to go to your Admin CP and look for the option that automatically turns links into embedded media. The option has 3 settings, the third one adds a link under the embedded media.


I have done that but my users are inconsistent in their approach.

Please consider in the future. The autoembed output is exactly what I want, but need to handle users clicking the media button so they can still post just the link without embed
 
I have considered it, but there's no perfect solution so I'm not set yet. If I save the URL in the BBCode, instead of this:
Code:
[MEDIA=youtube]AJtDXIazrMo[/MEDIA]
...you'll get something like this:
Code:
[MEDIA=youtube]id=AJtDXIazrMo;meta-url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAJtDXIazrMo[/MEDIA]
That comes with its own set of issues. For instance, I don't think Tapatalk would embed YouTube videos anymore. It would also require more processing because it would need to validate the URL before displaying it.
 
I think you are, rightfully, looking for a more elegant longterm solution as a developer.

I'm looking to edit a template (or have a check box in the ACP provided in future releases) and spit out simply"

MEDIABBCODE
Linebreak
View Original: http://originalurl.com

It would allow me to turn off autoembeds. Then users could choose to embed or not.
Users browsing on a device that doesn't support a media type (tapatalk was just my one example, but flash embeds don't work on chrome for android) would always have a fail over of a simple hyperlink
 
Here is an example of the current autoembed from one of my users:

autoembed.webp

Twitter is another embed that doesn't work well on many devices and would require tapatalk recode.
A simple "View URLHERE.COM" spit out underneath the media embed would be useful for lots of reasons and is what the autoembed already does. Only problem with the autoembed is now you are forcing everything to be embedded and that hyperlink edition is inconsistent (not there for media button, is there for auto embedded)
 
After uploading the files and trying to upload the xml.. i get this error:

Error
  • The requested option could not be found.
  • Only array data types may be represented as array values.
  • Please enter a valid option ID.
  • Please enter a value for the required field 'edit_format'.
 
@DRE: if you're using Chrome, it seems it doesn't like the Flash MIME type. Try removing type="application/x-shockwave-flash" typemustmatch="" from the embed HTML. Not sure what to make of that though. :\

When embedding album from AudioMack the following error is being produced:


Application error
Instead, perhaps try our top songs or top albums charts.


BBCode being used:
Code:
[MEDIA=audiomack]2dbz/amethyst[/MEDIA]


Using the latest version, any quick fix?
 
Top Bottom