Skip to content

Commit

Permalink
Updated WSJ
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Jun 11, 2015
1 parent 7350128 commit bfa6a15
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 24 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ Media BB Codes for XenForo, imported from [s9e\TextFormatter](https://github.com
</tr>
<tr>
<td><code>twitter</code></td>
<td>Twitter (via custom iframe)</td>
<td>Twitter</td>
<td>https://twitter.com/IJasonAlexander/statuses/526635414338023424<br/>https://mobile.twitter.com/DerekTVShow/status/463372588690202624<br/>https://twitter.com/#!/IJasonAlexander/status/526635414338023424</td>
</tr>
<tr>
Expand Down Expand Up @@ -504,7 +504,7 @@ Media BB Codes for XenForo, imported from [s9e\TextFormatter](https://github.com
<tr>
<td><code>wsj</code></td>
<td>The Wall Street Journal Online</td>
<td>http://live.wsj.com/#!09FB2B3B-583E-4284-99D8-FEF6C23BE4E2<br/>http://live.wsj.com/video/seahawks-qb-russell-wilson-on-super-bowl-win/9B3DF790-9D20-442C-B564-51524B06FD26.html<br/>http://live.wsj.com/video/seth-rogen-emotional-appeal-over-alzheimer/3885A1E1-D5DE-443A-AA45-6A8F6BB8FBD8.html?mod=trending_now_video_4#!3885A1E1-D5DE-443A-AA45-6A8F6BB8FBD8</td>
<td>http://www.wsj.com/video/nba-players-primp-with-pedicures/9E476D54-6A60-4F3F-ABC1-411014552DE6.html<br/>http://live.wsj.com/#!09FB2B3B-583E-4284-99D8-FEF6C23BE4E2<br/>http://live.wsj.com/video/seahawks-qb-russell-wilson-on-super-bowl-win/9B3DF790-9D20-442C-B564-51524B06FD26.html</td>
</tr>
<tr>
<td><code>xboxclips</code></td>
Expand Down
4 changes: 2 additions & 2 deletions build/addon-s9e.xml
Original file line number Diff line number Diff line change
@@ -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="201506050" version_string="20150605" 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="201506110" version_string="20150611" 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 @@ -56,7 +56,7 @@
</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 20150605"&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 20150611"&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
13 changes: 2 additions & 11 deletions build/upload/library/s9e/MediaBBCodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class s9e_MediaBBCodes
'traileraddict'=>array('Trailer Addict','http://www.traileraddict.com/',array('movies'=>1),'@(?\'id\')traileraddict\\.com/(?!tags/)[^/]+/.@',array(),true,array(array('extract'=>array('@v\\.traileraddict\\.com/(?\'id\'\\d+)@'),'match'=>array('@traileraddict\\.com/(?!tags/)[^/]+/.@'))),'<iframe width="560" height="315" src="//v.traileraddict.com/{$id}" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>'),
'tumblr'=>array('Tumblr','https://www.tumblr.com/',array('social'=>1),'!(?\'name\'[-\\w]+)\\.tumblr\\.com/post/(?\'id\'\\d+)!',array('!(?\'name\'[-\\w]+)\\.tumblr\\.com/post/(?\'id\'\\d+)!'),true,array(array('extract'=>array('!"embed_did":"(?\'did\'[-\\w]+)!','!"embed_key":"(?\'key\'[-\\w]+)!'),'match'=>array('//'),'url'=>'http://{@name}.tumblr.com/post/{@id}/embed'))),
'twitch'=>array('Twitch','http://www.twitch.tv/',array('gaming'=>1),"#(?'id')twitch\\.tv/(?'channel'(?!m/)\\w+)(?:/b/(?'archive_id'\\d+)|/c/(?'chapter_id'\\d+)|/v/(?'video_id'\\d+))?#\n!(?'id')twitch\\.tv/m/\\d+!",array('#twitch\\.tv/(?\'channel\'(?!m/)\\w+)(?:/b/(?\'archive_id\'\\d+)|/c/(?\'chapter_id\'\\d+)|/v/(?\'video_id\'\\d+))?#'),true,array(array('extract'=>array('!channel=(?\'channel\'\\w+).*?videoId=a(?\'archive_id\'\\d+)!'),'match'=>array('!twitch\\.tv/m/\\d+!')))),
'twitter'=>array('Twitter (via custom iframe)','https://twitter.com/',array('social'=>1),'@twitter\\.com/(?:#!/)?\\w+/status(?:es)?/(?\'id\'\\d+)@',array('@twitter\\.com/(?:#!/)?\\w+/status(?:es)?/(?\'id\'\\d+)@'),7=>'<iframe width="500" height="186" src="//s9e.github.io/iframe/twitter.min.html#{$id}" 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,src.substr(0,src.indexOf(\'/\',8)))" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>',8=>true),
'twitter'=>array('Twitter','https://twitter.com/',array('social'=>1),'@twitter\\.com/(?:#!/)?\\w+/status(?:es)?/(?\'id\'\\d+)@',array('@twitter\\.com/(?:#!/)?\\w+/status(?:es)?/(?\'id\'\\d+)@'),7=>'<iframe width="500" height="186" src="//s9e.github.io/iframe/twitter.min.html#{$id}" 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,src.substr(0,src.indexOf(\'/\',8)))" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>',8=>true),
'ustream'=>array('Ustream','http://www.ustream.tv/',array('gaming'=>1),"!(?'id')ustream\\.tv/recorded/(?'vid'\\d+)!\n#(?'id')ustream\\.tv/(?!explore/|platform/|recorded/|search\\?|upcoming$|user/)(?:channel/)?[-\\w]+#",array('!ustream\\.tv/recorded/(?\'vid\'\\d+)!'),true,array(array('extract'=>array('!embed/(?\'cid\'\\d+)!'),'match'=>array('#ustream\\.tv/(?!explore/|platform/|recorded/|search\\?|upcoming$|user/)(?:channel/)?[-\\w]+#')))),
'vbox7'=>array('VBOX7','http://vbox7.com/',array('.bg'=>1),'!vbox7\\.com/play:(?\'id\'[\\da-f]+)!',array('!vbox7\\.com/play:(?\'id\'[\\da-f]+)!'),7=>'<iframe width="560" height="315" src="http://vbox7.com/emb/external.php?vid={$id}" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>'),
'vevo'=>array('VEVO','http://vevo.com/',array('music'=>1),'!vevo\\.com/watch/([-\\w/]+/)?(?\'id\'[A-Z0-9]+)!',array('!vevo\\.com/watch/([-\\w/]+/)?(?\'id\'[A-Z0-9]+)!'),7=>'<iframe width="575" height="324" src="http://cache.vevo.com/m/html/embed.html?video={$id}" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>'),
Expand All @@ -184,7 +184,7 @@ class s9e_MediaBBCodes
'vk'=>array('VK','https://vk.com/',array('.ru'=>1),"!(?'id')vk(?:\\.com|ontakte\\.ru)/(?:[\\w.]+\\?z=)?video(?'oid'-?\\d+)_(?'vid'\\d+)!\n!(?'id')vk(?:\\.com|ontakte\\.ru)/video_ext\\.php\\?oid=(?'oid'-?\\d+)&id=(?'vid'\\d+)&hash=(?'hash'[0-9a-f]+)!\n!(?'id')(?=.*?[./]vk(?>\\.com|ontakte\\.ru)[:/]).*?vk.*?video-?\\d+_\\d+!",array('!vk(?:\\.com|ontakte\\.ru)/(?:[\\w.]+\\?z=)?video(?\'oid\'-?\\d+)_(?\'vid\'\\d+)!','!vk(?:\\.com|ontakte\\.ru)/video_ext\\.php\\?oid=(?\'oid\'-?\\d+)&id=(?\'vid\'\\d+)&hash=(?\'hash\'[0-9a-f]+)!'),true,array(array('extract'=>array('!\\\\"hash2\\\\":\\\\"(?\'hash\'[0-9a-f]+)!'),'match'=>array('!vk.*?video-?\\d+_\\d+!'),'url'=>'http://vk.com/video{@oid}_{@vid}'))),
'vocaroo'=>array('Vocaroo','http://vocaroo.com/',array('misc'=>1),'!vocaroo\\.com/i/(?\'id\'\\w+)!',array('!vocaroo\\.com/i/(?\'id\'\\w+)!'),7=>'<object type="application/x-shockwave-flash" typemustmatch="" width="148" height="44" data="//vocaroo.com/player.swf?playMediaID={$id}&amp;autoplay=0"><param name="allowfullscreen" value="true"/><embed type="application/x-shockwave-flash" width="148" height="44" src="//vocaroo.com/player.swf?playMediaID={$id}&amp;autoplay=0" allowfullscreen=""/></object>'),
'wshh'=>array('WorldStarHipHop','http://www.worldstarhiphop.com/',array('videos'=>1),"!worldstarhiphop\\.com/featured/(?'id'\\d+)!\n!(?'id')worldstarhiphop\\.com/(?:\\w+/)?video\\.php\\?v=\\w+!",array('!worldstarhiphop\\.com/featured/(?\'id\'\\d+)!'),true,array(array('extract'=>array('!disqus_identifier[ =\']+(?\'id\'\\d+)!'),'match'=>array('!worldstarhiphop\\.com/(?:\\w+/)?video\\.php\\?v=\\w+!'))),'<iframe width="640" height="360" src="//www.worldstarhiphop.com/embed/{$id}" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>'),
'wsj'=>array('The Wall Street Journal Online','http://live.wsj.com/',array('news'=>1),"@live\\.wsj\\.com/[^#]*#!(?'id'[-0-9A-F]{36})@\n@live\\.wsj\\.com/video/[^/]+/(?'id'[-0-9A-F]{36})@",array('@live\\.wsj\\.com/[^#]*#!(?\'id\'[-0-9A-F]{36})@','@live\\.wsj\\.com/video/[^/]+/(?\'id\'[-0-9A-F]{36})@')),
'wsj'=>array('The Wall Street Journal Online','http://www.wsj.com/video/',array('news'=>1),"@wsj\\.com/[^#]*#!(?'id'[-0-9A-F]{36})@\n@wsj\\.com/video/[^/]+/(?'id'[-0-9A-F]{36})@\n@(?'id')on\\.wsj\\.com/\\w@",array('@wsj\\.com/[^#]*#!(?\'id\'[-0-9A-F]{36})@','@wsj\\.com/video/[^/]+/(?\'id\'[-0-9A-F]{36})@'),true,array(array('extract'=>array('@guid=(?\'id\'[-0-9A-F]{36})@'),'match'=>array('@on\\.wsj\\.com/\\w@'))),'<iframe width="512" height="288" src="//video-api.wsj.com/api-video/player/iframe.html?guid={$id}" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>'),
'xboxclips'=>array('XboxClips','http://xboxclips.com/',array('gaming'=>1),'!xboxclips\\.com/(?\'user\'[^/]+)/(?\'id\'[-0-9a-f]+)!',array('!xboxclips\\.com/(?\'user\'[^/]+)/(?\'id\'[-0-9a-f]+)!'),true),
'xboxdvr'=>array('Xbox DVR','http://xboxdvr.com/',array('gaming'=>1),'!xboxdvr\\.com/(?\'user\'[^/]+)/(?\'id\'[-0-9a-f]+)!',array('!xboxdvr\\.com/(?\'user\'[^/]+)/(?\'id\'[-0-9a-f]+)!'),true),
'yahooscreen'=>array('Yahoo! Screen','https://screen.yahoo.com/',array('movies'=>1),'!screen\\.yahoo\\.com/(?:[-\\w]+/)?(?\'id\'[-\\w]+)\\.html!',array('!screen\\.yahoo\\.com/(?:[-\\w]+/)?(?\'id\'[-\\w]+)\\.html!'),7=>'<iframe width="640" height="360" src="https://screen.yahoo.com/{$id}.html?format=embed" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>'),
Expand Down Expand Up @@ -1349,15 +1349,6 @@ public static function renderVk($vars)
return $html;
}

public static function renderWsj($vars)
{
$vars += array('id' => null);

$html='<iframe width="512" height="288" src="http://live.wsj.com/public/page/embed-'.htmlspecialchars(strtr($vars['id'],'-','_'),2).'.html" allowfullscreen="" frameborder="0" scrolling="no" data-s9e=""></iframe>';

return $html;
}

public static function renderXboxclips($vars)
{
$vars += array('id' => null, 'user' => null);
Expand Down
6 changes: 0 additions & 6 deletions tests/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1322,12 +1322,6 @@ function ()
'',
'<iframe width="480" height="302" allowfullscreen="" frameborder="0" scrolling="no" src="//www.ustream.tv/embed/recorded/40688256"></iframe>'
),
array(
'wsj',
'09FB2B3B-583E-4284-99D8-FEF6C23BE4E2',
'',
'<iframe width="512" height="288" src="http://live.wsj.com/public/page/embed-09FB2B3B_583E_4284_99D8_FEF6C23BE4E2.html" allowfullscreen="" frameborder="0" scrolling="no"></iframe>'
),
array(
'xboxclips',
'id=508269a4-6f05-4b3e-a66a-fe4e91e92000;user=Soulshifted',
Expand Down
4 changes: 2 additions & 2 deletions www/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<dd><a href='http://www.msnbc.com/watch'>MSNBC</a></dd>
<dd><a href='http://www.nytimes.com/video/'>The New York Times Video</a></dd>
<dd><a href='http://www.theatlantic.com/video/'>The Atlantic Video</a></dd>
<dd><a href='http://live.wsj.com/'>The Wall Street Journal Online</a></dd>
<dd><a href='http://www.wsj.com/video/'>The Wall Street Journal Online</a></dd>
<dt>podcasts</dt>
<dd><a href='https://audioboom.com/'>audioBoom</a></dd>
<dd><a href='http://www.libsyn.com/'>Libsyn</a></dd>
Expand All @@ -118,7 +118,7 @@
<dd><a href='http://instagram.com/'>Instagram</a></dd>
<dd><a href='http://www.reddit.com/'>Reddit comment permalink</a></dd>
<dd><a href='https://www.tumblr.com/'>Tumblr</a></dd>
<dd><a href='https://twitter.com/'>Twitter (via custom iframe)</a></dd>
<dd><a href='https://twitter.com/'>Twitter</a></dd>
<dd><a href='https://vine.co/'>Vine</a></dd>
<dt>sports</dt>
<dd><a href='http://bleacherreport.com/'>Bleacher Report videos</a></dd>
Expand Down

0 comments on commit bfa6a15

Please sign in to comment.