892@part32さんのrep2実況モード (+live)

+Wikiパッチ

filewiki_061125_0215.zip

[[単語]]の形式でWikipediaに飛ぶ

function wikipedia($msg) { // [[語句]]があった時にWikipediaへ自動リンクするんだぜ? 
global $_conf; 
$msg = mb_convert_encoding($msg, "UTF-8", "SJIS_win"); // SJISはうざいからUTF-8に変換するんだぜ? 
if($_conf['ktai']){
$wikipedia = "http://ja.wapedia.org/"; // WapediaのURLなんだぜ?
}else{
$wikipedia = "http://ja.wikipedia.org/wiki/"; // WikipediaのURLなんだぜ?
}
$search = "/\[\[[^\[\]\n<>]+\]\]+/"; // 目印となる正規表現なんだぜ?
preg_match_all($search, $msg, $matches); // [[語句]]を探すんだぜ?
$matched = preg_replace("/^\[\[|\]\]$/", "", $matches[0]); // いったん"[["と"]]"を取るんだぜ? 
foreach ($matched as $value) { // リンクに変換するんだぜ? 
$replaced[] = "[[<a href=?"" . P2Util::throughIme($wikipedia . rawurlencode($value)) . "?"" . $_conf['ext_win_target_at'] . ">$value</a>]]"; // しっかりimeを通すんだぜ?
} 
$msg = str_replace($matches[0], $replaced, $msg); // 変換後の本文を戻すんだぜ? 
$msg = mb_convert_encoding($msg, "SJIS_win", "UTF-8"); // UTF-8からSJISに戻すんだぜ? 
return $msg; 
} 
$msg = preg_replace_callback($this->str_to_link_regex, array($this, 'link_callback'), $msg);
return $msg;
$msg = wikipedia($msg); // Wikipediaへの自動リンクなんだぜ。

にくちゃんねる・みみずん検索からDATを取得

filenikutori_sample.zip
$this->downloadDat2ch($this->length);
$this->downloadDat2ch($this->length,$_GET["dat"]);
function downloadDat2ch($from_bytes)
function downloadDat2ch($from_bytes,$dat)
$url = 'http://' . $this->host . "/{$this->bbs}/dat/{$this->key}.dat";
switch($dat){
case 1:
if(strpos($this->host,"bbspink")){
$niku_host = "bbspink-";
}else{
$niku_host = "";
}
$niku_host .= substr($this->host,0,strpos($this->host,"."));
$url = 'http://makimo.to/cgi-bin/html2dat/html2dat.cgi?' . $niku_host . "_{$this->bbs}/" .substr($this->key,0,4) . "/{$this->key}.html";
break;
case 2:
$url = "http://mimizun.com:81/log/2ch/{$this->bbs}/{$this->host}/{$this->bbs}/kako/" .substr($this->key,0,4) . "/" . substr($this->key,0,5) . "/{$this->key}.dat";
break;
default:
$url = 'http://' . $this->host . "/{$this->bbs}/dat/{$this->key}.dat";
break;
}
$dat_response_msg = "<p>2ch info - このスレッドは過去ログ倉庫に格納されています。 [{$marutori_ht}]</p>";
$ktai = $_conf['ktai'] ? "&b=k" : "";
$nikutori_ht = "<a href=\"{$_conf['read_php']}?host={$this->host}&amp;bbs={$this->bbs}&amp;key={$this->key}&amp;ls={$this->ls}&amp;dat=1{$ktai}\">にくちゃんねるからp2に取り込む</a>";
$mimitori_ht = "<a href=\"{$_conf['read_php']}?host={$this->host}&amp;bbs={$this->bbs}&amp;key={$this->key}&amp;ls={$this->ls}&amp;dat=2{$ktai}\">みみずん検索からp2に取り込む</a>";
$dat_response_msg = "<p>2ch info - このスレッドは過去ログ倉庫に格納されています。 [{$marutori_ht}] [{$nikutori_ht}] [{$mimitori_ht}]</p>";

必死チェッカー(スレッド用)

