echo $taborn_link_ht; echo $taborn_now_ht; echo $buildnewthread_ht; echo $import_dat_ht; echo "</p>"; } // スペシャルモードでなければフォーム入力補完======================== $ini_url_text = ''; if (!$aThreadList->spmode) { if (P2Util::isHostJbbsShitaraba($aThreadList->host)) { // したらば $ini_url_text = "http://{$aThreadList->host}/bbs/read.cgi?BBS={$aThreadList->bbs}&KEY="; } elseif (P2Util::isHostMachiBbs($aThreadList->host)) { // まちBBS $ini_url_text = "http://{$aThreadList->host}/bbs/read.pl?BBS={$aThreadList->bbs}&KEY="; } elseif (P2Util::isHostMachiBbsNet($aThreadList->host)) { // まちビねっと $ini_url_text = "http://{$aThreadList->host}/test/read.cgi?bbs={$aThreadList->bbs}&key="; } else { $ini_url_text = "http://{$aThreadList->host}/test/read.cgi/{$aThreadList->bbs}/"; } } //if(!$aThreadList->spmode || $aThreadList->spmode=="fav" || $aThreadList->spmode=="recent" || $aThreadList->spmode=="res_hist"){ $onclick_ht = <<<EOP var url_v=document.forms["urlform"].elements["url_text"].value; if (url_v=="" || url_v=="{$ini_url_text}") { alert("見たいスレッドのURLを入力して下さい。 例:http://pc.2ch.net/test/read.cgi/mac/1034199997/"); return false; } EOP; $onclick_ht = htmlspecialchars($onclick_ht, ENT_QUOTES);
/** * 元スレURLを返す * * @access public * @param boolean $original 携帯でも2chのスレURLを返す * @return string URL */ function getMotoThread($original = false) { global $_conf; // 携帯カスタマイズ指定 if ($_conf['ktai'] && !$original && $_conf['k_motothre_external']) { $motothre_url = $this->compileMobile2chUri(); // まちBBS } elseif (P2Util::isHostMachiBbs($this->host)) { // PC if (!$_conf['ktai'] || $original) { /* $motothre_url = sprintf( 'http://%s/bbs/read.cgi?BBS=%s&KEY=%s', $this->host, rawurlencode($this->bbs), rawurlencode($this->key) ); */ $motothre_url = "http://{$this->host}/bbs/read.cgi/{$this->bbs}/{$this->key}/{$this->ls}"; // 携帯 } else { $motothre_url = sprintf('http://%s/bbs/read.cgi?IMODE=TRUE&BBS=%s&KEY=%s', $this->host, rawurlencode($this->bbs), rawurlencode($this->key)); } // まちびねっと } elseif (P2Util::isHostMachiBbsNet($this->host)) { $motothre_url = sprintf('http://%s/test/read.cgi?bbs=%s&key=%s', $this->host, rawurlencode($this->bbs), rawurlencode($this->key)); // JBBSしたらば } elseif (P2Util::isHostJbbsShitaraba($this->host)) { $preg = '{(jbbs\\.shitaraba\\.com|jbbs\\.livedoor\\.com|jbbs\\.livedoor\\.jp)}'; $host_bbs_cgi = preg_replace($preg, '$1/bbs/read.cgi', $this->host); $motothre_url = "http://{$host_bbs_cgi}/{$this->bbs}/{$this->key}/{$this->ls}"; // $motothre_url = "http://{$this->host}/bbs/read.cgi?BBS={$this->bbs}&KEY={$this->key}"; // 2ch系 } elseif (P2Util::isHost2chs($this->host)) { // PC if (!UA::isK() || UA::isIPhoneGroup() || $original) { $motothre_url = "http://{$this->host}/test/read.cgi/{$this->bbs}/{$this->key}/{$this->ls}"; // 携帯 } else { // BBS PINK if (P2Util::isHostBbsPink($this->host)) { // r.iはもう使われていない //$motothre_url = "http://{$this->host}/test/r.i/{$this->bbs}/{$this->key}/{$this->ls}"; $motothre_url = "http://speedo.ula.cc/test/r.so/{$this->host}/{$this->bbs}/{$this->key}/{$this->ls}?guid=ON"; // 2ch(c.2ch) } else { $motothre_url = $this->compileMobile2chUri(); } } // その他 } else { $motothre_url = "http://{$this->host}/test/read.cgi/{$this->bbs}/{$this->key}/{$this->ls}"; } return $motothre_url; }
/** * 元スレURLを返す * * @param bool $force_pc trueなら携帯モードでもPC用の元スレURLを返す * @param string $ls レス表示番号or範囲。nullならlsプロパティを使う * 掲示板によっては無視される場合もある * @return string 元スレURL */ public function getMotoThread($force_pc = false, $ls = null) { global $_conf; if ($force_pc) { $mobile = false; } elseif ($_conf['iphone']) { $mobile = false; } elseif ($_conf['ktai']) { $mobile = true; } else { $mobile = false; } if ($ls === null) { $ls = $this->ls; } // 2ch系 if (P2Util::isHost2chs($this->host)) { // PC if (!$mobile) { $motothre_url = "http://{$this->host}/test/read.cgi/{$this->bbs}/{$this->key}/{$ls}"; // 携帯 } else { if (P2Util::isHostBbsPink($this->host)) { //$motothre_url = "http://{$this->host}/test/r.i/{$this->bbs}/{$this->key}/{$ls}"; $motothre_url = "http://speedo.ula.cc/test/r.so/{$this->host}/{$this->bbs}/{$this->key}/{$ls}"; } else { $mail = rawurlencode($_conf['my_mail']); // c.2chはl指定に非対応なので、代わりにn $ls = substr($ls, 0, 1) == 'l' ? 'n' : $ls; $motothre_url = "http://c.2ch.net/test/--3!mail={$mail}/{$this->bbs}/{$this->key}/{$ls}"; } } // まちBBS } elseif (P2Util::isHostMachiBbs($this->host)) { if ($mobile) { $motothre_url = "http://{$this->host}/bbs/read.pl?IMODE=TRUE&BBS={$this->bbs}&KEY={$this->key}"; } else { $motothre_url = "http://{$this->host}/bbs/read.cgi/{$this->bbs}/{$this->key}/{$ls}"; } // まちびねっと } elseif (P2Util::isHostMachiBbsNet($this->host)) { $motothre_url = "http://{$this->host}/test/read.cgi?bbs={$this->bbs}&key={$this->key}"; if ($mobile) { $motothre_url .= '&imode=true'; } // JBBSしたらば } elseif (P2Util::isHostJbbsShitaraba($this->host)) { list($host, $category) = explode('/', P2Util::adjustHostJbbs($this->host), 2); $bbs_cgi = $mobile ? 'i.cgi' : 'read.cgi'; $motothre_url = "http://{$host}/bbs/{$bbs_cgi}/{$category}/{$this->bbs}/{$this->key}/{$ls}"; // その他 } else { $motothre_url = "http://{$this->host}/test/read.cgi/{$this->bbs}/{$this->key}/{$ls}"; } return $motothre_url; }