XPressME Integration Kit

Trac

Changeset 145


Ignore:
Timestamp:
Mar 31, 2009, 7:00:25 PM (15 years ago)
Author:
toemon
Message:

抜粋のロジックを、wp-multibyte-patchと同等の処理を行うようにする。 #82
XOOPS,WordPressの表示切替(ユーザ選択)機能 #11
bump Ver0.20

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/blocks/recent_posts_content_block.php

    r142 r145  
    2020                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 
    2121                $disp_count =  ($options[2])?intval($options[2]):10; 
    22                 $except = empty( $options[3] ) ? false : true ; 
    23                 $except_size =  ($options[4])?intval($options[4]):100; 
     22                $excerpt = empty( $options[3] ) ? false : true ; 
     23                $excerpt_size =  ($options[4])?intval($options[4]):100; 
    2424                $date_format = empty( $options[5] ) ? '' : $options[5] ; 
    2525                $time_format = empty( $options[6] ) ? '' : $options[6] ; 
     
    3535                $form .= "<br />"; 
    3636                $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
    37                 $form .= yes_no_radio_option('options[3]', _MB_XPRESS_P_EXCEPT , $except) . "<br />\n"; 
    38                 $form .= _MB_XPRESS_P_EXCEPT_SIZE .": <input type='text' name='options[4]' value='" . $except_size . "' /><br />\n"; 
     37                $form .= yes_no_radio_option('options[3]', _MB_XPRESS_P_EXCERPT , $excerpt) . "<br />\n"; 
     38                $form .= _MB_XPRESS_P_EXCERPT_SIZE .": <input type='text' name='options[4]' value='" . $excerpt_size . "' /><br />\n"; 
    3939                $form .= _MB_XPRESS_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n"; 
    4040                $form .= _MB_XPRESS_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n"; 
  • trunk/language/ja_utf8/blocks.php

    r142 r145  
    3636         
    3737// recent posts content 
    38         define("_MB_XPRESS_P_EXCEPT","記事を概要で表示する"); 
    39         define("_MB_XPRESS_P_EXCEPT_SIZE","記事の概要文字数"); 
     38        define("_MB_XPRESS_P_EXCERPT","記事を概要で表示する"); 
     39        define("_MB_XPRESS_P_EXCERPT_SIZE","記事の概要文字数"); 
    4040        define("_MB_XPRESS_CATS_SELECT","対象のカテゴリー選択"); 
    4141        define("_MB_XPRESS_TAGS_SELECT","対象のタグ選択(複数ある場合はカンマ区切りで入力"); 
  • trunk/wp-config.php

    r137 r145  
    8585        require_once(ABSPATH.'wp-settings.php'); 
    8686        wp(); 
    87         ob_start();      
     87        if (is_wordpress_style()) { 
    8888                require_once( ABSPATH . WPINC . '/template-loader.php' ); 
    89                 $wp_output = ob_get_contents(); 
    90         ob_end_clean(); 
    91         require_once( ABSPATH .'/include/xpress_render.php' ); 
    92         xpress_render($wp_output); 
     89        } else { 
     90                ob_start();      
     91                        require_once( ABSPATH . WPINC . '/template-loader.php' ); 
     92                        $wp_output = ob_get_contents(); 
     93                ob_end_clean(); 
     94                require_once( ABSPATH .'/include/xpress_render.php' ); 
     95                xpress_render($wp_output); 
     96        } 
     97                 
    9398         
    9499        //When there is no block cache, and an optional block is different, cache is refreshed.  
  • trunk/wp-content/plugins/xpressme/include/custom_functions.php

    r144 r145  
    3131function xpress_is_theme_sidebar_disp(){ 
    3232        global $xpress_config; 
     33        if (is_wordpress_style()) return true; 
    3334        return $xpress_config->is_theme_sidebar_disp; 
    3435}        
     
    276277} 
    277278 
    278 function xpress_the_content($more_link_text = '',$excerpt_size = 0,$show = true) 
    279 { 
    280         $content = get_the_content();    
    281         if($excerpt_size > 0) { 
    282  
    283                 $content = apply_filters('the_excerpt_rss', $content); 
    284                 $content = strip_tags($content); 
    285  
    286                 if (mb_strlen($content) > $excerpt_size){  
    287                         $content = mb_substr($content, 0, $excerpt_size);  
    288                         $content .= '... '; 
    289                         if (!empty($more_link_text)) $content .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>'; 
     279function get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text = '') { 
     280        global $post,$xpress_config; 
     281         
     282        $blog_encoding = get_option('blog_charset'); 
     283        $text = get_the_content(''); 
     284        $text = strip_shortcodes( $text ); 
     285        $text = apply_filters('the_content', $text); 
     286        $text = str_replace(']]>', ']]&gt;', $text); 
     287        $text = strip_tags($text); 
     288        $is_almost_ascii = ($xpress_config->ascii_judged_rate < round(@(mb_strlen($text, $blog_encoding) / strlen($text)) * 100)) ? true : false; 
     289        if($is_almost_ascii) { 
     290                $words = explode(' ', $text, $excerpt_length_word + 1); 
     291 
     292                if(count($words) > $excerpt_length_word) { 
     293                        array_pop($words); 
     294                        array_push($words, ' ... '); 
     295                        $text = implode(' ', $words); 
     296                        if (!empty($more_link_text)) $text .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>'; 
     297 
    290298                } 
    291299        } 
     300        elseif(mb_strlen($text, $blog_encoding) > $excerpt_length_character) { 
     301                $text = mb_substr($text, 0, $xpress_config->excerpt_length_character, $blog_encoding) . ' ... '; 
     302                if (!empty($more_link_text)) $text .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>'; 
     303        } 
     304 
     305        return $text; 
     306} 
     307 
     308function xpress_the_content($more_link_text = null, $stripteaser = 0, $more_file = '',$show = true) 
     309{ 
     310        global $post,$xpress_config; 
     311         
     312         
     313        if ($xpress_config->is_content_excerpt){ 
     314                $excerpt_length_word = $xpress_config->excerpt_length_word; 
     315                $excerpt_length_character = $xpress_config->excerpt_length_character; 
     316                $more_link_text = $xpress_config->more_link_text; 
     317                $content = get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text); 
     318        } else { 
     319                $content = get_the_content($more_link_text,$stripteaser,$more_file); 
     320                $content = apply_filters('the_content', $content); 
     321                $content = str_replace(']]>', ']]&gt;', $content); 
     322        }        
    292323        if(empty($show)) return $content; 
    293324        echo $content; 
  • trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r141 r145  
    154154        }  
    155155} 
     156function is_wordpress_style() 
     157{ 
     158        global $xpress_config; 
     159         
     160        if ($xpress_config->viewer_type == 'wordpress') return true; 
     161        if ($xpress_config->viewer_type == 'xoops') return false; 
     162         
     163        // user select 
     164        $get_style = isset($_GET["style"]) ? $_GET["style"] : ''; 
     165        $cookie_style = isset($_COOKIE["xpress_style"]) ? $_COOKIE["xpress_style"] : ''; 
     166         
     167        // set style 
     168        if (!empty($get_style)){ 
     169                $style = $get_style; 
     170        } else { 
     171                if (!empty($cookie_style)){ 
     172                        $style = $cookie_style; 
     173                } else { 
     174                        $style = 'x'; 
     175                } 
     176        } 
     177         
     178        // set cookie 
     179        if (empty($cookie_style)){ 
     180                setcookie("xpress_style", $style); 
     181                $_COOKIE["xpress_style"] = $style; 
     182        } else { 
     183                if ($style != $cookie_style) { 
     184                        setcookie("xpress_style", $style); 
     185                        $_COOKIE["xpress_style"] = $style; 
     186                } 
     187        } 
     188        if ($style == 'w') { 
     189                return true; 
     190        } else {  
     191                return false; 
     192        } 
     193} 
     194 
     195function wp_meta_add_xpress_menu() 
     196{ 
     197        global $xpress_config; 
     198        if ($xpress_config->viewer_type == 'user_select'){ 
     199                echo disp_mode_set(); 
     200        } 
     201        if (function_exists('wp_theme_switcher') ) {     
     202                echo '<li>' . __('Themes') . ':'; 
     203                wp_theme_switcher('dropdown'); 
     204                echo '</li>'; 
     205        } 
     206} 
     207 
     208function disp_mode_set(){ 
     209        global $xpress_config; 
     210         
     211        $select =""; 
     212        if ($xpress_config->viewer_type == 'user_select'){ 
     213                $style = isset($_GET["style"]) ? $_GET["style"] : (isset($_COOKIE["xpress_style"]) ? $_COOKIE["xpress_style"] : ""); 
     214 
     215                switch($style) { 
     216                case 'w': 
     217                        $select ='<li><a href="'.get_settings('siteurl').'/?style=x" title="'. __('Switch to XOOPS mode','xpressme').'">'.__('Switch to XOOPS mode','xpressme').'</a></li>'; 
     218//                      $select.='<img src="'. get_settings('siteurl').'/images/external.png" alt="'.__('Switch to XOOPS mode','xpressme') . '"></a></li>'; 
     219                        break; 
     220                case 'x': 
     221                        $select='<li><a href="'.get_settings('siteurl').'/?style=w" title="'.__('Switch to WordPress mode','xpressme').'">'.__('Switch to WordPress mode','xpressme').'</a></li>'; 
     222                        break; 
     223                default: 
     224                        $select='<li><a href="'.get_settings('siteurl').'/?style=w" title="'.__('Switch to WordPress mode','xpressme').'">'.__('Switch to WordPress mode','xpressme').'</a></li>'; 
     225                        break; 
     226                } 
     227        } 
     228        return $select; 
     229} 
     230 
     231 
    156232?> 
  • trunk/wp-content/plugins/xpressme/language/xpressme-ja.po

    r143 r145  
    33"Project-Id-Version: XPressME Plugin\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2009-03-30 17:58+0900\n" 
     5"PO-Revision-Date: 2009-03-31 17:36+0900\n" 
    66"Last-Translator: toemon <toychee@toemon.com>\n" 
    77"Language-Team: \n" 
     
    1515"X-Poedit-SearchPath-0: .\n" 
    1616 
    17 #: xpressme_class.php:36 
     17#: xpressme_class.php:42 
    1818msgid "XPressME Settings" 
    1919msgstr "XPressME設定" 
    2020 
    21 #: xpressme_class.php:53 
    22 #: xpressme_class.php:167 
     21#: xpressme_class.php:59 
     22#: xpressme_class.php:186 
    2323msgid "Older Post" 
    2424msgstr "前の投稿へ" 
    2525 
    26 #: xpressme_class.php:54 
    27 #: xpressme_class.php:169 
    28 #, fuzzy 
     26#: xpressme_class.php:60 
     27#: xpressme_class.php:188 
    2928msgid "Newer Post" 
    3029msgstr "次の投稿へ" 
    3130 
    32 #: xpressme_class.php:56 
    33 #: xpressme_class.php:172 
     31#: xpressme_class.php:62 
     32#: xpressme_class.php:191 
    3433msgid "Older Entries" 
    3534msgstr "前ページへ" 
    3635 
    37 #: xpressme_class.php:57 
    38 #: xpressme_class.php:174 
     36#: xpressme_class.php:63 
     37#: xpressme_class.php:193 
    3938msgid "Newer Entries" 
    4039msgstr "次ページへ" 
    4140 
    42 #: xpressme_class.php:218 
    43 #: xpressme_class.php:234 
    44 #: xpressme_class.php:530 
    45 #: xpressme_class.php:535 
    46 #: xpressme_class.php:545 
    47 #: xpressme_class.php:550 
     41#: xpressme_class.php:77 
     42msgid "more" 
     43msgstr "続きを読む" 
     44 
     45#: xpressme_class.php:244 
     46#: xpressme_class.php:260 
     47#: xpressme_class.php:628 
     48#: xpressme_class.php:633 
     49#: xpressme_class.php:643 
     50#: xpressme_class.php:648 
    4851msgid "YES" 
    4952msgstr "はい" 
    5053 
    51 #: xpressme_class.php:219 
    52 #: xpressme_class.php:235 
    53 #: xpressme_class.php:531 
    54 #: xpressme_class.php:536 
    55 #: xpressme_class.php:546 
    56 #: xpressme_class.php:551 
     54#: xpressme_class.php:245 
     55#: xpressme_class.php:261 
     56#: xpressme_class.php:629 
     57#: xpressme_class.php:634 
     58#: xpressme_class.php:644 
     59#: xpressme_class.php:649 
    5760msgid "NO" 
    5861msgstr "いいえ" 
    5962 
    60 #: xpressme_class.php:277 
     63#: xpressme_class.php:303 
    6164msgid "Single Post Navi Setting" 
    6265msgstr "シングルポストナビの設定" 
    6366 
    64 #: xpressme_class.php:282 
    65 #: xpressme_class.php:327 
     67#: xpressme_class.php:308 
     68#: xpressme_class.php:353 
    6669msgid "Adjustment of Navi link display position" 
    6770msgstr "リンクの表示位置設定" 
    6871 
    69 #: xpressme_class.php:285 
     72#: xpressme_class.php:311 
    7073msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 
    7174msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示" 
    7275 
    73 #: xpressme_class.php:286 
     76#: xpressme_class.php:312 
    7477msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 
    7578msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 
    7679 
    77 #: xpressme_class.php:292 
     80#: xpressme_class.php:318 
    7881msgid "Select Display name of PostNavi Link" 
    7982msgstr "表示するリンクテキストを選択" 
    8083 
    81 #: xpressme_class.php:295 
     84#: xpressme_class.php:321 
    8285msgid "Title of post" 
    8386msgstr "投稿記事のタイトルを表示" 
    8487 
    85 #: xpressme_class.php:296 
     88#: xpressme_class.php:322 
    8689msgid "Title of Navi" 
    8790msgstr "ナビタイトルを表示" 
    8891 
    89 #: xpressme_class.php:302 
     92#: xpressme_class.php:328 
    9093msgid "Display Navi Title of Old Post Link" 
    9194msgstr "古い記事へのナビタイトルを設定" 
    9295 
    93 #: xpressme_class.php:309 
     96#: xpressme_class.php:335 
    9497msgid "Display Navi Title of Newer Post Link" 
    9598msgstr "より新しい記事へのナビタイトルを設定" 
    9699 
    97 #: xpressme_class.php:322 
     100#: xpressme_class.php:348 
    98101msgid "Posts List Page Navi Setting" 
    99102msgstr "ポストリストページナビの設定" 
    100103 
    101 #: xpressme_class.php:330 
     104#: xpressme_class.php:356 
    102105msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right" 
    103106msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示" 
    104107 
    105 #: xpressme_class.php:331 
     108#: xpressme_class.php:357 
    106109msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right" 
    107110msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示" 
    108111 
    109 #: xpressme_class.php:337 
     112#: xpressme_class.php:363 
    110113msgid "Display Navi Title of Old Page Link" 
    111114msgstr "古いページへのナビタイトルを設定" 
    112115 
    113 #: xpressme_class.php:344 
     116#: xpressme_class.php:370 
    114117msgid "Display Navi Title of Newer Page Link" 
    115118msgstr "より新しいページへのナビタイトルを設定" 
    116119 
    117 #: xpressme_class.php:359 
     120#: xpressme_class.php:385 
    118121msgid "Role Setting at Login" 
    119122msgstr "ログイン時の権限設定" 
    120123 
    121 #: xpressme_class.php:362 
     124#: xpressme_class.php:388 
    122125msgid "XOOPS Groupe" 
    123126msgstr "XOOPSグループ名" 
    124127 
    125 #: xpressme_class.php:362 
     128#: xpressme_class.php:388 
    126129msgid "WordPress Role" 
    127130msgstr "WordPressでの権限" 
    128131 
    129 #: xpressme_class.php:362 
     132#: xpressme_class.php:388 
    130133msgid "Role is set at each login" 
    131134msgstr "ログイン時、常に権限を更新する" 
    132135 
    133 #: xpressme_class.php:388 
    134 #: xpressme_class.php:392 
    135 #: xpressme_class.php:395 
     136#: xpressme_class.php:414 
     137#: xpressme_class.php:418 
     138#: xpressme_class.php:421 
    136139msgid "Default Role of WordPress" 
    137140msgstr "WordPressのデフォルト権限" 
    138141 
    139 #: xpressme_class.php:389 
    140 #: xpressme_class.php:393 
    141 #: xpressme_class.php:396 
     142#: xpressme_class.php:415 
     143#: xpressme_class.php:419 
     144#: xpressme_class.php:422 
    142145msgid "Group User Doesn't Register" 
    143146msgstr "ユーザ登録しない" 
    144147 
    145 #: xpressme_class.php:425 
     148#: xpressme_class.php:451 
    146149msgid "Do Not Comment Integration." 
    147150msgstr "コメント統合しません。" 
    148151 
    149 #: xpressme_class.php:459 
     152#: xpressme_class.php:485 
    150153msgid "Comment integration with D3Forum" 
    151154msgstr "D3Forumとのコメント統合" 
    152155 
    153 #: xpressme_class.php:461 
     156#: xpressme_class.php:487 
    154157msgid "Select the forum of D3Forum that does the comment integration from the following lists." 
    155158msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。" 
    156159 
    157 #: xpressme_class.php:465 
     160#: xpressme_class.php:491 
    158161msgid "Select the Type of display of D3Forum comment." 
    159162msgstr "D3Forumの表示タイプを選択" 
    160163 
    161 #: xpressme_class.php:467 
    162 #: xpressme_class.php:470 
     164#: xpressme_class.php:493 
     165#: xpressme_class.php:496 
    163166msgid "Flat" 
    164167msgstr "フラット" 
    165168 
    166 #: xpressme_class.php:468 
    167 #: xpressme_class.php:471 
     169#: xpressme_class.php:494 
     170#: xpressme_class.php:497 
    168171msgid "Threaded" 
    169172msgstr "スレッド" 
    170173 
    171 #: xpressme_class.php:474 
     174#: xpressme_class.php:500 
    172175msgid "Select the order of display of D3Forum comment." 
    173176msgstr "D3Forumコメントの表示順を選択" 
    174177 
    175 #: xpressme_class.php:476 
    176 #: xpressme_class.php:479 
     178#: xpressme_class.php:502 
     179#: xpressme_class.php:505 
    177180msgid "DESC" 
    178181msgstr "降順" 
    179182 
    180 #: xpressme_class.php:477 
    181 #: xpressme_class.php:480 
     183#: xpressme_class.php:503 
     184#: xpressme_class.php:506 
    182185msgid "ASC" 
    183186msgstr "昇順" 
    184187 
    185 #: xpressme_class.php:483 
     188#: xpressme_class.php:509 
    186189msgid "Number of displays of D3Forum comments." 
    187190msgstr "D3Forumのコメント表示数" 
    188191 
    189 #: xpressme_class.php:487 
     192#: xpressme_class.php:513 
    190193msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. " 
    191194msgstr "WordPressコメントとD3Forumポスト間の一括転送(エクスポート・インポート)" 
    192195 
    193 #: xpressme_class.php:488 
     196#: xpressme_class.php:514 
    194197msgid "Export to D3Forum" 
    195198msgstr "D3Forumへ一括エクスポート" 
    196199 
    197 #: xpressme_class.php:489 
     200#: xpressme_class.php:515 
    198201msgid "Import from D3Forum" 
    199202msgstr "D3Forumから一括インポート" 
    200203 
    201 #: xpressme_class.php:520 
     204#: xpressme_class.php:527 
     205msgid "Contents Excerpt Setting" 
     206msgstr "記事抜粋の設定" 
     207 
     208#: xpressme_class.php:532 
     209msgid "Is the excerpt display done with the archive of contents?" 
     210msgstr "記事のアーカイブで抜粋表示を行いますか?" 
     211 
     212#: xpressme_class.php:539 
     213msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. " 
     214msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。" 
     215 
     216#: xpressme_class.php:546 
     217msgid "Excerpt length of word for ASCII contents" 
     218msgstr "ASCIIコンテンツの抜粋単語数" 
     219 
     220#: xpressme_class.php:553 
     221msgid "Excerpt length of character for multibyte contents" 
     222msgstr "マルチバイトコンテンツの抜粋文字数" 
     223 
     224#: xpressme_class.php:560 
     225msgid "More Link Text (Is not displayed for the blank.)" 
     226msgstr "Moreリンクテキスト(ブランクの場合リンクを表示しません。)" 
     227 
     228#: xpressme_class.php:572 
     229msgid "Display Mode Setting" 
     230msgstr "表示モード設定" 
     231 
     232#: xpressme_class.php:575 
     233msgid "Select the XPressME Display Mode." 
     234msgstr "XPressMEの表示モードの選択" 
     235 
     236#: xpressme_class.php:580 
     237msgid "Xoops Mode" 
     238msgstr "XOOPSモード" 
     239 
     240#: xpressme_class.php:584 
     241msgid "WordPress Mode" 
     242msgstr "WordPressモード" 
     243 
     244#: xpressme_class.php:588 
     245msgid "User select" 
     246msgstr "ユーザによる選択" 
     247 
     248#: xpressme_class.php:617 
    202249msgid "XPressME Configuration Page" 
    203250msgstr "XPressMEの設定ページ" 
    204251 
    205 #: xpressme_class.php:524 
     252#: xpressme_class.php:622 
    206253msgid "Media Upload Base Path" 
    207254msgstr "メディアアップロードのベースパス設定" 
    208255 
    209 #: xpressme_class.php:525 
     256#: xpressme_class.php:623 
    210257msgid "Use XOOPS UPLOAD PATH" 
    211258msgstr "XOOPSのアップロードパスを使用する。" 
    212259 
    213 #: xpressme_class.php:526 
     260#: xpressme_class.php:624 
    214261msgid "USE WordPress BASE_PATH" 
    215262msgstr "WordPressのベースパスを使用する。" 
    216263 
    217 #: xpressme_class.php:529 
     264#: xpressme_class.php:627 
    218265msgid "Thema Sidebar Display" 
    219266msgstr "テーマ表示時にサイドバー表示する。" 
    220267 
    221 #: xpressme_class.php:534 
     268#: xpressme_class.php:632 
    222269msgid "The change tracking of the post is preserved" 
    223270msgstr "投稿の変更履歴を有効にする。" 
    224271 
    225 #: xpressme_class.php:544 
     272#: xpressme_class.php:642 
    226273msgid "Is the posts author views counted?" 
    227274msgstr "投稿者の閲覧をカウントしますか?" 
    228275 
    229 #: xpressme_class.php:549 
     276#: xpressme_class.php:647 
    230277msgid "Is SQL debugging window displayed?" 
    231278msgstr "SQLデバッグウィンドを表示しますか?" 
    232279 
    233 #: xpressme_class.php:561 
     280#: xpressme_class.php:659 
    234281msgid "Update Config" 
    235282msgstr "更新" 
    236283 
    237 #: xpressme_class.php:562 
     284#: xpressme_class.php:660 
    238285msgid "Preset Config" 
    239286msgstr "プリセット" 
    240287 
    241 #: include/custom_functions.php:231 
     288#: include/custom_functions.php:232 
    242289#, php-format 
    243290msgid "views :%d" 
    244291msgstr "閲覧数 :%d" 
    245292 
    246 #: include/custom_functions.php:317 
     293#: include/custom_functions.php:348 
    247294msgid "Main" 
    248295msgstr "メイン" 
    249296 
    250 #: include/custom_functions.php:319 
     297#: include/custom_functions.php:350 
    251298#, php-format 
    252299msgid "Archive for the &#8216;%s&#8217; Category" 
    253300msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ" 
    254301 
    255 #: include/custom_functions.php:321 
     302#: include/custom_functions.php:352 
    256303#, php-format 
    257304msgid "Posts Tagged &#8216;%s&#8217;" 
    258305msgstr "&#8216;%s&#8217; タグのついている投稿" 
    259306 
    260 #: include/custom_functions.php:323 
     307#: include/custom_functions.php:354 
    261308#, php-format 
    262309msgid "Archive for %s|Daily archive page" 
    263310msgstr "%sの日別アーカイブ" 
    264311 
    265 #: include/custom_functions.php:323 
     312#: include/custom_functions.php:354 
    266313msgid "F jS, Y" 
    267314msgstr "Y年n月j日" 
    268315 
    269 #: include/custom_functions.php:325 
     316#: include/custom_functions.php:356 
    270317#, php-format 
    271318msgid "Archive for %s|Monthly archive page" 
    272319msgstr "%sの月別アーカイブ" 
    273320 
    274 #: include/custom_functions.php:325 
     321#: include/custom_functions.php:356 
    275322msgid "F, Y" 
    276323msgstr "Y年n月" 
    277324 
    278 #: include/custom_functions.php:327 
     325#: include/custom_functions.php:358 
    279326#, php-format 
    280327msgid "Archive for %s|Yearly archive page" 
    281328msgstr "%sの年別アーカイブ " 
    282329 
    283 #: include/custom_functions.php:327 
     330#: include/custom_functions.php:358 
    284331msgid "Y" 
    285332msgstr "Y年" 
    286333 
    287 #: include/custom_functions.php:329 
     334#: include/custom_functions.php:360 
    288335#, php-format 
    289336msgid "Archive for the &#8216;%s&#8217; Author" 
    290337msgstr "投稿者 &#8216;%s&#8217; のアーカイブ" 
    291338 
    292 #: include/custom_functions.php:331 
     339#: include/custom_functions.php:362 
    293340#, php-format 
    294341msgid "Search Results of word &#8216;%s&#8217;" 
  • trunk/wp-content/plugins/xpressme/xpressme.php

    r144 r145  
    2727        remove_action( 'pre_post_update', 'wp_save_post_revision' );                    // Not Save Post Revision 
    2828} 
     29add_action("wp_meta" , "wp_meta_add_xpress_menu");                      // add xpress menu  in wp_meta 
    2930 
    3031//XOOPS Bloack Cache Refresh 
  • trunk/wp-content/plugins/xpressme/xpressme_class.php

    r143 r145  
    2222        var $d3forum_forum_id; 
    2323        var $d3forum_external_link_format; 
     24        var $is_content_excerpt; 
     25        var $ascii_judged_rate; 
     26        var $excerpt_length_word; 
     27        var $excerpt_length_character; 
     28        var $more_link_text; 
     29        var $viewer_type; 
    2430        //constructor 
    2531        function XPressME_Class() 
     
    4753        { 
    4854                $this->is_use_xoops_upload_path = true; 
    49                 $this->is_theme_sidebar_disp = true; 
     55                $this->is_theme_sidebar_disp = false; 
    5056                $this->is_save_post_revision = true; 
    5157                $this->is_postnavi_title_disp = true; 
     
    6571                $this->is_d3forum_desc = true; 
    6672                $this->d3forum_views_num = 10; 
     73                $this->is_content_excerpt = true; 
     74                $this->ascii_judged_rate = 90; 
     75                $this->excerpt_length_word = 40; 
     76                $this->excerpt_length_character = 120; 
     77                $this->more_link_text = __('more', 'xpressme'); 
     78                $this->viewer_type = 'xoops'; 
     79 
    6780        } 
    6881         
     
    105118                        'is_d3forum_flat' => $this->is_d3forum_flat, 
    106119                        'is_d3forum_desc' => $this->is_d3forum_desc, 
    107                         'd3forum_views_num' =>$this->d3forum_views_num 
     120                        'd3forum_views_num' =>$this->d3forum_views_num, 
     121                        'is_content_excerpt' => $this->is_content_excerpt, 
     122                        'ascii_judged_rate' => $this->ascii_judged_rate, 
     123                        'excerpt_length_word' => $this->excerpt_length_word, 
     124                        'excerpt_length_character' => $this->excerpt_length_character, 
     125                        'more_link_text' => $this->more_link_text, 
     126                        'viewer_type' => $this->viewer_type 
    108127                ); 
    109128                if ($mode == 'add_new') { 
     
    193212                $this->d3forum_views_num = stripslashes(trim($_POST['ch_d3forum_view_num'])); 
    194213                 
     214                $this->is_content_excerpt = stripslashes(trim($_POST['ch_is_content_excerpt'])); 
     215                $this->ascii_judged_rate = stripslashes(trim($_POST['ch_ascii_judged_rate'])); 
     216                $this->excerpt_length_word = stripslashes(trim($_POST['ch_excerpt_length_word'])); 
     217                $this->excerpt_length_character = stripslashes(trim($_POST['ch_excerpt_length_character'])); 
     218                $this->more_link_text = stripslashes(trim($_POST['ch_more_link_text'])); 
     219                $this->viewer_type = stripslashes(trim($_POST['ch_viewer_type'])); 
     220                 
    195221                global $xoops_db; 
    196222                $table = get_wp_prefix() . 'group_role';         
     
    226252                $form .=  $this->yes_no_radio_option_sub($option_name,$yes,$no); 
    227253                $form .=  "</td>\n"; 
    228                 $form .=  "</tr><tr>\n"; 
     254                $form .=  "</tr>\n"; 
    229255                         
    230256            return $form; 
     
    257283                $form .= $this->text_option_sub($option_name); 
    258284                $form .=  "</td>\n"; 
    259                 $form .=  "</tr><tr>\n"; 
     285                $form .=  "</tr>\n"; 
    260286                         
    261287            return $form; 
     
    496522                return $form; 
    497523        } 
     524         
     525        function excerpt_option(){ 
     526                $form = ''; 
     527                $form .= '<tr><th><label for="excerpt">' .__('Contents Excerpt Setting', 'xpressme') . '</label></th>'; 
     528                $form .= "<td>\n"; 
     529                $form .= "<table>\n"; 
     530                $form .= "<tr>\n"; 
     531                 
     532                $form .= "<td>" . __('Is the excerpt display done with the archive of contents?','xpressme') . "</td>\n";                
     533                $form .= "<td>\n"; 
     534                $form .=  $this->yes_no_radio_option_sub('is_content_excerpt'); 
     535                $form .= "</td>\n"; 
     536                $form .= "</tr>\n"; 
     537                 
     538                $form .= "<tr>\n"; 
     539                $form .= "<td>" . __('When ASCII character more than the set ratio is included, it is judged ASCII contents. ','xpressme') . "</td>\n";          
     540                $form .= "<td>\n"; 
     541                $form .=  $this->text_option_sub('ascii_judged_rate'); 
     542                $form .= "</td>\n"; 
     543                $form .= "</tr>\n"; 
     544                 
     545                $form .= "<tr>\n"; 
     546                $form .= "<td>" . __('Excerpt length of word for ASCII contents','xpressme') . "</td>\n";                
     547                $form .= "<td>\n"; 
     548                $form .=  $this->text_option_sub('excerpt_length_word'); 
     549                $form .= "</td>\n"; 
     550                $form .= "</tr>\n"; 
     551                 
     552                $form .= "<tr>\n"; 
     553                $form .= "<td>" . __('Excerpt length of character for multibyte contents','xpressme') . "</td>\n";               
     554                $form .= "<td>\n"; 
     555                $form .=  $this->text_option_sub('excerpt_length_character'); 
     556                $form .= "</td>\n"; 
     557                $form .= "</tr>\n"; 
     558 
     559                $form .= "<tr>\n"; 
     560                $form .= "<td>" . __('More Link Text (Is not displayed for the blank.)','xpressme') . "</td>\n";                 
     561                $form .= "<td>\n"; 
     562                $form .=  $this->text_option_sub('more_link_text'); 
     563                $form .= "</td>\n"; 
     564                $form .= "</tr>\n"; 
     565 
     566                $form .= "</table></td></tr>\n"; 
     567            return $form; 
     568        } 
     569 
     570        function viewer_type_option(){ 
     571                $form  = "<tr>\n"; 
     572                $form .= '<th><label for="viewer_type">' .__('Display Mode Setting', 'xpressme') . '</label></th>'; 
     573                $form .= "<td>\n"; 
     574                 
     575                $form .=  __('Select the XPressME Display Mode.', 'xpressme') ."\n"; 
     576                $form .= '<select name="ch_viewer_type">' . "\n"; 
     577                 
     578                $form .= '<option value="xoops" '; 
     579                if ($this->viewer_type == 'xoops') $form .= ' selected="selected"'; 
     580                $form .= '>'.__('Xoops Mode', 'xpressme') ."</option>\n"; 
     581 
     582                $form .= '<option value="wordpress" '; 
     583                if ($this->viewer_type == 'wordpress') $form .= ' selected="selected"'; 
     584                $form .= '>'.__('WordPress Mode', 'xpressme') ."</option>\n"; 
     585                 
     586                $form .= '<option value="user_select" '; 
     587                if ($this->viewer_type == 'user_select') $form .= ' selected="selected"'; 
     588                $form .= '>'.__('User select', 'xpressme') ."</option>\n"; 
     589 
     590                $form .= "</select><br />\n"; 
     591                 
     592                $form .= "</td></tr>\n"; 
     593            return $form; 
     594        } 
    498595 
    499596        function option_page() 
     
    504601                        $this->SettingValueWrite('update'); 
    505602                } else if (isset($_POST['submit_reset'])) { 
    506                         $this->fck_setDefault(); 
     603                        $this->setDefault(); 
    507604                        $this->SettingValueWrite('update'); 
    508605                } else if (isset($_POST['export_d3f'])) { 
     
    521618                echo            '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ; 
    522619                echo                    '<table class="form-table">'."\n"; 
     620                echo                            $this->viewer_type_option(); 
    523621                echo                            $this->yes_no_radio_option('is_use_xoops_upload_path', 
    524622                                                                                                __('Media Upload Base Path','xpressme'), 
     
    539637                echo                            $this->single_post_navi_option(); 
    540638                echo                            $this->posts_page_navi_option(); 
    541  
     639                echo                            $this->excerpt_option(); 
    542640                 
    543641                echo                            $this->yes_no_radio_option('is_author_view_count', 
  • trunk/wp-content/themes/xpress_default/blocks/meta_block_theme.php

    r122 r145  
    7474                $output .='<li>'.'<a href="'.get_settings('siteurl').'/readme.html" title="' .  __('ReadMe', 'xpress') . '">' . __('ReadMe', 'xpress') . '</a>'.'</li>'; 
    7575        } 
    76          
     76        $output .= disp_mode_set(); 
    7777        if (function_exists('wp_theme_switcher') ) { 
    7878                ob_start(); 
  • trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r142 r145  
    77        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 
    88        $disp_count =  ($options[2])?intval($options[2]):10; 
    9         $except = empty( $options[3] ) ? false : true ; 
    10         $except_size =  ($options[4])?intval($options[4]):100; 
     9        $excerpt = empty( $options[3] ) ? false : true ; 
     10        $excerpt_size =  ($options[4])?intval($options[4]):100; 
    1111        $date_format = empty( $options[5] ) ? '' : $options[5] ; 
    1212        $time_format = empty( $options[6] ) ? '' : $options[6] ; 
     
    6464                        ob_end_clean(); 
    6565                         
    66                         if ($except){ 
    67                                 $post_content = xpress_the_content(__('more'),$except_size,false); 
    68                         } else {         
    69                                 $post_content = xpress_the_content(__('more'),0,false);          
     66                        if ($excerpt){ 
     67                                $excerpt_length_word = $excerpt_size; 
     68                                $excerpt_length_character = $excerpt_size; 
     69                                $more_link_text = ''; 
     70                                $post_content = get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text); 
     71                        } else { 
     72                                $post_content = xpress_the_content(__('more'),0,'',false);       
    7073                        } 
    7174 
  • trunk/xoops_version.php

    r142 r145  
    3131$modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XPRESS_NAME') ; 
    3232$modversion['description'] = constant( '_MI_XPRESS_DESC'); 
    33 $modversion['version'] = "0.19"; 
     33$modversion['version'] = "0.20"; 
    3434$modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://www.toemon.com) ;"; 
    3535$modversion['author'] = "toemon (http://www.toemon.com)"; 
     
    4040 
    4141// status 
    42 $modversion['codename'] = "r142"; 
     42$modversion['codename'] = "r145"; 
    4343 
    4444// onInstall, onUpdate, onUninstall 
Note: See TracChangeset for help on using the changeset viewer.