FAQ †
リンクプラグインとは? †
- 2ch互換掲示板のスレッドのURL→p2で開けるようにリンク
- AmazonのURL→商品名と画像
- DailymotionのURL→埋め込み動画
- TwitterのURL→ツイート
リンクプラグインはどういう順番で動く? †
- p2が内部リンクする板・スレッドのリンク
- リンクプラグイン(上から順に)
- その他内蔵リンクプラグイン(ImageCache2など)
- 外部リンク
- p2が内部リンクする板・スレッドのリンクにリンクプラグインは働かない
- リンクプラグインが働いたリンクに置換画像URLは働かない
- URLが複数のリンクプラグインにマッチする場合でも、一番上にあるリンクプラグインしか適用されない。
SSLでp2を使っている時だけ一部のリンクプラグインが動作しない †
リンクプラグインリスト †
**サイト名
備考(あれば)
:Match|
Matchの内容
:Replace|
Replaceの内容
2ちゃんねる互換掲示板のスレッド †
- Match
^http://(.+)/test/read\.cgi/(.+)/(\d+)(?:/(.*))$
- Replace(画像P付き)
<a href="read.php?host=\1&bbs=\2&key=\3&ls=\4" onmouseover="showHtmlPopUp('read.php?host=\1&bbs=\2&key=\3&ls=\4;one=true',event,0.2)" onmouseout="offHtmlPopUp()"><img src="img/pop.png" alt="" align="top" border="0" height="12" hspace="2" vspace="0" width="12"></a><a href="read.php?host=\1&bbs=\2&key=\3&ls=\4">$str</a>
- Replace(文字p付き)
<a href="read.php?host=\1&bbs=\2&key=\3&ls=\4" onmouseover="showHtmlPopUp('read.php?host=\1&bbs=\2&key=\3&ls=\4;one=true',event,0.2)" onmouseout="offHtmlPopUp()">(p)</a><a href="read.php?host=\1&bbs=\2&key=\3&ls=\4">$str</a>
- Replace(pなし)
<a href="read.php?host=\1&bbs=\2&key=\3&ls=\4">$str</a>
Amazon.co.jp †
- Match
^https?://(?:www\.)?amazon\.(?:co\.)jp/(?:gp/product|(?:.*?/)?dp)/(\w+).*$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe src="//rcm-fe.amazon-adsystem.com/e/cm?t=1&o=9&p=8&l=as1&asins=\1<1=_blank&f=ifr" style="width:120px;height:240px;" scrolling="no"></iframe>
Dailymotion (2015/05/01更新) †
- Match
^http://(?:dai.ly|www\.dailymotion\.com/video)/([\w^_]+).*$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe style="width:480px;height:270px;max-width:100%;border:none" src="//www.dailymotion.com/embed/video/\1" allowfullscreen></iframe>
Instgram †
- Match
^https://instagram\.com/p/([\w^_]+).*$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe src="http://instagram.com/p/\1/embed" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0;width:320px;height:400px" scrolling="no"></iframe>
ニコニコ動画 (2015/05/01更新) †
- Match
^http://(?:nico\.ms|(?:www\.|sp\.)?nicovideo\.jp/watch)/([\w^_]+).*$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><script type="text/javascript" src="http://ext.nicovideo.jp/thumb_watch/$1?w=490&h=307"></script>
Pastebin.com †
- Match
^http://pastebin\.com/(\w+)$
- Replace
<a href="$ime_url" target="_blank">$str</a><iframe src="http://pastebin.com/embed_iframe.php?i=\1" style="border:none;width:100%"></iframe>
pastebin †
- Match
^https?://(?:www\.)?pastebin\.ca/(\d+)$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe src="//pastebin.ca/embed.php/\1.html" style="border:none;width:100%"></iframe>
pixiv †
- Match
^http://(?:www\.)?pixiv\.net/member_illust.php\?.*illust_id=(\d+).*$
- Replace
<iframe src="http://embed.pixiv.net/code.php?id=\1_0" width="380" height="168" style="background:transparent" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
Twitter (2015/05/01更新) †
- Match
^https?://(?:mobile\.)?twitter\.com/(.+?/status/.+)$
- Replace(レスポップアップで副作用あり)
<a href="$ime_url" target="_blank">$str</a><br><blockquote class="twitter-tweet" style="width:250px;height:250px"><a href="https://twitter.com/\1"></a></blockquote><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
- Replace(サイズ調整されない)
<a href="$ime_url" target="_blank">$str</a><br><iframe style="width:500px;max-width:100%;height:400px;border:none" srcdoc='<blockquote class="twitter-tweet" style="width:250px;height:250px"><a href="https://twitter.com/\1"></a></blockquote><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>'></iframe>
Vine †
- Match
^https?://vine\.co/v/([\w^_]+).*$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe src="https://vine.co/v/\1/embed/simple" width="320" height="320" frameborder="0"></iframe>
xHamster (2015/05/01更新) †
- Match
https?://(?:(?:www|jp)\.)?(?:m\.)?xhamster\.com/movies/(\d+)/.+\.html$
- Repalce
<a href="$ime_url" target="_blank">$str</a><br><iframe style="width:510px;height:400px;max-width:100%;border:none" src="//xhamster.com/xembed.php?video=\1" scrolling="no"></iframe>
XVIDEOS (2015/05/01更新) †
- Match
^http://(?:www|jp)\.xvideos\.com/video(\d+)/.*$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe src="http://flashservice.xvideos.com/embedframe/\1" style="width:510px;height:400px;max-width:100%;border:none" scrolling=no></iframe>
YouTube? (2015/05/01更新) †
- Match
^(?:https?://(?:www\.|m\.|jp\.)?youtube\.(?:com|jp)/(?:watch\?(?:.*&)?(?:v|video_id)=|v/)|(?:https?://youtu\.be/|https://www\.youtube-nocookie\.com/v/))([\w\-_]+)(?:.*)?$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe style="width:640px;height:360px;max-width:100%;border:none" src="//www.youtube.com/embed/\1" allowfullscreen></iframe>
Vimeo †
- Match
^https?://vimeo\.com/(\d+)$
- Replace
<a href="$ime_url" target="_blank">$str</a><br><iframe style="width:500px;height:281px;max-width:100%;border:none" src="https://player.vimeo.com/video/\1?color=00adef&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>