$board=array('ghard', 'gamenews', 'famicom', 'gamerpg', 'gamesrpg', 'handygame', 'gamerobo', 'ff', 'game', 'gamef', 'arc', 'wifi', 'gamechara', 'gamestg', 'gamemusic', 'gamefight', 'gal', 'gsaloon', 'gline', 'newsplus', 'news', 'mnewsplus', 'bizplus', 'news2', 'news4plus', 'aasaloon', 'occult', 'sfx', 'korea', 'av', 'pav', 'stock', 'market', 'baby', 'ms', 'campus', 'livevenus', 'livenhk', 'liveetv', 'liventv', 'livetbs', 'livecx', 'liveanb', 'livetx', 'livemarket1', 'livemarket2', 'jsaloon', 'kouri', 'dog', 'bike', 'f1', 'base', 'mlb', 'hsb', 'soccer', 'football', 'wres', 'keiba', 'ogame', 'ogame2', 'ogame3', 'netgame', 'mmo', 'mmominor', 'anime', 'anime2', 'voice', 'voiceactor', 'doujin', 'comic', 'wcomic', 'musicnews', 'musicj', 'musice', 'jisaku', 'software', 'swf', 'download', 'net', 'news4vip', 'neet4vip');
if($id && ereg("^[a-zA-Z0-9]+\.2ch\.net$",$this->thread->host)){
	if(array_search($this->thread->bbs,$board)){
               preg_match("/(\d{4})\/(\d{2})\/(\d{2})/i",$date_id,$date_array);
               $date = $date_array[1].$date_array[2].$date_array[3];
		if($date){
           $hissi_url=P2Util::throughIme("http://hissi.dyndns.ws/read.php/{$this->thread->bbs}/{$date}/".base64_encode($id).".html");
           $tores.= "<a href=\"{$hissi_url}\" onmouseover=\"showHtmlPopUp('{$hissi_url}',event,0.2)\" onmouseout=\"offHtmlPopUp()\" target=\"_blank\"><img src=\"img/check.png\"></a>";
		}
	}
}

必死チェッカー(板用)

echo "</table>\n";
if(ereg("^[a-zA-Z0-9]+\.2ch\.net$",$aThreadList->host)){
	$board=array('ghard', 'gamenews', 'famicom', 'gamerpg', 'gamesrpg', 'handygame', 'gamerobo', 'ff', 'game', 'gamef', 'arc', 'wifi', 'gamechara', 'gamestg', 'gamemusic', 'gamefight', 'gal', 'gsaloon', 'gline', 'newsplus', 'news', 'mnewsplus', 'bizplus', 'news2', 'news4plus', 'aasaloon', 'occult', 'sfx', 'korea', 'av', 'pav', 'stock', 'market', 'baby', 'ms', 'campus', 'livevenus', 'livenhk', 'liveetv', 'liventv', 'livetbs', 'livecx', 'liveanb', 'livetx', 'livemarket1', 'livemarket2', 'jsaloon', 'kouri', 'dog', 'bike', 'f1', 'base', 'mlb', 'hsb', 'soccer', 'football', 'wres', 'keiba', 'ogame', 'ogame2', 'ogame3', 'netgame', 'mmo', 'mmominor', 'anime', 'anime2', 'voice', 'voiceactor', 'doujin', 'comic', 'wcomic', 'musicnews', 'musicj', 'musice', 'jisaku', 'software', 'swf', 'download', 'net', 'news4vip', 'neet4vip');
	if(array_search($aThreadList->bbs,$board)){
		require_once P2_LIBRARY_DIR . '/filectl.class.php';
		$hissi_url=P2Util::throughIme("http://hissi.dyndns.ws/read.php/{$aThreadList->bbs}/");
		$hissi_ht = <<<EOP
| <a href="{$hissi_url}" target="read">必死チェッカー</a>
EOP;
	}
}
echo "</p>";
echo $hissi_ht;

被参照レス

