diff -urN p2ex-050610-0100.orig/p2/lib/showthreadk.class.php p2ex-050610-0100.P007_mmobbs/p2/lib/showthreadk.class.php
--- p2ex-050610-0100.orig/p2/lib/showthreadk.class.php 2005-06-10 01:00:11.000000000 +0900
+++ p2ex-050610-0100.P007_mmobbs/p2/lib/showthreadk.class.php 2005-06-10 11:56:40.000000000 +0900
@@ -40,10 +40,13 @@
// URL書き換えハンドラを登録
$this->url_handlers = array(
array('this' => 'plugin_link2ch'),
+ array('this' => 'plugin_linkmmobbs'),
array('this' => 'plugin_linkMachi'),
array('this' => 'plugin_linkJBBS'),
array('this' => 'plugin_link2chKako'),
array('this' => 'plugin_link2chSubject'),
+ array('this' => 'plugin_linkmmobbsKako'),
+ array('this' => 'plugin_linkmmobbsSubject'),
);
if (P2_IMAGECACHE_AVAILABLE == 2) {
$this->url_handlers[] = array('this' => 'plugin_imageCache2');
@@ -716,6 +719,48 @@
}
/**
+ * mmobbs 板リンク
+ */
+ function plugin_linkmmobbsSubject($url, $purl, $str)
+ {
+ global $_conf, $_exconf;
+
+ if (preg_match('{^http://(\\w+\\.(?:mmobbs\\.com))/([^/]+)/$}', $url, $m)) {
+ $subject_url = "{$_conf['subject_php']}?host={$m[1]}&bbs={$m[2]}";
+ return "{$str} [板をp2で開く]";
+ }
+ return FALSE;
+ }
+
+ /**
+ * mmobbs スレッドリンク
+ */
+ function plugin_linkmmobbs($url, $purl, $str)
+ {
+ global $_conf, $_exconf;
+
+ if (preg_match('{^http://(\\w+\\.(?:mmobbs\\.com))/test/read\\.cgi/([^/]+)/([0-9]+)(?:/([^/]+)?)?$}', $url, $m)) {
+ $read_url = "{$_conf['read_php']}?host={$m[1]}&bbs={$m[2]}&key={$m[3]}&ls={$m[4]}";
+ return "{$str}";
+ }
+ return FALSE;
+ }
+
+ /**
+ * mmobbs 過去ログhtml
+ */
+ function plugin_linkmmobbsKako($url, $purl, $str)
+ {
+ global $_conf, $_exconf;
+
+ if (preg_match('{^http://(\\w+(?:\\.mmobbs\\.com))(?:/[^/]+/)?/([^/]+)/kako/\\d+(?:/\\d+)?/(\\d+)\\.html$}', $url, $m)) {
+ $read_url = "{$_conf['read_php']}?host={$m[1]}&bbs={$m[2]}&key={$m[3]}&kakolog=" . rawurlencode($url);
+ return "{$str}";
+ }
+ return FALSE;
+ }
+
+ /**
* まちBBS / JBBS@したらば 内リンク
*/
function plugin_linkMachi($url, $purl, $str)
diff -urN p2ex-050610-0100.orig/p2/lib/showthreadpc.class.php p2ex-050610-0100.P007_mmobbs/p2/lib/showthreadpc.class.php
--- p2ex-050610-0100.orig/p2/lib/showthreadpc.class.php 2005-06-10 01:00:11.000000000 +0900
+++ p2ex-050610-0100.P007_mmobbs/p2/lib/showthreadpc.class.php 2005-06-10 11:56:40.000000000 +0900
@@ -52,10 +52,13 @@
// URL書き換えハンドラを登録
$this->url_handlers = array(
array('this' => 'plugin_link2ch'),
+ array('this' => 'plugin_linkmmobbs'),
array('this' => 'plugin_linkMachi'),
array('this' => 'plugin_linkJBBS'),
array('this' => 'plugin_link2chKako'),
array('this' => 'plugin_link2chSubject'),
+ array('this' => 'plugin_linkmmobbsKako'),
+ array('this' => 'plugin_linkmmobbsSubject'),
);
if (P2_IMAGECACHE_AVAILABLE == 2) {
$this->url_handlers[] = array('this' => 'plugin_imageCache2');
@@ -1194,6 +1197,60 @@
}
/**
+ * mmobbs 板リンク
+ */
+ function plugin_linkmmobbsSubject($url, $purl, $str)
+ {
+ global $_conf, $_exconf;
+
+ if (preg_match('{^http://(\\w+\\.(?:mmobbs\\.com))/([^/]+)/$}', $url, $m)) {
+ $subject_url = "{$_conf['subject_php']}?host={$m[1]}&bbs={$m[2]}";
+ return "{$str} [板をp2で開く]";
+ }
+ return FALSE;
+ }
+
+ /**
+ * mmobbs スレッドリンク
+ */
+ function plugin_linkmmobbs($url, $purl, $str)
+ {
+ global $_conf, $_exconf;
+
+ if (preg_match('{^http://(\\w+\\.(?:mmobbs\\.com))/test/read\\.cgi/([^/]+)/([0-9]+)(?:/([^/]+)?)?$}', $url, $m)) {
+ $read_url = "{$_conf['read_php']}?host={$m[1]}&bbs={$m[2]}&key={$m[3]}&ls={$m[4]}";
+ if ($_conf['iframe_popup']) {
+ if (preg_match('/^[0-9n\\-]+$/', $m[4])) {
+ $pop_url = $url;
+ } else {
+ $pop_url = $read_url . '&one=true';
+ }
+ return $this->iframe_popup(array($read_url, $pop_url), $str, $_conf['bbs_win_target_at']);
+ }
+ return "{$str}";
+ }
+ return FALSE;
+ }
+
+ /**
+ * mmobbs 過去ログhtml
+ */
+ function plugin_linkmmobbsKako($url, $purl, $str)
+ {
+ global $_conf, $_exconf;
+
+ if (preg_match('{^http://(\\w+(?:\\.mmobbs\\.com))(?:/[^/]+/)?/([^/]+)/kako/\\d+(?:/\\d+)?/(\\d+)\\.html$}', $url, $m)) {
+ $read_url = "{$_conf['read_php']}?host={$m[1]}&bbs={$m[2]}&key={$m[3]}&kakolog=" . rawurlencode($url);
+ if ($_conf['iframe_popup']) {
+ $pop_url = $read_url . '&one=true';
+ return $this->iframe_popup(array($read_url, $pop_url), $str, $_conf['bbs_win_target_at']);
+ }
+ return "{$str}";
+ }
+ return FALSE;
+ }
+
+ /**
* まちBBS / JBBS@したらば 内リンク
*/
function plugin_linkMachi($url, $purl, $str)