Ejemplo n.º 1
0
 /**
  * スレッドリンク
  *
  * @param   string $url
  * @param   array $purl
  * @param   string $str
  * @return  string|false
  */
 public function plugin_linkThread($url, $purl, $str)
 {
     global $_conf;
     list($nama_url, $host, $bbs, $key, $ls) = P2Util::detectThread($purl[0]);
     if ($host && $bbs && $key) {
         $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}&ls={$ls}";
         if ($_conf['iframe_popup']) {
             if ($ls && preg_match('/^[0-9\\-n]+$/', $ls)) {
                 $pop_url = $read_url;
             } else {
                 $pop_url = $read_url . '&one=true';
             }
             return $this->iframePopup(array($read_url, $pop_url), $str, $_conf['bbs_win_target_at']);
         }
         return "<a href=\"{$read_url}{$_conf['bbs_win_target_at']}\">{$str}</a>";
     }
     return false;
 }
Ejemplo n.º 2
0
 /**
  * スレッドリンク
  */
 public function plugin_linkThread($url, $purl, $str)
 {
     global $_conf;
     list($nama_url, $host, $bbs, $key, $ls) = P2Util::detectThread($purl[0]);
     if ($host && $bbs && $key) {
         $read_url = "{$_conf['read_php']}?host={$host}&amp;bbs={$bbs}&amp;key={$key}&amp;ls={$ls}";
         return "<a href=\"{$read_url}{$_conf['k_at_a']}\">{$str}</a>";
     }
     return false;
 }
Ejemplo n.º 3
0
/**
 * スレッドを指定する
 */
function kspDetectThread()
{
    global $_conf, $host, $bbs, $key, $ls;
    list($nama_url, $host, $bbs, $key, $ls) = P2Util::detectThread();
    if (!($host && $bbs && $key)) {
        if ($nama_url) {
            $nama_url = htmlspecialchars($nama_url, ENT_QUOTES);
            p2die('スレッドの指定が変です。', "<a href=\"{$nama_url}\">{$nama_url}</a>", true);
        } else {
            p2die('スレッドの指定が変です。');
        }
    }
}
Ejemplo n.º 4
0
/**
 * スレッドを指定する
 */
function detectThread()
{
    global $_conf, $host, $bbs, $key, $ls;
    list($nama_url, $host, $bbs, $key, $ls) = P2Util::detectThread();
    if (!($host && $bbs && $key)) {
        if ($nama_url) {
            $nama_url = p2h($nama_url);
            p2die('スレッドの指定が変です。', "<a href=\"{$nama_url}\">{$nama_url}</a>", true);
        } else {
            p2die('スレッドの指定が変です。');
        }
    }
}