$url_res = "read.php\?bbs={$this->thread->bbs}&key={$this->thread->key}&host={$this->thread->host}&ls=all&offline=1&field=msg&word=%28%3E%7C%81%84%29%28%5Cd%2B%2C%29*{$i}%5CD&method=regex&match=on&submit_filter=%83t%83B%83%8B%83%5E%95%5C%8E%A6";
$tores .="\n<a href=\"{$url_res}\" onmouseover=\"showHtmlPopUp('{$url_res},renzokupop=true',event,0.2)\" onmouseout=\"offHtmlPopUp()\"><img src=\"img/re.png\"></a>";

スレッドあぼーんワード

filethread_aborn_word_rep2ex-060903-0030.zip

AAを自動で判定し、NGワードにする。(PC)

filerep2-expack rev.060903.0030_AAautoNg.diff

モバイルモードでもレス番号にSPM

            $tores .= "<div id=\"r{$i}\" name=\"r{$i}\">[<font color=\"{$STYLE['mobile_read_newres_color']}\">{$i}</font>]";
            $tores .= "<div id=\"r{$i}\" name=\"r{$i}\">[<font color=\"{$STYLE['mobile_read_newres_color']}\"><a href=\"spm2_k.php\b=k&host={$this->thread->host}&bbs={$this->thread->bbs}&key={$this->thread->key}&offline=1&ktool_value={$i}\">{$i}</a></font>]";
            $tores .= "<div id=\"r{$i}\" name=\"r{$i}\">[{$i}]";
            $tores .= "<div id=\"r{$i}\" name=\"r{$i}\">[<a href=\"spm2_k.php\b=k&host={$this->thread->host}&bbs={$this->thread->bbs}&key={$this->thread->key}&offline=1&ktool_value={$i}\">{$i}</a>]";
filespm2_k.zip

モバイルモードの板内スレッド検索を強化

// フィルタ検索 ==================================================
// チェックフォーム =====================================
// フィルタ検索 ==================================================
// 検索結果

あぼーんされたレスを表示

if($_GET['aborn']) return FALSE;
// ■プリント
	$htm['showaborn']="<a href=\"read.php?aborn=1&".$_SERVER["QUERY_STRING"]."\">さぼり</a>";

| {$htm['dores']} の上あたりに

           | {$htm['showaborn']}
<a href="{$motothre_url}">{$moto_thre_st}</a>
<a href="read.php?aborn=1&{$_SERVER["QUERY_STRING"]}">怠</a>

新着レスが多いスレッドをまとめ読みから除外

if (!$aThreadList->spmode and $sb_view == "shinchaku" and !$_GET['word']) { 
    if ($aThread->unum >= 件数) { 
        unset($aThread); 
        continue; 
    } 
}

スレッド表示であぼーんトグル

<a href="{$motothre_url}">{$moto_thre_st}</a>
<a href="info.php?host={$aThread->host}{$bbs_q}{$key_q}{$ttitle_en_q}&amp;taborn=2{$_conf['k_at_a']}">あぼーん</a>

find.2ch.netをp2で使う

<?
$before= file_get_contents("http://find.2ch.net/?".$_SERVER["QUERY_STRING"]);
//処理は適当
for($i=0;$i<=50;$i++){
	$after=ereg_replace("<dt><a href=\"(.*)\"><b>","<dt><a target=\"read\" href=\"read.php?url=\\1\"><b>",$before);
	if($before==$after){
		break;
	}else{
		$before=$after;
	}
}
     <a href="http://find.2ch.net/" target="_blank" title="2ch公式検索">find.2ch.net</a><br>
     <a href="find2ch.php" target="subject" title="2ch公式検索">find.2ch.net</a><br>

