XPressME Integration Kit

Trac


Ignore:
Timestamp:
Nov 20, 2009, 2:52:16 PM (15 years ago)
Author:
toemon
Message:

MUブランチにVer2.2.0RC1の変更内容をマージ

Location:
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r428 r451  
    792792 
    793793        $week_begins = intval(get_option('start_of_week')); 
    794         $head_pattrn = '<thead>\s*<tr>\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*<\/tr>\s*<\/thead>'; 
     794        $head_pattrn = '<thead>\s*<tr>\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*<\/tr>\s*<\/thead>'; 
    795795        if(preg_match('/'. $head_pattrn . '/s' ,$calendar,$head_match)){ 
    796796                $sun_index = 1 - $week_begins; 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r389 r451  
    365365} 
    366366 
     367function get_block_file_path($mydirname,$file_name) 
     368{ 
     369        global $xoops_config, $xpress_config; 
     370        $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 
     371        $select_theme = xpress_ThemeTemplate(get_xpress_theme_name($mydirname)); 
     372        $xpress_default_theme = 'xpress_default'; 
     373        $select_block = '/wp-content/themes/' . $select_theme . '/blocks/' . $file_name; 
     374        $default_block = '/wp-content/themes/xpress_default/blocks/' . $file_name; 
     375        $select_block_path = $mydirpath . $select_block; 
     376        $default_block_path =  $mydirpath . $default_block; 
     377 
     378        $block_file_data = array(); 
     379        $block_file_data['file_path'] = $default_block_path; 
     380        $block_file_data['error'] = ''; 
     381 
     382        if($select_theme != $xpress_default_theme){ 
     383                if (file_exists($select_block_path)){ 
     384                        $select_block_version = get_block_version($select_block_path); 
     385                        $default_block_version = get_block_version($default_block_path); 
     386                        if (version_compare($select_block_version,$default_block_version, "<")){ 
     387                                $block_file_data['file_path'] = $default_block_path; 
     388                                if ($xpress_config->is_block_error_display){ 
     389                                        $error_str = '<div style="color:red">'; 
     390                                        $error_str .= sprintf(__('Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s.','xpressme'),$select_block,$select_block_version,$default_block,$default_block_version); 
     391                                        $error_str .= '</div>'; 
     392                                        $block_file_data['error'] = $error_str; 
     393                                } 
     394                        } else { 
     395                                $block_file_data['file_path'] = $select_block_path; 
     396                                $block_file_data['error'] = ''; 
     397                        } 
     398                } 
     399        } 
     400        return $block_file_data; 
     401} 
     402 
     403function get_block_version($file_path = ''){ 
     404        $array_file = file($file_path); 
     405        $pattern = '^[\s|\/]*[B|b]lock\s+[V|v]ersion\s*[:|;]\s*([0-9|.]*)'; 
     406        $version = '0.1'; 
     407        if (empty($file_path)) return $version; 
     408        if (!file_exists($file_path)) return $version; 
     409        if (count($array_file) > 5) $file_count = 5; else $file_count = count($array_file); 
     410        for ($i = 0 ; $i < $file_count ; $i++){ 
     411                if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){ 
     412                        $version = $matchs[1]; 
     413                        break; 
     414                } 
     415        } 
     416        return $version; 
     417} 
     418 
    367419?> 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po

    r406 r451  
    88"Project-Id-Version: XPressME Plugin\n" 
    99"Report-Msgid-Bugs-To: \n" 
    10 "POT-Creation-Date: 2009-10-06 21:59+0900\n" 
    11 "PO-Revision-Date: 2009-10-06 22:00+0900\n" 
     10"POT-Creation-Date: 2009-11-20 12:51+0900\n" 
     11"PO-Revision-Date: 2009-11-20 12:51+0900\n" 
    1212"Last-Translator: toemon <info@toemon.com>\n" 
    1313"Language-Team: toemon <info@toemon.com>\n" 
     
    2323"X-Poedit-SearchPath-0: .\n" 
    2424 
    25 #: xpressme.php:33 
     25#: xpressme.php:59 
    2626msgid "Display Settings" 
    2727msgstr "表示設定" 
    2828 
    29 #: xpressme.php:34 
     29#: xpressme.php:60 
    3030msgid "Integration Settings" 
    3131msgstr "統合設定" 
    3232 
    33 #: xpressme.php:35 
     33#: xpressme.php:61 
    3434msgid "Other Settings" 
    3535msgstr "その他の設定" 
    3636 
    37 #: xpressme.php:37 
     37#: xpressme.php:63 
    3838msgid "Upgrade" 
    3939msgstr "アップグレード" 
    4040 
    41 #: xpressme.php:38 
     41#: xpressme.php:64 
    4242msgid "to Modules Admin" 
    4343msgstr "モジュール管理へ" 
    4444 
    45 #: xpressme.php:138 
     45#: xpressme.php:164 
    4646msgid "XPressME Display Setting" 
    4747msgstr "XPressME 表示設定" 
    4848 
    49 #: xpressme.php:144 
     49#: xpressme.php:170 
    5050msgid "Thema Sidebar Display" 
    5151msgstr "テーマ表示時にサイドバー表示する。" 
    5252 
    53 #: xpressme.php:145 
    54 #: xpressme.php:235 
    55 #: xpressme.php:241 
    56 #: xpressme.php:246 
    57 #: xpressme.php:252 
    58 #: xpressme_class.php:283 
    59 #: xpressme_class.php:299 
    60 #: xpressme_class.php:431 
    61 #: xpressme_class.php:442 
     53#: xpressme.php:171 
     54#: xpressme.php:263 
     55#: xpressme.php:269 
     56#: xpressme.php:274 
     57#: xpressme.php:280 
     58#: xpressme_class.php:296 
     59#: xpressme_class.php:314 
     60#: xpressme_class.php:445 
     61#: xpressme_class.php:456 
    6262msgid "YES" 
    6363msgstr "はい" 
    6464 
    65 #: xpressme.php:146 
    66 #: xpressme.php:236 
    67 #: xpressme.php:242 
    68 #: xpressme.php:247 
    69 #: xpressme.php:253 
    70 #: xpressme_class.php:284 
    71 #: xpressme_class.php:300 
    72 #: xpressme_class.php:432 
    73 #: xpressme_class.php:443 
     65#: xpressme.php:172 
     66#: xpressme.php:264 
     67#: xpressme.php:270 
     68#: xpressme.php:275 
     69#: xpressme.php:281 
     70#: xpressme_class.php:297 
     71#: xpressme_class.php:315 
     72#: xpressme_class.php:446 
     73#: xpressme_class.php:457 
    7474msgid "NO" 
    7575msgstr "いいえ" 
    7676 
    77 #: xpressme.php:155 
    78 #: xpressme.php:204 
    79 #: xpressme.php:258 
     77#: xpressme.php:181 
     78#: xpressme.php:232 
     79#: xpressme.php:291 
    8080msgid "Update Config" 
    8181msgstr "更新" 
    8282 
    83 #: xpressme.php:156 
    84 #: xpressme.php:205 
    85 #: xpressme.php:259 
     83#: xpressme.php:182 
     84#: xpressme.php:233 
     85#: xpressme.php:292 
    8686msgid "Preset Config" 
    8787msgstr "プリセット" 
    8888 
    89 #: xpressme.php:188 
     89#: xpressme.php:214 
    9090msgid "XPressME Integration Setting" 
    9191msgstr "XPressME 統合設定" 
    9292 
    93 #: xpressme.php:193 
     93#: xpressme.php:218 
    9494msgid "Media Upload Base Path" 
    9595msgstr "メディアアップロードのベースパス設定" 
    9696 
    97 #: xpressme.php:194 
     97#: xpressme.php:222 
    9898msgid "Use XOOPS UPLOAD PATH" 
    9999msgstr "XOOPSのアップロードパスを使用する。" 
    100100 
    101 #: xpressme.php:195 
     101#: xpressme.php:223 
    102102msgid "USE WordPress BASE_PATH" 
    103103msgstr "WordPressのベースパスを使用する。" 
    104104 
    105 #: xpressme.php:229 
     105#: xpressme.php:257 
    106106msgid "XPressME Other Setting" 
    107107msgstr "XPressME その他の設定" 
    108108 
    109 #: xpressme.php:234 
     109#: xpressme.php:262 
    110110msgid "The change tracking of the post is preserved" 
    111111msgstr "投稿の変更履歴を有効にする。" 
    112112 
    113 #: xpressme.php:240 
     113#: xpressme.php:268 
    114114msgid "Select Multi user mode" 
    115115msgstr "マルチユーザーモードを選択" 
    116116 
    117 #: xpressme.php:245 
     117#: xpressme.php:273 
    118118msgid "Is the posts author views counted?" 
    119119msgstr "投稿者の閲覧をカウントしますか?" 
    120120 
    121 #: xpressme.php:251 
     121#: xpressme.php:279 
    122122msgid "Is SQL debugging window displayed?" 
    123123msgstr "SQLデバッグウィンドを表示しますか?" 
    124124 
    125 #: xpressme.php:275 
    126 msgid "XPressME Upgrade" 
    127 msgstr "XPressME アップグレード" 
    128  
    129 #: xpressme.php:289 
    130 #, php-format 
    131 msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>." 
    132 msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。" 
    133  
    134 #: xpressme.php:293 
    135 msgid "There is a new version of XPressME Integration Kit available for upgrade" 
    136 msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です" 
    137  
    138 #: xpressme.php:296 
    139 #, php-format 
    140 msgid "You can upgrade to version %s download the package and install it manually:" 
    141 msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 
    142  
    143 #: xpressme.php:299 
    144 #, php-format 
    145 msgid "Download %s" 
    146 msgstr "%s をダウンロード" 
    147  
    148 #: xpressme.php:302 
    149 msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade" 
    150 msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。" 
    151  
    152 #: xpressme.php:306 
    153 #, php-format 
    154 msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after." 
    155 msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。 申し訳ありませんが、しばらく後で確認してください。" 
    156  
    157 #: xpressme.php:425 
    158 #, php-format 
    159 msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>." 
    160 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。" 
    161  
    162 #: xpressme.php:427 
    163 #, php-format 
    164 msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator." 
    165 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。" 
    166  
    167 #: xpressme_class.php:55 
    168 #: xpressme_class.php:232 
     125#: xpressme.php:284 
     126msgid "Select warning display of block file version check" 
     127msgstr "ブロックファイルのバージョンチェック時における警告表示" 
     128 
     129#: xpressme.php:285 
     130msgid "Do display" 
     131msgstr "表示する" 
     132 
     133#: xpressme.php:286 
     134msgid "Do not display" 
     135msgstr "表示しない" 
     136 
     137#: xpressme_class.php:61 
     138#: xpressme_class.php:243 
    169139msgid "Older Post" 
    170140msgstr "前の投稿へ" 
    171141 
    172 #: xpressme_class.php:56 
    173 #: xpressme_class.php:235 
     142#: xpressme_class.php:62 
     143#: xpressme_class.php:246 
    174144msgid "Newer Post" 
    175145msgstr "次の投稿へ" 
    176146 
    177 #: xpressme_class.php:58 
    178 #: xpressme_class.php:238 
     147#: xpressme_class.php:64 
     148#: xpressme_class.php:249 
    179149msgid "Older Entries" 
    180150msgstr "前ページへ" 
    181151 
    182 #: xpressme_class.php:59 
    183 #: xpressme_class.php:241 
     152#: xpressme_class.php:65 
     153#: xpressme_class.php:252 
    184154msgid "Newer Entries" 
    185155msgstr "次ページへ" 
    186156 
    187 #: xpressme_class.php:73 
    188 #: xpressme_class.php:74 
    189 #: xpressme_class.php:244 
     157#: xpressme_class.php:79 
     158#: xpressme_class.php:80 
     159#: xpressme_class.php:255 
    190160msgid "Read the rest of this entry &raquo;" 
    191161msgstr "この投稿の続きを読む &raquo;" 
    192162 
    193 #: xpressme_class.php:342 
     163#: xpressme_class.php:356 
    194164msgid "Single Post Navi Setting" 
    195165msgstr "シングルポストナビの設定" 
    196166 
    197 #: xpressme_class.php:347 
    198 #: xpressme_class.php:392 
     167#: xpressme_class.php:361 
     168#: xpressme_class.php:406 
    199169msgid "Adjustment of Navi link display position" 
    200170msgstr "リンクの表示位置設定" 
    201171 
    202 #: xpressme_class.php:350 
     172#: xpressme_class.php:364 
    203173msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 
    204174msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示" 
    205175 
    206 #: xpressme_class.php:351 
     176#: xpressme_class.php:365 
    207177msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 
    208178msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 
    209179 
    210 #: xpressme_class.php:357 
     180#: xpressme_class.php:371 
    211181msgid "Select Display name of PostNavi Link" 
    212182msgstr "表示するリンクテキストを選択" 
    213183 
    214 #: xpressme_class.php:360 
     184#: xpressme_class.php:374 
    215185msgid "Title of post" 
    216186msgstr "投稿記事のタイトルを表示" 
    217187 
    218 #: xpressme_class.php:361 
     188#: xpressme_class.php:375 
    219189msgid "Title of Navi" 
    220190msgstr "ナビタイトルを表示" 
    221191 
    222 #: xpressme_class.php:367 
     192#: xpressme_class.php:381 
    223193msgid "Display Navi Title of Old Post Link" 
    224194msgstr "古い記事へのナビタイトルを設定" 
    225195 
    226 #: xpressme_class.php:374 
     196#: xpressme_class.php:388 
    227197msgid "Display Navi Title of Newer Post Link" 
    228198msgstr "より新しい記事へのナビタイトルを設定" 
    229199 
    230 #: xpressme_class.php:387 
     200#: xpressme_class.php:401 
    231201msgid "Posts List Page Navi Setting" 
    232202msgstr "ポストリストページナビの設定" 
    233203 
    234 #: xpressme_class.php:395 
     204#: xpressme_class.php:409 
    235205msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right" 
    236206msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示" 
    237207 
    238 #: xpressme_class.php:396 
     208#: xpressme_class.php:410 
    239209msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right" 
    240210msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示" 
    241211 
    242 #: xpressme_class.php:402 
     212#: xpressme_class.php:416 
    243213msgid "Display Navi Title of Old Page Link" 
    244214msgstr "古いページへのナビタイトルを設定" 
    245215 
    246 #: xpressme_class.php:409 
     216#: xpressme_class.php:423 
    247217msgid "Display Navi Title of Newer Page Link" 
    248218msgstr "より新しいページへのナビタイトルを設定" 
    249219 
    250 #: xpressme_class.php:422 
     220#: xpressme_class.php:436 
    251221msgid "Dashboard feed Display Setting" 
    252222msgstr "ダッシュボード フィード表示設定" 
    253223 
    254 #: xpressme_class.php:428 
     224#: xpressme_class.php:442 
    255225msgid "Display XPressMe Integration Kit Blog" 
    256226msgstr "XPressME Integration Kit ブログを表示する。" 
    257227 
    258 #: xpressme_class.php:439 
     228#: xpressme_class.php:453 
    259229msgid "Display XPressMe Integration Kit Forum" 
    260230msgstr "XPressME Integration Kit フォーラムを表示する。" 
    261231 
    262 #: xpressme_class.php:456 
     232#: xpressme_class.php:471 
    263233msgid "Role Setting at Login" 
    264234msgstr "ログイン時の権限設定" 
    265235 
    266 #: xpressme_class.php:459 
     236#: xpressme_class.php:474 
    267237msgid "XOOPS Groupe" 
    268238msgstr "XOOPSグループ名" 
    269239 
    270 #: xpressme_class.php:459 
     240#: xpressme_class.php:474 
    271241msgid "WordPress Role" 
    272242msgstr "WordPressでの権限" 
    273243 
    274 #: xpressme_class.php:459 
     244#: xpressme_class.php:474 
    275245msgid "Role is set at each login" 
    276246msgstr "ログイン時、常に権限を更新する" 
    277247 
    278 #: xpressme_class.php:485 
    279 #: xpressme_class.php:489 
    280 #: xpressme_class.php:492 
     248#: xpressme_class.php:500 
     249#: xpressme_class.php:504 
     250#: xpressme_class.php:507 
    281251msgid "Default Role of WordPress" 
    282252msgstr "WordPressのデフォルト権限" 
    283253 
    284 #: xpressme_class.php:486 
    285 #: xpressme_class.php:490 
    286 #: xpressme_class.php:493 
     254#: xpressme_class.php:501 
     255#: xpressme_class.php:505 
     256#: xpressme_class.php:508 
    287257msgid "Group User Doesn't Register" 
    288258msgstr "ユーザ登録しない" 
    289259 
    290 #: xpressme_class.php:524 
     260#: xpressme_class.php:521 
     261msgid "Only the Admin can set Group Role Setting" 
     262msgstr "管理者だけがグループ権限を設定できます。" 
     263 
     264#: xpressme_class.php:541 
    291265msgid "WordPress MU cannot integrate the comments." 
    292266msgstr "WordPress MUはコメント統合できません。" 
    293267 
    294 #: xpressme_class.php:526 
     268#: xpressme_class.php:543 
    295269msgid "Do Not Comment Integration." 
    296270msgstr "コメント統合しません。" 
    297271 
    298 #: xpressme_class.php:561 
     272#: xpressme_class.php:578 
    299273msgid "Comment integration with D3Forum" 
    300274msgstr "D3Forumとのコメント統合" 
    301275 
    302 #: xpressme_class.php:563 
     276#: xpressme_class.php:580 
    303277msgid "Select the forum of D3Forum that does the comment integration from the following lists." 
    304278msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。" 
    305279 
    306 #: xpressme_class.php:568 
     280#: xpressme_class.php:585 
    307281msgid "Select the Type of display of D3Forum comment." 
    308282msgstr "D3Forumの表示タイプを選択" 
    309283 
    310 #: xpressme_class.php:570 
    311 #: xpressme_class.php:573 
     284#: xpressme_class.php:587 
     285#: xpressme_class.php:590 
    312286msgid "Flat" 
    313287msgstr "フラット" 
    314288 
    315 #: xpressme_class.php:571 
    316 #: xpressme_class.php:574 
     289#: xpressme_class.php:588 
     290#: xpressme_class.php:591 
    317291msgid "Threaded" 
    318292msgstr "スレッド" 
    319293 
    320 #: xpressme_class.php:577 
     294#: xpressme_class.php:594 
    321295msgid "Select the order of display of D3Forum comment." 
    322296msgstr "D3Forumコメントの表示順を選択" 
    323297 
    324 #: xpressme_class.php:579 
    325 #: xpressme_class.php:582 
     298#: xpressme_class.php:596 
     299#: xpressme_class.php:599 
    326300msgid "DESC" 
    327301msgstr "降順" 
    328302 
    329 #: xpressme_class.php:580 
    330 #: xpressme_class.php:583 
     303#: xpressme_class.php:597 
     304#: xpressme_class.php:600 
    331305msgid "ASC" 
    332306msgstr "昇順" 
    333307 
    334 #: xpressme_class.php:586 
     308#: xpressme_class.php:603 
    335309msgid "Number of displays of D3Forum comments." 
    336310msgstr "D3Forumのコメント表示数" 
    337311 
    338 #: xpressme_class.php:589 
     312#: xpressme_class.php:606 
    339313msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. " 
    340314msgstr "WordPressコメントとD3Forumポスト間の一括転送(エクスポート・インポート)" 
    341315 
    342 #: xpressme_class.php:590 
     316#: xpressme_class.php:607 
    343317msgid "Export to D3Forum" 
    344318msgstr "D3Forumへ一括エクスポート" 
    345319 
    346 #: xpressme_class.php:591 
     320#: xpressme_class.php:608 
    347321msgid "Import from D3Forum" 
    348322msgstr "D3Forumから一括インポート" 
    349323 
    350 #: xpressme_class.php:604 
     324#: xpressme_class.php:621 
    351325msgid "Contents Excerpt Setting" 
    352326msgstr "記事抜粋の設定" 
    353327 
    354 #: xpressme_class.php:609 
     328#: xpressme_class.php:626 
    355329msgid "Is the excerpt display done with the archive of contents?" 
    356330msgstr "記事のアーカイブで抜粋表示を行いますか?" 
    357331 
    358 #: xpressme_class.php:616 
     332#: xpressme_class.php:633 
    359333msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. " 
    360334msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。" 
    361335 
    362 #: xpressme_class.php:623 
     336#: xpressme_class.php:640 
    363337msgid "Excerpt length of word for ASCII contents" 
    364338msgstr "ASCIIコンテンツの抜粋単語数" 
    365339 
    366 #: xpressme_class.php:630 
     340#: xpressme_class.php:647 
    367341msgid "Excerpt length of character for multibyte contents" 
    368342msgstr "マルチバイトコンテンツの抜粋文字数" 
    369343 
    370 #: xpressme_class.php:637 
     344#: xpressme_class.php:654 
    371345msgid "This text is displayed in the link that reads contents not excerpted.(Is not displayed for the blank.)" 
    372346msgstr "抜粋されていないコンテンツを読むためのリンクに表示されるテキスト(空白の場合リンクを表示しません)" 
    373347 
    374 #: xpressme_class.php:644 
     348#: xpressme_class.php:661 
    375349msgid "This text is displayed in the link that more tag (&lt;!--more--&gt;). " 
    376350msgstr "more タグ (&lt;!--more--&gt;)のリンクに表示されるテキスト" 
    377351 
    378 #: xpressme_class.php:656 
     352#: xpressme_class.php:673 
    379353msgid "Display Mode Setting" 
    380354msgstr "表示モード設定" 
    381355 
    382 #: xpressme_class.php:659 
     356#: xpressme_class.php:676 
    383357msgid "Select the XPressME Display Mode." 
    384358msgstr "XPressMEの表示モードの選択" 
    385359 
    386 #: xpressme_class.php:664 
     360#: xpressme_class.php:681 
    387361msgid "Xoops Mode" 
    388362msgstr "XOOPSモード" 
    389363 
    390 #: xpressme_class.php:668 
     364#: xpressme_class.php:685 
    391365msgid "WordPress Mode" 
    392366msgstr "WordPressモード" 
    393367 
    394 #: xpressme_class.php:672 
     368#: xpressme_class.php:689 
    395369msgid "User select" 
    396370msgstr "ユーザによる選択" 
    397371 
    398 #: xpressme_class.php:677 
     372#: xpressme_class.php:694 
    399373msgid "Select the theme used in the XOOPS Mode." 
    400374msgstr "XOOPSモードで使用するテーマを選択" 
    401375 
    402 #: xpressme_class.php:682 
     376#: xpressme_class.php:699 
    403377msgid "Use WordPress Selected Themes" 
    404378msgstr "WordPressで選択したテーマを使う" 
    405379 
    406 #: xpressme_class.php:700 
     380#: xpressme_class.php:717 
    407381msgid "Header Meta Option" 
    408382msgstr "ヘッダメタ オプション" 
    409383 
    410 #: xpressme_class.php:705 
     384#: xpressme_class.php:722 
    411385msgid "Select the Header keyword." 
    412386msgstr "ヘッダで使用するキーワードの選択" 
    413387 
    414 #: xpressme_class.php:710 
     388#: xpressme_class.php:727 
    415389msgid "Xoops KeyWord" 
    416390msgstr "XOOPSのキーワード" 
    417391 
    418 #: xpressme_class.php:713 
     392#: xpressme_class.php:730 
    419393msgid "WordPress KeyWord" 
    420394msgstr "WordPressのキーワード" 
    421395 
    422 #: xpressme_class.php:716 
     396#: xpressme_class.php:733 
    423397msgid "WordPress & Xoops KeyWord" 
    424398msgstr "WordPressjとXOOPSのキーワード" 
    425399 
    426 #: xpressme_class.php:722 
     400#: xpressme_class.php:739 
    427401msgid "Select the Header Description." 
    428402msgstr "ヘッダで使用するディスクリプション(説明)の選択" 
    429403 
    430 #: xpressme_class.php:727 
     404#: xpressme_class.php:744 
    431405msgid "Xoops Description" 
    432406msgstr "XOOPSのディスクリプション" 
    433407 
    434 #: xpressme_class.php:730 
     408#: xpressme_class.php:747 
    435409msgid "WordPress Description" 
    436410msgstr "WordPressのディスクリプション" 
    437411 
    438 #: xpressme_class.php:733 
     412#: xpressme_class.php:750 
    439413msgid "WordPress & Xoops Description" 
    440414msgstr "WordPressとXOOPSのディスクリプション" 
    441415 
    442 #: xpressme_class.php:739 
     416#: xpressme_class.php:756 
    443417msgid "Select the Header Robots Index." 
    444418msgstr "ヘッダで使用するロボットインデックスの選択" 
    445419 
    446 #: xpressme_class.php:744 
     420#: xpressme_class.php:761 
    447421msgid "Xoops Robots Index" 
    448422msgstr "XOOPSのロボットインデックス" 
    449423 
    450 #: xpressme_class.php:747 
     424#: xpressme_class.php:764 
    451425msgid "WordPress Robots Index" 
    452426msgstr "WordPressのロボットインデックス" 
    453427 
    454 #: xpressme_class.php:776 
     428#: xpressme_class.php:793 
    455429#, php-format 
    456430msgid "Unable to create directory %s. Is its parent directory writable by the server?" 
    457431msgstr "%s ディレクトリーが作成できません。サーバーの親ディレクトリー書き込み権限があるか確認くださいr?" 
    458432 
     433#: xpressme_widget_class.php:17 
     434msgid "XPressME User Menu Widget" 
     435msgstr "XPressME ユーザメニュー ウィジェット" 
     436 
     437#: xpressme_widget_class.php:19 
     438msgid "XPressME MENU" 
     439msgstr "XPressME メニュー" 
     440 
     441#: xpressme_widget_class.php:143 
     442#: xpressme_widget_class.php:195 
     443#: xpressme_widget_class.php:200 
     444#: xpressme_widget_class.php:205 
     445msgid "Link" 
     446msgstr "リンク" 
     447 
     448#: xpressme_widget_class.php:144 
     449#: xpressme_widget_class.php:160 
     450msgid "Site Home" 
     451msgstr "サイトホーム" 
     452 
     453#: xpressme_widget_class.php:145 
     454#: xpressme_widget_class.php:165 
     455msgid "Add New" 
     456msgstr "新規投稿" 
     457 
     458#: xpressme_widget_class.php:146 
     459#: xpressme_widget_class.php:170 
     460msgid "User Profile" 
     461msgstr "ユーザプロファイル" 
     462 
     463#: xpressme_widget_class.php:147 
     464#: xpressme_widget_class.php:176 
     465msgid "WordPress Admin" 
     466msgstr "WordPress管理" 
     467 
     468#: xpressme_widget_class.php:148 
     469#: xpressme_widget_class.php:181 
     470msgid "Module Admin" 
     471msgstr "モジュール管理" 
     472 
     473#: xpressme_widget_class.php:149 
     474#: xpressme_widget_class.php:186 
     475msgid "XPressME Setting" 
     476msgstr "XPressME設定" 
     477 
     478#: xpressme_widget_class.php:150 
     479msgid "Display Mode Select" 
     480msgstr "表示モード選択" 
     481 
     482#: xpressme_widget_class.php:152 
     483#: xpressme_widget_class.php:171 
     484msgid "Auto Setting" 
     485msgstr "自動設定" 
     486 
     487#: xpressme_widget_class.php:157 
     488msgid "User Menu" 
     489msgstr "ユーザメニュー" 
     490 
     491#: xpressme_widget_class.php:245 
     492msgid "Title:" 
     493msgstr "タイトル:" 
     494 
    459495#: include/custom_functions.php:74 
    460496#, php-format 
     
    463499 
    464500#: include/custom_functions.php:429 
    465 #: include/custom_functions.php:454 
     501#: include/custom_functions.php:459 
    466502#, php-format 
    467503msgid "views :%d" 
    468504msgstr "閲覧数 :%d" 
    469505 
    470 #: include/custom_functions.php:608 
     506#: include/custom_functions.php:623 
    471507msgid "Main" 
    472508msgstr "メイン" 
    473509 
    474 #: include/custom_functions.php:611 
     510#: include/custom_functions.php:626 
    475511#, php-format 
    476512msgid "Archive for the &#8216;%s&#8217; Category" 
    477513msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ" 
    478514 
    479 #: include/custom_functions.php:614 
     515#: include/custom_functions.php:629 
    480516#, php-format 
    481517msgid "Posts Tagged &#8216;%s&#8217;" 
    482518msgstr "&#8216;%s&#8217; タグのついている投稿" 
    483519 
    484 #: include/custom_functions.php:617 
     520#: include/custom_functions.php:632 
    485521#, php-format 
    486522msgid "Archive for %s|Daily archive page" 
    487523msgstr "%sの日別アーカイブ" 
    488524 
    489 #: include/custom_functions.php:617 
     525#: include/custom_functions.php:632 
    490526msgid "F jS, Y" 
    491527msgstr "Y年n月j日" 
    492528 
    493 #: include/custom_functions.php:619 
     529#: include/custom_functions.php:634 
    494530#, php-format 
    495531msgid "Archive for %s|Monthly archive page" 
    496532msgstr "%sの月別アーカイブ" 
    497533 
    498 #: include/custom_functions.php:619 
     534#: include/custom_functions.php:634 
    499535msgid "F, Y" 
    500536msgstr "Y年n月" 
    501537 
    502 #: include/custom_functions.php:621 
     538#: include/custom_functions.php:636 
    503539#, php-format 
    504540msgid "Archive for %s|Yearly archive page" 
    505541msgstr "%sの年別アーカイブ " 
    506542 
    507 #: include/custom_functions.php:621 
     543#: include/custom_functions.php:636 
    508544msgid "Y" 
    509545msgstr "Y年" 
    510546 
    511 #: include/custom_functions.php:624 
     547#: include/custom_functions.php:639 
    512548#, php-format 
    513549msgid "Archive for the &#8216;%s&#8217; Author" 
    514550msgstr "投稿者 &#8216;%s&#8217; のアーカイブ" 
    515551 
    516 #: include/custom_functions.php:627 
     552#: include/custom_functions.php:642 
    517553#, php-format 
    518554msgid "Search Results of word &#8216;%s&#8217;" 
    519555msgstr "&#8216;%s&#8217; の検索結果" 
    520556 
    521 #: include/custom_functions.php:633 
    522 #: include/custom_functions.php:635 
     557#: include/custom_functions.php:648 
     558#: include/custom_functions.php:650 
    523559#, php-format 
    524560msgid "Article of %s" 
    525561msgstr "%sの記事" 
    526562 
    527 #: include/custom_functions.php:657 
     563#: include/custom_functions.php:672 
    528564#, php-format 
    529565msgid "From %1$s on site %2$s" 
    530566msgstr "サイト %2$s の %1$s より" 
    531567 
    532 #: include/custom_functions.php:678 
     568#: include/custom_functions.php:693 
    533569msgid "No Trackback/Pingback" 
    534570msgstr "トラックバック・ピンバックはありません" 
    535571 
    536 #: include/custom_functions.php:679 
     572#: include/custom_functions.php:694 
    537573msgid "One Trackback/Pingback" 
    538574msgstr "トラックバック・ピンバック 1 件" 
    539575 
    540 #: include/custom_functions.php:680 
     576#: include/custom_functions.php:695 
    541577msgid "% TrackBack/Pingback" 
    542578msgstr "トラックバック・ピンバック % 件" 
     
    584620msgstr "WordPressモードへ切替" 
    585621 
     622#: include/xpress_common_functions.php:390 
     623#, php-format 
     624msgid "Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s." 
     625msgstr "ブロックファイル %1$s は古いバージョン %2$s の為、<br /> 新しいバージョン %4$s のブロックファイル %3$s を使用します。" 
     626 
     627#: include/xpress_upgrade.php:13 
     628msgid "XPressME Upgrade" 
     629msgstr "XPressME アップグレード" 
     630 
     631#: include/xpress_upgrade.php:28 
     632#, php-format 
     633msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>." 
     634msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。" 
     635 
     636#: include/xpress_upgrade.php:32 
     637msgid "There is a new version of XPressME Integration Kit available for upgrade" 
     638msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です" 
     639 
     640#: include/xpress_upgrade.php:35 
     641#, php-format 
     642msgid "You can upgrade to version %s download the package and install it manually:" 
     643msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 
     644 
     645#: include/xpress_upgrade.php:38 
     646#: include/xpress_upgrade.php:61 
     647#, php-format 
     648msgid "Download %s" 
     649msgstr "%s をダウンロード" 
     650 
     651#: include/xpress_upgrade.php:43 
     652#, php-format 
     653msgid "You can download the differential file from version %s to %s and upgrade it manually:" 
     654msgstr "バージョン%sから%sへの差分ファイルをダウンロードし、手動でアップグレードすることができます:" 
     655 
     656#: include/xpress_upgrade.php:46 
     657#, php-format 
     658msgid "Download differential file for %s" 
     659msgstr "%sの差分ファイルをダウンロード" 
     660 
     661#: include/xpress_upgrade.php:50 
     662msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade" 
     663msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。" 
     664 
     665#: include/xpress_upgrade.php:58 
     666#, php-format 
     667msgid "You can use the development version %s download the package and install it manually:" 
     668msgstr "開発バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 
     669 
     670#: include/xpress_upgrade.php:67 
     671#, php-format 
     672msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after." 
     673msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。 申し訳ありませんが、しばらく後で確認してください。" 
     674 
     675#: include/xpress_upgrade.php:212 
     676#, php-format 
     677msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>." 
     678msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。" 
     679 
     680#: include/xpress_upgrade.php:214 
     681#, php-format 
     682msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator." 
     683msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。" 
     684 
     685#~ msgid "Title" 
     686#~ msgstr "タイトル" 
     687#~ msgid "URL" 
     688#~ msgstr "URL" 
    586689#~ msgid "more" 
    587690#~ msgstr "続きを読む" 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php

    r413 r451  
    2222require_once dirname( __FILE__ ).'/include/functions_for_wp_old.php' ; 
    2323 
     24if (!is_wordpress_style() && ( !empty($xpress_config->theme_select) || $xpress_config->theme_select != 'use_wordpress_select') ){ 
     25        add_filter('stylesheet', 'xpress_Stylesheet'); 
     26        add_filter('template', 'xpress_ThemeTemplate'); 
     27} 
     28function xpress_Stylesheet($stylesheet) { 
     29        global $xpress_config; 
     30        $theme = $xpress_config->theme_select; 
     31    $theme = get_theme($theme); 
     32 
     33    if (empty($theme)) { 
     34        return $stylesheet; 
     35    } 
     36    return $theme['Stylesheet']; 
     37} 
     38 
     39function xpress_ThemeTemplate($template) { 
     40        global $xpress_config; 
     41        $theme = $xpress_config->theme_select; 
     42    $theme = get_theme($theme); 
     43 
     44    if (empty($theme)) { 
     45        return $template; 
     46    } 
     47    return $theme['Template']; 
     48} 
     49 
    2450function my_plugin_menu() 
    2551{ 
     
    190216                echo            '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ; 
    191217                echo                    '<table class="form-table">'."\n"; 
     218                $upload_title = __('Media Upload Base Path','xpressme'); 
     219                if($xoops_config->is_wpmu) $upload_title = $upload_title . '(WPMU is not select)'; 
    192220                echo                            $xpress_config->yes_no_radio_option('is_use_xoops_upload_path', 
    193                                                                                                 __('Media Upload Base Path','xpressme'), 
     221                                                                                                $upload_title, 
    194222                                                                                                __('Use XOOPS UPLOAD PATH','xpressme'), 
    195                                                                                                 __('USE WordPress BASE_PATH','xpressme') 
    196                                                                                                 ); 
    197                  
    198                 echo                            $xpress_config->groupe_role_option();            
    199                  
     223                                                                                                __('USE WordPress BASE_PATH','xpressme'), 
     224                                                                                                $xoops_config->is_wpmu 
     225                                                                                                ); 
     226                $lock = ($xoops_config->module_url != get_bloginfo('url')); 
     227                echo                            $xpress_config->groupe_role_option($lock);       
    200228                echo                            $xpress_config->d3forum_option($do_message);             
    201229                echo                    "</table>\n"; 
     
    253281                                                                                                __('NO','xpressme')              
    254282                                                                                                ); 
     283                echo                            $xpress_config->yes_no_radio_option('is_block_error_display', 
     284                                                                                                __('Select warning display of block file version check','xpressme'), 
     285                                                                                                __('Do display','xpressme'), 
     286                                                                                                __('Do not display','xpressme')          
     287                                                                                                ); 
    255288                echo                    "</table>\n"; 
    256289                 
     
    264297} 
    265298 
    266 function upgrade_page() 
    267 { 
    268         global $xoops_config,$xpress_config; 
    269          
    270         $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 
    271         $check_url = "http://ja1.xpressme.info/version_check/?version=$xpress_version"; 
    272  
    273         echo    '<div class="wrap">'."\n"; 
    274         echo            '<div id="icon-options-general" class="icon32"><br /></div>'."\n"; 
    275         echo            '<h2>' . __('XPressME Upgrade', 'xpressme') . "</h2><br>\n"; 
    276          
    277         if(get_xpress_latest_version()){ 
    278                 $latest = get_option('xpressme_latest_version'); 
    279                 if ($latest) { 
    280                         $site_url=$latest['url']; 
    281                         $package=$latest['package']; 
    282                         $latest_version=$latest['latest_version']; 
    283                         $check_time=$latest['check_time']; 
    284                 } 
    285  
    286  
    287                 if (version_compare($xpress_version, $latest_version, '>')){ 
    288                                 echo '<h3 class="response">'; 
    289                                 printf(__('You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.', 'xpressme') , $xpress_version , $site_url); 
    290                                 echo '</h3>'; 
    291  
    292                 } else if (version_compare($xpress_version, $latest_version, '<')) { 
    293                         echo    '<h3 class="response">'. __('There is a new version of XPressME Integration Kit available for upgrade', 'xpressme') . '</h3>'; 
    294                         echo '<p>'; 
    295         //              printf(__('You can upgrade to version %s automatically or download the package and install it manually:'),$latest_version); 
    296                         printf(__('You can upgrade to version %s download the package and install it manually:', 'xpressme'),$latest_version); 
    297                         echo '</p>'; 
    298                         echo '<a class="button" href="' . $package . '">'; 
    299                         printf(__('Download %s', 'xpressme') , $latest_version); 
    300                         echo '</a>'; 
    301                 } else { 
    302                         echo    '<h3 class="response">'. __('You have the latest version of XPressME Integration Kit. You do not need to upgrade', 'xpressme') . '</h3>'; 
    303                 } 
    304         } else { 
    305                 echo '<h3 class="response">'; 
    306                 printf(__('There is no response from <a href="%s">version check API</a> now. sorry, please confirm it after.', 'xpressme'),$check_url); 
    307                 echo    "</div>\n"; 
    308         } 
    309 } 
    310  
    311 function xp_remote_get($url, $headers = ""){ 
    312         global $xoops_config; 
    313         $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 
    314  
    315         require_once( $xoops_config->module_path . '/wp-includes/class-snoopy.php'); 
    316  
    317         // Snoopy is an HTTP client in PHP 
    318         $client = new Snoopy(); 
    319         $client->agent = 'XPressME/' . $xpress_version; 
    320         $client->read_timeout = 2; 
    321         if (is_array($headers) ) { 
    322                 $client->rawheaders = $headers; 
    323         } 
    324  
    325         @$client->fetch($url); 
    326         $response['response']['code'] = $client->status; 
    327         $response['body'] = $client->results; 
    328         return $response; 
    329         return $client; 
    330  
    331 } 
    332  
    333 function get_xpress_latest_version(){ 
    334         global $wp_version, $wpdb, $wp_local_package; 
    335         global $xoops_config; 
    336          
    337         $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 
    338  
    339         $check_url = "http://ja.xpressme.info/version_check/?version=$xpress_version"; 
    340         $request_options = array( 
    341         'timeout' => 3, 
    342         'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 
    343         ); 
    344  
    345         if (! function_exists('wp_remote_get')) { 
    346                 $response = xp_remote_get($check_url); 
    347                  
    348                 if (empty($response['body'])) return false; 
    349         } else { 
    350          
    351                 $response = wp_remote_get($check_url, $request_options); 
    352                  
    353                 if ( is_wp_error( $response ) ) 
    354                         return false; 
    355         } 
    356         if ( 200 != $response['response']['code'] ) 
    357                 return false; 
    358         $body = trim( $response['body'] ); 
    359         $body = str_replace(array("\r\n", "\r"), "\n", $body); 
    360         $returns = explode("\n", $body); 
    361         $response = $returns[0]; 
    362         if ( isset( $returns[1] ) ) 
    363                 $url = clean_url( $returns[1] ); 
    364         if ( isset( $returns[2] ) ) 
    365                 $package = clean_url( $returns[2] ); 
    366         if ( isset( $returns[3] ) ) 
    367                 $latest_version = $returns[3]; 
    368  
    369         $write_options = array ( 
    370                 'url' => $url , 
    371                 'package' => $package , 
    372                 'latest_version' => $latest_version , 
    373                 'check_time' => time() 
    374         ); 
    375          
    376         $latest_version = get_option('xpressme_latest_version'); 
    377         if (!$latest_version) { 
    378                 add_option('xpressme_latest_version', $write_options); 
    379         } else { 
    380                 update_option('xpressme_latest_version', $write_options); 
    381         } 
    382         return true; 
    383 } 
    384  
    385 function xpress_update_check() { 
    386         if ( defined('WP_INSTALLING') ) 
    387                 return; 
    388         global $pagenow; 
    389  
    390         $php_query_string = $_SERVER['QUERY_STRING']; 
    391  
    392         if ( 'admin.php' == $pagenow && 'page=upgrade_page' == $php_query_string) 
    393                 return; 
    394  
    395         global $wp_version, $wpdb, $wp_local_package; 
    396         global $xoops_config; 
    397  
    398         $php_query_string = $_SERVER['QUERY_STRING']; 
    399         $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 
    400  
    401         $latest = get_option('xpressme_latest_version'); 
    402         if (!$latest ) { 
    403                 get_xpress_latest_version(); 
    404                 $latest = get_option('xpressme_latest_version'); 
    405         } 
    406  
    407         if ($latest) { 
    408                 $next_check = $latest['check_time'] + (60*60*24); 
    409                 $now_time = time(); 
    410                 if ($next_check < $now_time ){ 
    411                         get_xpress_latest_version(); 
    412                         $latest = get_option('xpressme_latest_version'); 
    413                 } 
    414         } 
    415  
    416         if ($latest) { 
    417                 $url=$latest['url']; 
    418                 $package=$latest['package']; 
    419                 $latest_version=$latest['latest_version']; 
    420                 $check_time=$latest['check_time']; 
    421                 $upgrade_page = $xoops_config->module_url . "/wp-admin/admin.php?page=upgrade_page"; 
    422  
    423                 if (version_compare($xpress_version, $latest_version, '<')) { 
    424                         if ( current_user_can('manage_options') ){ 
    425                                 $msg = sprintf( __('XPressME Integration Kit Version %1$s is available! <a href="%2$s">Please update now</a>.', 'xpressme'), $latest_version, $upgrade_page ); 
    426                         } else { 
    427                                 $msg = sprintf( __('XPressME Integration Kit Version %1$s is available! Please notify the site administrator.', 'xpressme'), $latest_version ); 
    428                         } 
    429                         echo "<div id='update-nag'>$msg </div>"; 
    430                 } 
    431         } 
    432 } 
    433  
     299include_once dirname( __FILE__ ).'/include/xpress_upgrade.php' ; 
    434300add_action( 'admin_notices', 'xpress_update_check', 3 ); 
    435301 
    436302include_once dirname( __FILE__ ).'/include/dashboard_feed.php' ; 
    437303 
     304include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 
     305 
    438306?> 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php

    r406 r451  
    3636        var $is_dashboard_forum_disp; 
    3737        var $theme_select; 
     38        var $is_block_error_display; 
    3839        //constructor 
    3940        function XPressME_Class() 
     
    8687                $this->is_dashboard_forum_disp = true; 
    8788                $this->theme_select = 'use_wordpress_select'; 
     89                $this->is_block_error_display = true; 
    8890        } 
    8991         
     
    143145                        'is_dashboard_blog_disp' => $this->is_dashboard_blog_disp, 
    144146                        'is_dashboard_forum_disp' => $this->is_dashboard_forum_disp, 
    145                         'theme_select' => $this->theme_select 
     147                        'theme_select' => $this->theme_select, 
     148                        'is_block_error_display' => $this->is_block_error_display 
    146149                ); 
    147150                if ($mode == 'add_new') { 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_widget_class.php

    r406 r451  
    1616        function XPress_Menu_Widget(){ 
    1717                $widget_ops = array('classname' => 'widget_xpress', 'description' => __( "XPressME User Menu Widget") ); 
    18                 $control_ops = array('width' => 400, 'height' => 300); 
     18                $control_ops = array('width' => 600, 'height' => 300); 
    1919                $this->WP_Widget('XPress_Menu', __('XPressME MENU'), $widget_ops, $control_ops); 
    2020        } 
     
    2626        function widget($args, $instance){ 
    2727                global $xpress_config,$xoops_config; 
     28                global $current_user; 
    2829 
    2930                extract($args); 
     
    3839 
    3940                # Make the XPressME MENU widget 
     41                $menu = array(); 
     42                for($i = 0; $i < 10; $i++) { 
     43                        $menu[$i]['Type'] = $instance['Type_' . $i]; 
     44                        $menu[$i]['Title'] = $instance['Title_' . $i]; 
     45                        $menu[$i]['URL'] = $instance['URL_' . $i]; 
     46                        $menu[$i]['Visible'] = $instance['Visible_' . $i]; 
     47                        $menu[$i]['Weight'] = $instance['Weight_' . $i]; 
     48                }                        
    4049                echo '<ul>'; 
    4150                for($i = 0; $i < 10; $i++) { 
    42                         $link_name = $instance['name' . $i]; 
    43                         $link_url = $instance['link' . $i]; 
    44                         if (!empty($link_name)) echo '<li><a href="' . $link_url . '">' . $link_name . '</a></li>'; 
     51                        $type = $menu[$i]['Type']; 
     52                        if ($menu[$i]['Visible'] && !empty($menu[$i]['Title']) ){ 
     53                                switch($type){ 
     54                                        case 0: 
     55                                        case 1: 
     56                                                echo '<li><a href="' . $menu[$i]['URL'] . '">' . $menu[$i]['Title'] . '</a></li>'; 
     57                                                break; 
     58                                        case 2: // Add New 
     59                                                if (is_user_logged_in()){ 
     60                                                        if ($current_user->user_level > 0){ 
     61                                                                if (xpress_is_wp_version('<','2.1') ){ 
     62                                                                        echo '<li><a href="'.get_settings('siteurl').'/wp-admin/post.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 
     63                                                                } else { 
     64                                                                        echo '<li><a href="'.get_settings('siteurl').'/wp-admin/post-new.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 
     65                                                                } 
     66                                                        } 
     67                                                } 
     68                                                break; 
     69                                        case 3: // User Profile 
     70                                                if (is_user_logged_in()) {  
     71                                                        echo '<li><a href="'.get_settings('siteurl').'/wp-admin/profile.php" title="' . $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 
     72                                                } 
     73                                                break; 
     74                                        case 4: // WordPress Admin 
     75                                                if (is_user_logged_in()){ 
     76                                                        if ($current_user->user_level > 7){ 
     77                                                                echo '<li><a href="'.get_settings('siteurl').'/wp-admin/" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 
     78                                                        } 
     79                                                } 
     80                                                break; 
     81                                        case 5: // Module Admin 
     82                                                if($GLOBALS["xoopsUserIsAdmin"]){ 
     83                                                        echo '<li><a href="'.get_settings('siteurl').'/admin/index.php"  title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 
     84                                                } 
     85                                                break; 
     86                                        case 6: // XPressME Setting 
     87                                                if (is_user_logged_in()){ 
     88                                                        if ($current_user->user_level > 7){ 
     89                                                                echo '<li><a href="'.get_settings('siteurl').'/wp-admin/admin.php?page=xpressme\\xpressme.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 
     90                                                        } 
     91                                                } 
     92                                                break; 
     93                                        case 7: // Display Mode Select 
     94                                                if ($xpress_config->viewer_type == 'user_select'){ 
     95                                                        echo disp_mode_set(); 
     96                                                } 
     97                                                break; 
     98                                        default: 
     99                                } 
     100                        } 
    45101                } 
     102 
    46103                echo '</ul>'; 
    47104                # After the widget 
     
    58115                 
    59116                for($i = 0; $i < 10; $i++) { 
    60                         $instance['name'. $i] = strip_tags(stripslashes($new_instance['name'. $i])); 
    61                         $instance['link' . $i] = strip_tags(stripslashes($new_instance['link'. $i])); 
     117                        $instance['Type_'. $i] = strip_tags(stripslashes($new_instance['Type_'. $i])); 
     118                        $instance['Title_' . $i] = strip_tags(stripslashes($new_instance['Title_'. $i])); 
     119                        if ($instance['Type_'. $i] < 2){ 
     120                                $instance['URL_' . $i] = strip_tags(stripslashes($new_instance['URL_'. $i])); 
     121                        } else { 
     122                                $instance['URL_' . $i] = ''; 
     123                        } 
     124                        $instance['Visible_' . $i] = strip_tags(stripslashes($new_instance['Visible_'. $i])); 
    62125                } 
    63126 
     
    71134        function form($instance){ 
    72135                global $xpress_config,$xoops_config; 
     136                 
     137                if (xpress_is_wp_version('<','2.1') ){ 
     138                        $addnew = get_settings('siteurl').'/wp-admin/post.php'; 
     139                } else { 
     140                        $addnew = get_settings('siteurl').'/wp-admin/post-new.php'; 
     141                } 
     142                $type = array(); 
     143                $type[0] = __('Link', 'xpressme'); 
     144                $type[1] = __('Site Home', 'xpressme'); 
     145                $type[2] = __('Add New', 'xpressme'); 
     146                $type[3] = __('User Profile', 'xpressme'); 
     147                $type[4] = __('WordPress Admin', 'xpressme'); 
     148                $type[5] = __('Module Admin', 'xpressme'); 
     149                $type[6] = __('XPressME Setting', 'xpressme'); 
     150                $type[7] = __('Display Mode Select', 'xpressme'); 
     151                 
     152                $auto_setting = __('Auto Setting', 'xpressme'); 
     153                 
    73154                //Defaults 
    74155                $instance = wp_parse_args( (array) $instance,  
    75156                array( 
    76                         'title'=> __('User Menu'), 
    77                         'name0' => __('Site Home'), 
    78                         'link0' => $xoops_config->xoops_url, 
    79                         'name1' => '', 
    80                         'link1' => '', 
    81                         'name2' => '', 
    82                         'link2' => '', 
    83                         'name3' => '', 
    84                         'link3' => '', 
    85                         'name4' => '', 
    86                         'link4' => '', 
    87                         'name5' => '', 
    88                         'link5' => '', 
    89                         'name6' => '', 
    90                         'link6' => '', 
    91                         'name7' => '', 
    92                         'link7' => '', 
    93                         'name8' => '', 
    94                         'link8' => '', 
    95                         'name9' => '', 
    96                         'link9' => '' 
     157                        'title'=> __('User Menu', 'xpressme'), 
     158                         
     159                        'Type_0' =>1 ,  
     160                        'Title_0' => __('Site Home', 'xpressme'), 
     161                        'URL_0' => get_xoops_url(), 
     162                        'Visible_0' => 1, 
     163                         
     164                        'Type_1' =>2 ,  
     165                        'Title_1' => __('Add New', 'xpressme'), 
     166                        'URL_1' => $auto_setting, 
     167                        'Visible_1' => 1, 
     168                                 
     169                        'Type_2' =>3 ,  
     170                        'Title_2' => __('User Profile', 'xpressme'), 
     171                        'URL_2' => __('Auto Setting', 'xpressme'), 
     172                        'Visible_2' => 1, 
     173                                 
     174                        'Weight_2' => 3, 
     175                        'Type_3' =>4 ,  
     176                        'Title_3' => __('WordPress Admin', 'xpressme'), 
     177                        'URL_3' => $auto_setting, 
     178                        'Visible_3' => 1, 
     179                                 
     180                        'Type_4' =>5 ,  
     181                        'Title_4' => __('Module Admin', 'xpressme'), 
     182                        'URL_4' => $auto_setting, 
     183                        'Visible_4' => 1, 
     184                                 
     185                        'Type_5' =>6 ,  
     186                        'Title_5' => __('XPressME Setting', 'xpressme'), 
     187                        'URL_5' => $auto_setting, 
     188                        'Visible_5' => 1, 
     189                                 
     190                        'Type_6' =>7 ,  
     191                        'Title_6' => $auto_setting, 
     192                        'URL_6' => $auto_setting, 
     193                        'Visible_6' => 1, 
     194                        'Type_7' =>0 ,  
     195                        'Title_7' => __('Link', 'xpressme'), 
     196                        'URL_7' => '', 
     197                        'Visible_7' => 0, 
     198                                 
     199                        'Type_8' =>0 ,  
     200                        'Title_8' => __('Link', 'xpressme'), 
     201                        'URL_8' => '', 
     202                        'Visible_8' => 0, 
     203                                 
     204                        'Type_9' =>0 ,  
     205                        'Title_9' => __('Link', 'xpressme'), 
     206                        'URL_9' => '', 
     207                        'Visible_9' => 0, 
    97208                ) ); 
    98  
    99                 $title = htmlspecialchars($instance['title']); 
     209                 
     210                echo ' 
     211                <script type="text/javascript"> 
     212                    function TypeSelect(type_id,title_id,url_id){ 
     213                                var type=document.getElementById(type_id); 
     214                                var title=document.getElementById(title_id); 
     215                                var link_url=document.getElementById(url_id); 
     216                                var auto_set = \''. $auto_setting .'\'; 
     217                                title.value = type[type.value].text; 
     218                                if(type.value > 1){ 
     219                                        link_url.value = auto_set; 
     220                                        link_url.disabled = true; 
     221                                        link_url.style.backgroundColor = \'transparent\'; 
     222                        } else { 
     223                                if (link_url.value == auto_set) link_url.value = \'\'; 
     224                                        link_url.disabled = false; 
     225                                        link_url.style.backgroundColor = \'#FFFFEE\'; 
     226                                } 
     227                        if(type.value == 1){ 
     228                                        link_url.value = \''.get_xoops_url() . '\'; 
     229                        } 
     230                                if(type.value == 7){ 
     231                                        title.value = auto_set; 
     232                                        title.disabled = true; 
     233                                        title.style.backgroundColor = \'transparent\'; 
     234                        } else { 
     235                                if (title.value == auto_set) title.value = \'\'; 
     236                                        title.disabled = false; 
     237                                        title.style.backgroundColor = \'#FFFFEE\'; 
     238                                } 
     239 
     240                    } 
     241                </script>'; 
    100242 
    101243                // Output the options 
    102244                echo '<p><label for="' . $this->get_field_name('title') . '">'. "\n"; 
    103                 echo __('Title:') . '<input style="width: 200px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>'. "\n"; 
    104                 echo '<label>' . __('Title') . '</label>' . '<label style="margin-left:120px;">' . __('URL') . '</label>' . "\n"; 
     245                echo __('Title:') . '<input style="width: 200px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $instance['title'] . '" /></label></p>'. "\n"; 
     246                echo " 
     247                    <table width='100%' class='outer' cellpadding='4' cellspacing='1' border=\"1\" bordercolor=\"#888888\"> 
     248                    <tr valign='middle' align='center' style=\"background-color:#2E323B;color:#FFFFFF\"> 
     249                    <th width='10%'>Type</th> 
     250                    <th width='15%'>Title</th> 
     251                    <th width='10%'>URL</th> 
     252                    <th width='10px'>Visible</th> 
     253                        </tr> 
     254                "; 
    105255                for($i = 0; $i < 10; $i++) { 
    106                 echo '<p><input style="width: 100px;" id="' . $this->get_field_id('name' . $i) . '" name="' . $this->get_field_name('name' . $i) . '" type="text" value="' . $instance['name'. $i] . '" />:'. "\n"; 
    107                 echo '<input style="width: 280px;" id="' . $this->get_field_id('link' . $i) . '" name="' . $this->get_field_name('link' . $i) . '" type="text" value="' . $instance['link'. $i] . '" /></p>'. "\n"; 
     256                        $even = $i % 2; 
     257                        if ($even) { 
     258                                $back_color = ' style="background-color:#E3E3E3"'; 
     259                        } else { 
     260                                $back_color = ' style="background-color:#F5F5F5"'; 
     261                        } 
     262                        $text_back_color = ' style="background-color:#FFFFEE"'; 
     263                        echo "<tr $back_color>"; 
     264 
     265                        $select_arg = "'" . $this->get_field_id('Type_' . $i) . "','" . $this->get_field_id('Title_' . $i) . "','" . $this->get_field_id('URL_' . $i) . "'"; 
     266                        echo '<th><select id="' . $this->get_field_id('Type_' . $i) . '" name="' . $this->get_field_name('Type_' . $i) . '" ' .$back_color . 'onchange="TypeSelect(' . $select_arg . ')">'; 
     267                        for ($j = 0; $j < 8; $j++) { 
     268                                if ($instance['Type_'. $i] == $j) $select = ' selected="selected"'; else $select = ''; 
     269                                echo '<option ' . $select . 'value="'. $j . '">' . $type[$j] . '</option>'; 
     270                        } 
     271                        echo '</select></th>'; 
     272                         
     273                        if ($instance['Type_'. $i] == 7) { 
     274                                $title_disible = 'disabled=disabled'; 
     275                                $title_back_color = $back_color; 
     276                                $title_value = $auto_setting; 
     277 
     278                        } else { 
     279                                $title_disible = ''; 
     280                                $title_back_color = $text_back_color; 
     281                                $title_value = $instance['Title_'. $i]; 
     282                        } 
     283                        echo '<th style="padding:2px"><input size="24" id="' . $this->get_field_id('Title_' . $i) . '" name="' . $this->get_field_name('Title_' . $i) . '" type="text" value="' . $title_value . '" ' .$title_back_color . $title_disible .  '/></th>'. "\n"; 
     284                        if ($instance['Type_'. $i] > 1) { 
     285                                $url_disible = 'disabled=disabled'; 
     286                                $url_back_color = $back_color; 
     287                                $url_value = $auto_setting; 
     288                        } else { 
     289                                $url_disible = ''; 
     290                                $url_back_color = $text_back_color; 
     291                                $url_value = $instance['URL_'. $i]; 
     292                        } 
     293                        echo '<th style="padding:2px"><input size="40" id="' . $this->get_field_id('URL_' . $i) . '" name="' . $this->get_field_name('URL_' . $i) . '" type="text" value="' . $url_value . '" ' .$url_back_color . $url_disible . '/></th>'. "\n"; 
     294                        if ($instance['Visible_'. $i]) $check = ' checked="checked"'; else $check = ''; 
     295                        echo '<th><input size="4" id="' . $this->get_field_id('Visible_' . $i) . '" name="' . $this->get_field_name('Visible_' . $i) . '" type="checkbox" value="1"' . $check . ' /></th>'. "\n"; 
     296                        echo '</tr>'; 
    108297                } 
     298                echo    '</table>'; 
    109299        } 
    110300 
Note: See TracChangeset for help on using the changeset viewer.