Skip to content

Commit

Permalink
Updated Facebook
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Sep 4, 2017
1 parent a3eac3e commit 033f213
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/addon-s9e.xml
@@ -1,4 +1,4 @@
<addon addon_id="s9e" title="s9e Media Pack" url="https://xenforo.com/community/resources/s9e-media-bbcodes-pack.2476/" version_id="201708260" version_string="20170826" install_callback_class="s9e_MediaBBCodes" install_callback_method="install" uninstall_callback_class="s9e_MediaBBCodes" uninstall_callback_method="uninstall">
<addon addon_id="s9e" title="s9e Media Pack" url="https://xenforo.com/community/resources/s9e-media-bbcodes-pack.2476/" version_id="201709040" version_string="20170904" install_callback_class="s9e_MediaBBCodes" install_callback_method="install" uninstall_callback_class="s9e_MediaBBCodes" uninstall_callback_method="uninstall">
<bb_code_media_sites/>
<phrases>
<phrase title="option_group_s9e" version_id="1" version_string="1">s9e Media Pack</phrase>
Expand Down Expand Up @@ -73,7 +73,7 @@ $0</replace>
</modification>
<modification action="str_replace" description="Adds a link back to s9e Media Pack" enabled="1" execution_order="10" modification_key="s9e_footer" template="footer">
<find>{xen:phrase extra_copyright}</find>
<replace> | &lt;a class="concealed" href="https://xenforo.com/community/resources/s9e-media-bbcodes-pack.2476/" title="Media BBCodes provided by s9e Media Pack v20170826"&gt;Media embeds by s9e&lt;/a&gt;$0</replace>
<replace> | &lt;a class="concealed" href="https://xenforo.com/community/resources/s9e-media-bbcodes-pack.2476/" title="Media BBCodes provided by s9e Media Pack v20170904"&gt;Media embeds by s9e&lt;/a&gt;$0</replace>
</modification>
<modification action="preg_replace" description="Defers the loading of embedded content" enabled="0" execution_order="10" modification_key="s9e_lazy_loading" template="ad_thread_view_below_messages">
<find>(^)</find>
Expand Down
2 changes: 1 addition & 1 deletion build/upload/library/s9e/MediaBBCodes.php
Expand Up @@ -1140,7 +1140,7 @@ public static function renderFacebook($vars)
{
$vars += array('id' => null, 'type' => null);

$html='<iframe data-s9e-mediaembed="facebook" allowfullscreen="" onload="var a=Math.random();window.addEventListener(\'message\',function(b){if(b.data.id==a)style.height=b.data.height+\'px\'});contentWindow.postMessage(\'s9e:\'+a,\'https://s9e.github.io\')" scrolling="no" src="https://s9e.github.io/iframe/facebook.min.html#'.htmlspecialchars($vars['type'].$vars['id'],2).'" style="border:0;height:360px;max-width:640px;width:100%"></iframe>';
$html='';if($vars['type']==='video')$html.='<span data-s9e-mediaembed="facebook" style="display:inline-block;width:100%;max-width:640px"><span style="display:block;overflow:hidden;position:relative;padding-bottom:56.25%"><iframe allowfullscreen="" scrolling="no" src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fv%2Fvideos%2F'.htmlspecialchars($vars['id'],2).'%2F&amp;show_text=0&amp;width=640" style="border:0;height:100%;left:0;position:absolute;width:100%"></iframe></span></span>';else$html.='<iframe data-s9e-mediaembed="facebook" allowfullscreen="" onload="var a=Math.random();window.addEventListener(\'message\',function(b){if(b.data.id==a)style.height=b.data.height+\'px\'});contentWindow.postMessage(\'s9e:\'+a,\'https://s9e.github.io\')" scrolling="no" src="https://s9e.github.io/iframe/facebook.min.html#'.htmlspecialchars($vars['id'],2).'" style="border:0;height:360px;max-width:640px;width:100%"></iframe>';

return $html;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Test.php
Expand Up @@ -1173,7 +1173,7 @@ function ()
'facebook',
'id=10153762113196633;type=video',
'',
'<iframe data-s9e-mediaembed="facebook" allowfullscreen="" onload="var a=Math.random();window.addEventListener(\'message\',function(b){if(b.data.id==a)style.height=b.data.height+\'px\'});contentWindow.postMessage(\'s9e:\'+a,\'https://s9e.github.io\')" scrolling="no" src="https://s9e.github.io/iframe/facebook.min.html#video10153762113196633" style="border:0;height:360px;max-width:640px;width:100%"></iframe>'
'<span data-s9e-mediaembed="facebook" style="display:inline-block;width:100%;max-width:640px"><span style="display:block;overflow:hidden;position:relative;padding-bottom:56.25%"><iframe allowfullscreen="" scrolling="no" src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fv%2Fvideos%2F10153762113196633%2F&amp;show_text=0&amp;width=640" style="border:0;height:100%;left:0;position:absolute;width:100%"></iframe></span></span>'
),
array(
'getty',
Expand Down

0 comments on commit 033f213

Please sign in to comment.