Example #1
0
 /**
  * コンストラクタ
  */
 public function __construct(ThreadRead $aThread, $matome = false)
 {
     parent::__construct($aThread, $matome);
     global $_conf, $STYLE;
     if ($_conf['iphone']) {
         $this->respopup_at = ' onclick="return iResPopUp(this, event);"';
         $this->target_at = ' target="_blank"';
         $this->check_st = 'check';
     }
     $this->_url_handlers = array('plugin_linkThread', 'plugin_link2chSubject');
     if (P2_IMAGECACHE_AVAILABLE == 2) {
         $this->_url_handlers[] = 'plugin_imageCache2';
     } elseif ($_conf['mobile.use_picto']) {
         $this->_url_handlers[] = 'plugin_viewImage';
     }
     if ($_conf['mobile.link_youtube']) {
         $this->_url_handlers[] = 'plugin_linkYouTube';
     }
     $this->_url_handlers[] = 'plugin_linkURL';
     if (!$_conf['mobile.bbs_noname_name']) {
         $st = new SettingTxt($this->thread->host, $this->thread->bbs);
         $st->setSettingArray();
         if (array_key_exists('BBS_NONAME_NAME', $st->setting_array)) {
             $BBS_NONAME_NAME = $st->setting_array['BBS_NONAME_NAME'];
             if (strlen($BBS_NONAME_NAME)) {
                 $this->_nanashiName = $BBS_NONAME_NAME;
             }
         }
     }
     if (P2Util::isHost2chs($aThread->host)) {
         $this->_kushiYakiName = ' </b>[—\{}@{}@{}-]<b> ';
     }
     if ($_conf['mobile.date_zerosuppress']) {
         $this->_dateIdPattern = '~^(?:' . date('Y|y') . ')/(?:0(\\d)|(\\d\\d))?(?:(/)0)?~';
         $this->_dateIdReplace = '$1$2$3';
     } else {
         $this->_dateIdPattern = '~^(?:' . date('Y|y') . ')/~';
         $this->_dateIdReplace = '';
     }
     // 連続する改行の置換文字列を設定
     /*
     if ($_conf['mobile.strip_linebreaks']) {
         $ngword_color = $GLOBALS['STYLE']['mobile_read_ngword_color'];
         if (strpos($ngword_color, '\\') === false && strpos($ngword_color, '$') === false) {
             $this->_lineBreaksReplace = " <br><s><font color=\"{$ngword_color}\">***</font></s><br> ";
         } else {
             $this->_lineBreaksReplace = ' <br><s>***</s><br> ';
         }
     } else {
         $this->_lineBreaksReplace = null;
     }
     */
     // サムネイル表示制限数を設定
     if (!isset($GLOBALS['pre_thumb_unlimited']) || !isset($GLOBALS['expack.ic2.pre_thumb_limit_k'])) {
         if (isset($_conf['expack.ic2.pre_thumb_limit_k']) && $_conf['expack.ic2.pre_thumb_limit_k'] > 0) {
             $GLOBALS['pre_thumb_limit_k'] = $_conf['expack.ic2.pre_thumb_limit_k'];
             $GLOBALS['pre_thumb_unlimited'] = false;
         } else {
             $GLOBALS['pre_thumb_limit_k'] = null;
             // ヌル値だとisset()はFALSEを返す
             $GLOBALS['pre_thumb_unlimited'] = true;
         }
     }
     $GLOBALS['pre_thumb_ignore_limit'] = false;
     // アクティブモナー初期化
     if (P2_ACTIVEMONA_AVAILABLE) {
         ExpackLoader::initActiveMona($this);
     }
     // ImageCache2初期化
     if (P2_IMAGECACHE_AVAILABLE == 2) {
         ExpackLoader::initImageCache($this);
     }
     // AAS 初期化
     if (P2_AAS_AVAILABLE) {
         ExpackLoader::initAAS($this);
     }
     // SPM初期化
     //if ($this->_matome) {
     //    $this->spmObjName = sprintf('t%dspm%u', $this->_matome, crc32($this->thread->keydat));
     //} else {
     $this->spmObjName = sprintf('spm%u', crc32($this->thread->keydat));
     //}
 }
Example #2
0
 /**
  * @access  protected
  * @return  void
  */
 function setBbsNonameName()
 {
     $st = new SettingTxt($this->thread->host, $this->thread->bbs);
     $st->setSettingArray();
     if (array_key_exists('BBS_NONAME_NAME', $st->setting_array)) {
         $BBS_NONAME_NAME = $st->setting_array['BBS_NONAME_NAME'];
         if (strlen($BBS_NONAME_NAME)) {
             $this->_nanashiName = $BBS_NONAME_NAME;
         }
     }
 }
Example #3
0
        $htm['src_fix'] = <<<EOP
<input type="checkbox" id="fix_source" name="fix_source" value="1"><label for="fix_source">src</label>
EOP;
    }
}
// }}}
// {{{ 書き込みプレビュー
$htm['dpreview_onoff'] = '';
$htm['dpreview_amona'] = '';
$htm['dpreview'] = '';
$htm['dpreview2'] = '';
if (!$_conf['ktai'] && $_conf['expack.editor.dpreview']) {
    $_dpreview_noname = 'null';
    if (P2Util::isHost2chs($host)) {
        $_dpreview_st = new SettingTxt($host, $bbs);
        $_dpreview_st->setSettingArray();
        if (!empty($_dpreview_st->setting_array['BBS_NONAME_NAME'])) {
            $_dpreview_noname = $_dpreview_st->setting_array['BBS_NONAME_NAME'];
            $_dpreview_noname = '"' . StrCtl::toJavaScript($_dpreview_noname) . '"';
        }
    }
    $_dpreview_hide = 'false';
    if ($_conf['expack.editor.dpreview'] == 2) {
        if (P2Util::isBrowserSafariGroup() && basename($_SERVER['SCRIPT_NAME']) != 'post_form.php') {
            $_dpreview_hide = 'true';
        }
        $_dpreview_pos = 'dpreview2';
    } else {
        $_dpreview_pos = 'dpreview';
    }
    $htm[$_dpreview_pos] = <<<EOP