Skip to content

Commit

Permalink
Replaced "tweet" media site with "twitter" media site
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed May 19, 2014
1 parent ceae4e9 commit 276df43
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 26 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,16 @@ Media BB Codes for XenForo, imported from [s9e\TextFormatter](https://github.com
<td>Trailer Addict</td>
<td>http://www.traileraddict.com/the-amazing-spider-man-2/super-bowl-tv-spot</td>
</tr>
<tr>
<td><code>tweet</code></td>
<td>Twitter (via custom iframe)</td>
<td>https://twitter.com/BarackObama/statuses/266031293945503744<br/>https://twitter.com/DerekTVShow/status/463372588690202624<br/>https://twitter.com/#!/BarackObama/status/266031293945503744</td>
</tr>
<tr>
<td><code>twitch</code></td>
<td>Twitch</td>
<td>http://www.twitch.tv/minigolf2000<br/>http://www.twitch.tv/minigolf2000/c/2475925<br/>http://www.twitch.tv/minigolf2000/b/497929990<br/>http://www.twitch.tv/m/57217</td>
</tr>
<tr>
<td><code>twitter</code></td>
<td>Twitter (via custom iframe)</td>
<td>https://twitter.com/BarackObama/statuses/266031293945503744<br/>https://twitter.com/DerekTVShow/status/463372588690202624<br/>https://twitter.com/#!/BarackObama/status/266031293945503744</td>
</tr>
<tr>
<td><code>ustream</code></td>
<td>Ustream</td>
Expand Down
10 changes: 5 additions & 5 deletions build/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<addon addon_id="s9e" title="s9e Media Pack" url="https://github.com/s9e/XenForoMediaBBCodes" version_id="20140519-dev" version_string="201405138" install_callback_class="s9e_MediaBBCodes" install_callback_method="install">
<addon addon_id="s9e" title="s9e Media Pack" url="https://github.com/s9e/XenForoMediaBBCodes" version_id="20140519b" version_string="201405191" install_callback_class="s9e_MediaBBCodes" install_callback_method="install">
<bb_code_media_sites>
<site media_site_id="abcnews" site_title="ABC News" site_url="http://abcnews.go.com/" match_is_regex="1" supported="1">
<match_urls>!abcnews\.go\.com/[^/]+/video/[^/]+-(?'id'\d+)!</match_urls>
Expand Down Expand Up @@ -169,15 +169,15 @@
<match_urls>@(?'id')traileraddict\.com/(?!tags/)[^/]+/.@</match_urls>
<embed_html><![CDATA[<iframe width="560" height="315" src="http://v.traileraddict.com/{$id}" allowfullscreen="" frameborder="0" scrolling="no"></iframe>]]></embed_html>
</site>
<site media_site_id="tweet" site_title="Twitter (via custom iframe)" site_url="https://twitter.com/" match_is_regex="1" supported="1" embed_html_callback_class="s9e_MediaBBCodes" embed_html_callback_method="embed" match_callback_class="s9e_MediaBBCodes" match_callback_method="matchTweet">
<match_urls>@(?'id')(?'url'https://twitter\.com/(?:#!/)?\w+/status(?:es)?/\d+)@</match_urls>
<embed_html><![CDATA[<iframe width="500" height="186" src="//s9e.github.io/iframe/tweet.min.html#{$url}" allowfullscreen="" frameborder="0" onload="var b=this;window.addEventListener('message',function(a){/^https?:\/\/s9e\.github\.io$/.test(a.origin)&amp;&amp;a.data.url&amp;&amp;a.data.height&amp;&amp;b.src==a.data.url&amp;&amp;(b.style.height=a.data.height+'px')});b.contentWindow.postMessage('s9e:init','*')"></iframe>]]></embed_html>
</site>
<site media_site_id="twitch" site_title="Twitch" site_url="http://www.twitch.tv/" match_is_regex="1" supported="1" embed_html_callback_class="s9e_MediaBBCodes" embed_html_callback_method="embed" match_callback_class="s9e_MediaBBCodes" match_callback_method="matchTwitch">
<match_urls>#(?'id')twitch\.tv/(?'channel'(?!m/)\w+)(?:/b/(?'archive_id'[0-9]+)|/c/(?'chapter_id'[0-9]+))?#
!(?'id')twitch\.tv/m/[0-9]+!</match_urls>
<embed_html><![CDATA[<!-- s9e_MediaBBCodes::renderTwitch() -->]]></embed_html>
</site>
<site media_site_id="twitter" site_title="Twitter (via custom iframe)" site_url="https://twitter.com/" match_is_regex="1" supported="1">
<match_urls>@https://twitter\.com/(?:#!/)?\w+/status(?:es)?/(?'id'\d+)@</match_urls>
<embed_html><![CDATA[<iframe width="500" height="186" src="//s9e.github.io/iframe/twitter.min.html#{$id}" allowfullscreen="" frameborder="0" onload="var b=this;window.addEventListener('message',function(a){/^https?:\/\/s9e\.github\.io$/.test(a.origin)&amp;&amp;a.data.url&amp;&amp;a.data.height&amp;&amp;b.src==a.data.url&amp;&amp;(b.style.height=a.data.height+'px')});b.contentWindow.postMessage('s9e:init','*')"></iframe>]]></embed_html>
</site>
<site media_site_id="ustream" site_title="Ustream" site_url="http://www.ustream.tv/" match_is_regex="1" supported="1" embed_html_callback_class="s9e_MediaBBCodes" embed_html_callback_method="embed" match_callback_class="s9e_MediaBBCodes" match_callback_method="matchUstream">
<match_urls>!(?'id')ustream\.tv/recorded/(?'vid'\d+)!
#(?'id')ustream\.tv/(?!explore/|platform/|recorded/|search\?|upcoming$|user/)(?:channel/)?[-\w]+#</match_urls>
Expand Down
8 changes: 0 additions & 8 deletions build/upload/library/s9e/MediaBBCodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,14 +622,6 @@ public static function matchTraileraddict($url)
return self::match($url, $regexps, $scrapes);
}

public static function matchTweet($url)
{
$regexps = array('@(?\'url\'https://twitter\\.com/(?:#!/)?\\w+/status(?:es)?/\\d+)@');
$scrapes = array();

return self::match($url, $regexps, $scrapes);
}

public static function renderTwitch($vars)
{
$vars += array('archive_id' => null, 'channel' => null, 'chapter_id' => null);
Expand Down
14 changes: 7 additions & 7 deletions www/configure.html

Large diffs are not rendered by default.

0 comments on commit 276df43

Please sign in to comment.