o2onとdatを共有する

       $this->keydat = $dat_host_dir . '/' . $this->bbs . '/' . $this->key . '.dat';
       $this->keydat = $dat_host_dir . '/' . $this->bbs . '/' . substr($this->key,0,4) . '/' . $this->key . '.dat';
       $adat = $dat_host_dir . '/' . $this->bbs . '/' . $this->key . '.dat';
       $adat = $dat_host_dir . '/' . $this->bbs . '/' . substr($key,0,4) . '/' . $this->key . '.dat';
           $dat_path = P2Util::datDirOfHost($host) . '/' . $bbs . '/' . $dat_name;
           $dat_path = P2Util::datDirOfHost($host) . '/' . $bbs . '/' . substr($key,0,4) . '/' . $dat_name;
                           while ($entry = $ddir->read()) {
                               if (preg_match($dat_pattern, $entry2, $matches)) {
                                   $theidx = $idx_bbs_dir."/".$matches[1].".idx";
                                   if (!file_exists($theidx)) {
                                       if ($datlines = @file($dat_bbs_dir."/".$entry)) {
                                           $firstdatline = rtrim($datlines[0]);
                                           if (strstr($firstdatline, "<>")) {
                                               $datline_sepa = "<>";
                                           } else {
                                               $datline_sepa = ",";
                                           }
                                           $d = explode($datline_sepa, $firstdatline);
                                           $atitle = $d[4];
                                           $gotnum = sizeof($datlines);
                                           $readnum = $gotnum;
                                           $anewline = $readnum + 1;
                                           $data = array($atitle, $matches[1], '', $gotnum, '',
                                                       $readnum, '', '', '', $anewline,
                                                       '', '', '');
                                           P2Util::recKeyIdx($theidx, $data);
                                       }
                                   }
                                   // array_push($lines, $idl[0]);
                               }
                           }
                           if( $entry=='.' || $entry=='..' ) continue;
                           if(is_dir($dat_bbs_dir.'/'.$entry)){
                               $ddir = dir($dat_bbs_dir.'/'.$entry);
                               while ($entry2 = $ddir->read()) {
                                   if (preg_match($dat_pattern, $entry2, $matches)) {
                                       $theidx = $idx_bbs_dir."/".$matches[1].".idx";
                                       if (!file_exists($theidx)) {
                                           if ($datlines = @file($dat_bbs_dir."/".$entry2)) {
                                               $firstdatline = rtrim($datlines[0]);
                                               if (strstr($firstdatline, "<>")) {
                                                   $datline_sepa = "<>";
                                               } else {
                                                   $datline_sepa = ",";
                                               }
                                               $d = explode($datline_sepa, $firstdatline);
                                               $atitle = $d[4];
                                               $gotnum = sizeof($datlines);
                                               $readnum = $gotnum;
                                               $anewline = $readnum + 1;
                                               $data = array($atitle, $matches[1], '', $gotnum, '',
                                                           $readnum, '', '', '', $anewline,
                                                           '', '', '');
                                               P2Util::recKeyIdx($theidx, $data);
                                           }
                                       }
                                       // array_push($lines, $idl[0]);
                                   }
                               }
                               $ddir->close();
                           }
   function datDirOfHost($host)
   {
       global $_conf;

    // bbspink
       if( P2Util::isHostBbsPink($host)) {
           $dat_host_dir = $_conf['dat_dir']."/bbspink.com";
       }else if (P2Util::isHost2chs($host)) {
           $dat_host_dir = $_conf['dat_dir']."/2ch.net";
       // machibbs.com
       } elseif (P2Util::isHostMachiBbs($host)) {
           $dat_host_dir = $_conf['dat_dir']."/machi.to";
       } elseif (preg_match('/[^.0-9A-Za-z.\\-_]/', $host) && !P2Util::isHostJbbsShitaraba($host)) {
           $dat_host_dir = $_conf['dat_dir']."/".rawurlencode($host);
           $old_dat_host_dir = $_conf['dat_dir']."/".$host;
           if (is_dir($old_dat_host_dir)) {
               rename($old_dat_host_dir, $dat_host_dir);
               clearstatcache();
           }
       } else {
           $dat_host_dir = $_conf['dat_dir']."/".$host;
       }
       return $dat_host_dir;
   }

rep2→o2onコンバータ(手抜き)

filerep2too2on.zip

