s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
@JoshyPHP One of my users managed to get a 'Division by zero' exception when trying to link to a Vidme URL (https://vid.me/kjthemonarch) using
version 20150925.

Code:
ErrorException: Division by zero - library/s9e/MediaBBCodes.php:1319
Generated By: xxx, Yesterday at 11:34 PM
Stack Trace
#0 /var/www/html/library/s9e/MediaBBCodes.php(1319): XenForo_Application::handlePhpError(2, 'Division by zer...', '/var/www/sites/...', 1319, Array)
#1 [internal function]: s9e_MediaBBCodes::renderVidme(Array)
#2 /var/www/html/library/s9e/MediaBBCodes.php(810): call_user_func('s9e_MediaBBCode...', Array)
#3 [internal function]: s9e_MediaBBCodes::embed('kjthemonarch', Array, 'vidme')
#4 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(1862): call_user_func_array(Array, Array)
#5 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(1742): XenForo_BbCode_Formatter_Base->_getMediaSiteHtmlFromCallback('kjthemonarch', Array, 'vidme')
#6 /var/www/html/library/XenForo/BbCode/Formatter/ImageCount.php(50): XenForo_BbCode_Formatter_Base->renderTagMedia(Array, Array)
#7 [internal function]: XenForo_BbCode_Formatter_ImageCount->renderTagMedia(Array, Array, Object(XenForo_BbCode_Formatter_ImageCount))
#8 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(745): call_user_func(Array, Array, Array, Object(XenForo_BbCode_Formatter_ImageCount))
#9 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(652): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#10 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(565): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#11 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#12 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(1788): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#13 [internal function]: XenForo_BbCode_Formatter_Base->renderTagSpoiler(Array, Array, Object(XenForo_BbCode_Formatter_ImageCount))
#14 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(745): call_user_func(Array, Array, Array, Object(XenForo_BbCode_Formatter_ImageCount))
#15 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(652): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#16 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(565): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#17 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#18 /var/www/html/library/XenForo/BbCode/Formatter/Base.php(526): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#19 /var/www/html/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#20 /var/www/html/library/XenForo/DataWriter/DiscussionMessage.php(415): XenForo_BbCode_Parser->render('[QUOTE="Green S...')
#21 /var/www/html/library/XenForo/DataWriter/DiscussionMessage/Post.php(65): XenForo_DataWriter_DiscussionMessage->_checkMessageValidity()
#22 /var/www/html/library/TPUOldThreadWarning/DiscussionMessagePost.php(7): XenForo_DataWriter_DiscussionMessage_Post->_checkMessageValidity()
#23 /var/www/html/library/XenForo/DataWriter/DiscussionMessage.php(345): TPUOldThreadWarning_DiscussionMessagePost->_checkMessageValidity()
#24 /var/www/html/library/XenForo/DataWriter.php(1446): XenForo_DataWriter_DiscussionMessage->_preSave()
#25 /var/www/html/library/XenForo/DataWriter.php(1385): XenForo_DataWriter->preSave()
#26 /var/www/html/library/XenForo/ControllerPublic/Post.php(275): XenForo_DataWriter->save()
#27 /var/www/html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Post->actionSaveInline()
#28 /var/www/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#29 /var/www/html/index.php(13): XenForo_FrontController->run()
#30 {main}
Request State
array(5) {
["url"] => string(58) "https://forums.spacebattles.com/posts/19526637/save-inline"
["_GET"] => array(1) {
["/posts/19526637/save-inline"] => string(0) ""
}
["_POST"] => array(6) {
["message_html"] => string(680) "<p>[QUOTE="Green Sun Over Paradise, post: 19526516, member: 282491"]I saw the same leak, I don't think it's fair to judge the AI when the Super-Mutants died pretty fast to laser fire. Though I will admit the one where it took a shot to the head and didn't turn around was pretty egregious. I hope it's just pre-release teething problems.[/QUOTE]</p><p><br></p><p>So, more of the same? I'll enjoy the game durpy AI or not, but like Creative Assembly I've given up hope of the AI being improved. At lest it looks like enemies don't have to sto</p><p><br></p><p>[SPOILER="My new best friend."]https://vid.me/kjthemonarch[/SPOILER]</p><p><br></p><p>I love this man, PERK VIDEOS.</p>
"
["_xfRelativeResolver"] => string(89) "https://forums.spacebattles.com/threads/fallout-4-announced-trailer-pg-26.327728/page-371"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(58) "/threads/fallout-4-announced-trailer-pg-26.327728/page-371"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
@Xon I'm going to publish an update that fixes that specific error. However, that URL will not create a functioning embed. You can only embed vidme videos, not whole pages.
 
  • Like
Reactions: Xon
Imgur closed my ticket (in their support system) without a reply and they haven't replied to my follow-up either, so I guess we're on our own. I haven't had time to work on an alternative.
 
@JoshyPHP - not sure if this is a known issue, but non-square Instagram embeds are covering up XF UI elements (eg. "Like" and "Edit" controls on a post) when viewed on mobile (or at least iPhone).

Example - user embedded this IG photo:
https://instagram.com/p/9lVBJNEYwp/

Result - notice no controls at the bottom of the post:
2015-11-03%2007.31.02b.png
 
Last edited:
@JoshyPHP - not sure if this is a known issue, but non-square Instagram embeds are covering up XF UI elements (eg. "Like" and "Edit" controls on a post) when viewed on mobile (or at least iPhone).

Example - user embedded this IG photo:
https://instagram.com/p/9lVBJNEYwp/

Result - notice no controls at the bottom of the post:
2015-11-03%2007.31.02b.png
Also saw a similar issue with GIFV - but when I edited an offending embed to remove the "width=" element, it fixed the issue there.
 
Last edited:
Love this! Do you think this can be extended to embed google maps and google my maps into the messages? I'd really need this but I'm not able to write a BB code by myself...
 
@JoshyPHP can you please add bbcode for hearthis.at ? thanks .

Code:
<iframe scrolling="no" id="hearthis_at_track_434561" width="100%" height="150" src="https://hearthis.at/embed/434561/transparent_black/?hcolor=&color=&style=2&block_size=1&block_space=1&background=1&waveform=0&cover=0&autoplay=0&css=" frameborder="0" allowtransparency></iframe>
https://hearthis.at/djcyry/
 
@JoshyPHP another Division by zero this time on this URL: https://i.imgur.com/PRL5rPn.gifv

Code:
ErrorException: Division by zero - library/s9e/MediaBBCodes.php:1187
Generated By: xxx, Today at 9:14 PM

#0 /var/www/sites/html/library/s9e/MediaBBCodes.php(1187): XenForo_Application::handlePhpError(2, 'Division by zer...', '/var/www/sites/...', 1187, Array)
#1 [internal function]: s9e_MediaBBCodes::renderImgur(Array)
#2 /var/www/sites/html/library/s9e/MediaBBCodes.php(810): call_user_func('s9e_MediaBBCode...', Array)
#3 [internal function]: s9e_MediaBBCodes::embed('height=0;id=PRL...', Array, 'imgur')
#4 /var/www/sites/html/library/XenForo/BbCode/Formatter/Base.php(1862): call_user_func_array(Array, Array)
#5 /var/www/sites/html/library/XenForo/BbCode/Formatter/Base.php(1742): XenForo_BbCode_Formatter_Base->_getMediaSiteHtmlFromCallback('height=0;id=PRL...', Array, 'imgur')
#6 /var/www/sites/html/library/XenForo/BbCode/Formatter/ImageCount.php(50): XenForo_BbCode_Formatter_Base->renderTagMedia(Array, Array)
#7 [internal function]: XenForo_BbCode_Formatter_ImageCount->renderTagMedia(Array, Array, Object(XenForo_BbCode_Formatter_ImageCount))
#8 /var/www/sites/html/library/XenForo/BbCode/Formatter/Base.php(745): call_user_func(Array, Array, Array, Object(XenForo_BbCode_Formatter_ImageCount))
#9 /var/www/sites/html/library/XenForo/BbCode/Formatter/Base.php(652): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#10 /var/www/sites/html/library/XenForo/BbCode/Formatter/Base.php(565): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#11 /var/www/sites/html/library/XenForo/BbCode/Formatter/Base.php(546): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#12 /var/www/sites/html/library/XenForo/BbCode/Formatter/Base.php(526): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#13 /var/www/sites/html/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#14 /var/www/sites/html/library/XenForo/DataWriter/DiscussionMessage.php(415): XenForo_BbCode_Parser->render('@Sereg\n[B]Pleas...')
#15 /var/www/sites/html/library/XenForo/DataWriter/DiscussionMessage/Post.php(65): XenForo_DataWriter_DiscussionMessage->_checkMessageValidity()
#16 /var/www/sites/html/library/TPUOldThreadWarning/DiscussionMessagePost.php(7): XenForo_DataWriter_DiscussionMessage_Post->_checkMessageValidity()
#17 /var/www/sites/html/library/XenForo/DataWriter/DiscussionMessage.php(345): TPUOldThreadWarning_DiscussionMessagePost->_checkMessageValidity()
#18 /var/www/sites/html/library/XenForo/DataWriter.php(1446): XenForo_DataWriter_DiscussionMessage->_preSave()
#19 /var/www/sites/html/library/XenForo/ControllerPublic/Thread.php(550): XenForo_DataWriter->preSave()
#20 /var/www/sites/html/library/SV/ThreadReplyBanner/XenForo/ControllerPublic/Thread.php(46): XenForo_ControllerPublic_Thread->actionAddReply()
#21 /var/www/sites/html/library/SV/PostFloodTweaks/XenForo/ControllerPublic/Thread.php(39): SV_ThreadReplyBanner_XenForo_ControllerPublic_Thread->actionAddReply()
#22 /var/www/sites/html/library/XenForo/FrontController.php(351): SV_PostFloodTweaks_XenForo_ControllerPublic_Thread->actionAddReply()
#23 /var/www/sites/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#24 /var/www/sites/html/index.php(13): XenForo_FrontController->run()
#25 {main}

array(5) {
  ["url"] => string(87) "http://forums.sufficientvelocity.com/threads/puella-magi-adfligo-systema.2538/add-reply"
  ["_GET"] => array(1) {
    ["/threads/puella-magi-adfligo-systema_2538/add-reply"] => string(0) ""
  }
  ["_POST"] => array(8) {
    ["message"] => string(598) "@Sereg
[B]Please stop. You aren't convincing anyone - and nobody's convincing you, that much is clear. You can continue to advocate for whatever course of action you feel best when applicable, but you're turning this thread into a single back and forth argument between yourself and everyone else. It's getting tiring.[/B]

On an unrelated note, I found this (it might be from Fate/kaleid liner Prisma Illya[sup]1[/sup], but I'm not entirely sure) gif. It's... reasonably close to what Sabrina's like in battle mode, in my mind.
https://i.imgur.com/PRL5rPn.gifv

[Sup]1[/sup]Thanks, @krekian!"
    ["_xfRelativeResolver"] => string(87) "http://forums.sufficientvelocity.com/threads/puella-magi-adfligo-systema.2538/page-2630"
    ["last_date"] => string(10) "1446726106"
    ["last_known_date"] => string(10) "1446726106"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(51) "/threads/puella-magi-adfligo-systema.2538/page-2630"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
@JoshyPHP - not sure if this is a known issue, but non-square Instagram embeds are covering up XF UI elements (eg. "Like" and "Edit" controls on a post) when viewed on mobile (or at least iPhone).

The seems like a browser issue. Do you have access to another browser?

@JoshyPHP can you please add bbcode for hearthis.at ? thanks .

The site isn't very popular according to Alexa and I'm quite busy at the moment so I'll have to decline, sorry. The embed code seems simple enough though, you should be able to create a media site for it manually.

@JoshyPHP another Division by zero this time on this URL: https://i.imgur.com/PRL5rPn.gifv

Sorry to hear that. I can't reproduce it locally but I'll update the definition to prevent embeds that are set to 0px height. Was that BBCode created manually? I don't understand why its height was set to 0. If you remove the "height=0;" part of the BBCode, it'll fix that specific error. Or you can replace it with the correct height/width too.

Code:
[MEDIA=imgur]height=220;id=PRL5rPn;type=gifv;width=391[/MEDIA]

@JoshyPHP Twitter embeds fail for Firefox 42, but work on Firefox 41.xx (bug report on my site.)

I don't have access to that thread. Could it be related to Firefox's new anti-tracking?
 
Last edited:
Sorry to hear that. I can't reproduce it locally but I'll update the definition to prevent embeds that are set to 0px height. Was that BBCode created manually? I don't understand why its height was set to 0. If you remove the "height=0;" part of the BBCode, it'll fix that specific error. Or you can replace it with the correct height/width too.

Code:
[MEDIA=imgur]height=220;id=PRL5rPn;type=gifv;width=391[/MEDIA]
It doesn't look like the bbcode was created manually. It is a new post, so you can see the raw text.

But it looks to have worked after.

I don't have access to that thread. Could it be related to Firefox's new anti-tracking?
Possibly, it was on a Firefox update.

The reporting post, with images & bbcode:
Code:
I recently discovered that embedded Tweets and images from [URL]https://pbs.twimg.com/media/[/URL] do not display at all. Here are some examples:
[IMG]https://pbs.twimg.com/media/CTJtTRjXIAAfzCJ.jpg:large[/IMG]
[MEDIA=twitter]662712403059064835[/MEDIA]

Embedded URLs:
https://twitter.com/Cpt_Barricade/status/662712403059064835
https://pbs.twimg.com/media/CTJtTRjXIAAfzCJ.jpg:large
 
@JoshyPHP - not sure if this is a known issue, but non-square Instagram embeds are covering up XF UI elements (eg. "Like" and "Edit" controls on a post) when viewed on mobile (or at least iPhone).
The seems like a browser issue. Do you have access to another browser?
It's happening in Safari across all iPhone/iOS versions I've tested, so if it is a browser issue, it's one that we'll need to fix! :)

Also, when viewed on desktop, any non-square Instagram photos get cut off at the bottom of the frame.

Here's the link to that example post if you'd like to test:
http://www.talkbeer.com/community/threads/ddt-11-2-2015.28309/#post-828453
 
Last edited:
Hi @JoshyPHP ,

Can you pls check why this facebook video is not getting embedded

Code:
https://web.facebook.com/VijayTelevision/videos/948642131881684/
 
Back
Top Bottom