pita.stとimepita.jpに対応

   /**
    * ImageCache2サムネイル変換
    */
   function plugin_imageCache2($url, $purl, $str)
   {
       global $_conf;
       global $pre_thumb_unlimited, $pre_thumb_ignore_limit, $pre_thumb_limit;
       static $serial = 0;
       ////////ここから追加///////////////////////////
       $pita =false;
       if (preg_match('{^https?://imepita.jp/.+?$}i', $url) && empty($purl['query'])) {
         $tok = explode("/", $url);
         $url = $tok[0]."//".$tok[2]."/img/trial/".$tok[3]."/".$tok[4].".jpg";
       }
       elseif (preg_match('{^https?://[^\.]+?.pita.st/+?}i', $url) ) {
         $src = file_get_contents($url);
         if(preg_match('{<img src="(https?://image[0-9]+?.pita.st/[^"]+?)"}i', $src, $match)){
           $url = $match[1];
           $pita = true;
         }
       }
       ////////追加ここまで///////////////////////////
       if (preg_match('{^https?://.+?\\.(jpe?g|gif|png)$}i', $url) && empty($purl['query'])) {
       if ((preg_match('{^https?://.+?\\.(jpe?g|gif|png)$}i', $url) && empty($purl['query'])) || $pita == true) {

関連キーワード

filekeyword.zip
  1. wikiから関連キーワードの部分だけ抜き出しました。

datのインポート拡張版

fileimport_ex.zip

携帯閲覧時、外部リンクにz.u.la(z)を利用

611,617d610
<         /// z.u.la
<         $zula_link = '';
<         if (true || $_conf['k_use_zula']) {
<             $zula_url = preg_replace('|^(\w+)://(.+)$|', 'http://z.u.la/$2', $in_url);
<             $zula_link = '<a href="'.$zula_url.'">z</a>';
<         }
629,630c622
<         if ($zula_link && $tsukin_link && $jig_link) {
---
>         if ($tsukin_link && $jig_link) {
635,636c627,628
<         if ($zula_link || $tsukin_link || $jig_link) {
<             $ext_pre = '('.$tsukin_link.$sepa.$jig_link.$sepa.$zula_link.')';
---
>         if ($tsukin_link || $jig_link) {
>             $ext_pre = '('.$tsukin_link.$sepa.$jig_link.')';
747c739
<             if ($_conf['k_use_tsukin'] || $_conf['k_use_zula']) {
---
>             if ($_conf['k_use_tsukin']) {     

<// 携帯閲覧時、外部リンクにz.u.la(z)を利用(する:1, しない:0)
<$conf_user_def['k_use_zula'] = 1; // (1)
<$conf_user_rad['k_use_zula'] = array('1' => 'する', '0' => 'しない');    

あっぷろーど

filehuladance-20110414.zip 874件 [詳細] fileaozora_on_rep2ex-080917-0800.zip 803件 [詳細] filethread_aborn_word_rep2ex-080903-0012.zip 746件 [詳細] filethread_aborn_word_rep2ex-080721-0721.zip 759件 [詳細] filerep2-1.8.14-ic2.diff.bz2 685件 [詳細] fileres_memo_patch.diff 1231件 [詳細] filewiki070831.zip 742件 [詳細] filebeaborn-rep2ex-070818.zip 882件 [詳細] file20070821_imepita_pita.zip 806件 [詳細] fileimport_ex.zip 972件 [詳細] filekeyword.zip 1064件 [詳細] filewiki_060104_1650.zip 775件 [詳細] fileplugin_061219_1230.zip 1470件 [詳細] fileplugin_find2ch.zip 771件 [詳細] filerep2too2on.zip 888件 [詳細] filewiki_061125_0215.zip 1277件 [詳細] filefind2ch.zip 1465件 [詳細] filenikutori_sample.zip 1438件 [詳細] filespm2_k.zip 1610件 [詳細] filerep2-expack rev.060903.0030_AAautoNg.diff 1598件 [詳細] filethread_aborn_word_rep2ex-060903-0030.zip 781件 [詳細]
[添付ファイル一覧] [全ページの添付ファイル一覧]
アップロード可能最大ファイルサイズは 1,024KB です。

「ノースパム」と入力して下さい→

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS