- Timestamp:
- Nov 20, 2009, 2:52:16 PM (15 years ago)
- 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 792 792 793 793 $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>'; 795 795 if(preg_match('/'. $head_pattrn . '/s' ,$calendar,$head_match)){ 796 796 $sun_index = 1 - $week_begins; -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r389 r451 365 365 } 366 366 367 function 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 403 function 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 367 419 ?> -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po
r406 r451 8 8 "Project-Id-Version: XPressME Plugin\n" 9 9 "Report-Msgid-Bugs-To: \n" 10 "POT-Creation-Date: 2009-1 0-06 21:59+0900\n"11 "PO-Revision-Date: 2009-1 0-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" 12 12 "Last-Translator: toemon <info@toemon.com>\n" 13 13 "Language-Team: toemon <info@toemon.com>\n" … … 23 23 "X-Poedit-SearchPath-0: .\n" 24 24 25 #: xpressme.php: 3325 #: xpressme.php:59 26 26 msgid "Display Settings" 27 27 msgstr "表示設定" 28 28 29 #: xpressme.php: 3429 #: xpressme.php:60 30 30 msgid "Integration Settings" 31 31 msgstr "統合設定" 32 32 33 #: xpressme.php: 3533 #: xpressme.php:61 34 34 msgid "Other Settings" 35 35 msgstr "その他の設定" 36 36 37 #: xpressme.php: 3737 #: xpressme.php:63 38 38 msgid "Upgrade" 39 39 msgstr "アップグレード" 40 40 41 #: xpressme.php: 3841 #: xpressme.php:64 42 42 msgid "to Modules Admin" 43 43 msgstr "モジュール管理へ" 44 44 45 #: xpressme.php:1 3845 #: xpressme.php:164 46 46 msgid "XPressME Display Setting" 47 47 msgstr "XPressME 表示設定" 48 48 49 #: xpressme.php:1 4449 #: xpressme.php:170 50 50 msgid "Thema Sidebar Display" 51 51 msgstr "テーマ表示時にサイドバー表示する。" 52 52 53 #: xpressme.php:1 4554 #: xpressme.php:2 3555 #: xpressme.php:2 4156 #: xpressme.php:2 4657 #: xpressme.php:2 5258 #: xpressme_class.php:2 8359 #: xpressme_class.php: 29960 #: xpressme_class.php:4 3161 #: xpressme_class.php:4 4253 #: 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 62 62 msgid "YES" 63 63 msgstr "はい" 64 64 65 #: xpressme.php:1 4666 #: xpressme.php:2 3667 #: xpressme.php:2 4268 #: xpressme.php:2 4769 #: xpressme.php:2 5370 #: xpressme_class.php:2 8471 #: xpressme_class.php:3 0072 #: xpressme_class.php:4 3273 #: xpressme_class.php:4 4365 #: 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 74 74 msgid "NO" 75 75 msgstr "いいえ" 76 76 77 #: xpressme.php:1 5578 #: xpressme.php:2 0479 #: xpressme.php:2 5877 #: xpressme.php:181 78 #: xpressme.php:232 79 #: xpressme.php:291 80 80 msgid "Update Config" 81 81 msgstr "更新" 82 82 83 #: xpressme.php:1 5684 #: xpressme.php:2 0585 #: xpressme.php:2 5983 #: xpressme.php:182 84 #: xpressme.php:233 85 #: xpressme.php:292 86 86 msgid "Preset Config" 87 87 msgstr "プリセット" 88 88 89 #: xpressme.php: 18889 #: xpressme.php:214 90 90 msgid "XPressME Integration Setting" 91 91 msgstr "XPressME 統合設定" 92 92 93 #: xpressme.php: 19393 #: xpressme.php:218 94 94 msgid "Media Upload Base Path" 95 95 msgstr "メディアアップロードのベースパス設定" 96 96 97 #: xpressme.php: 19497 #: xpressme.php:222 98 98 msgid "Use XOOPS UPLOAD PATH" 99 99 msgstr "XOOPSのアップロードパスを使用する。" 100 100 101 #: xpressme.php: 195101 #: xpressme.php:223 102 102 msgid "USE WordPress BASE_PATH" 103 103 msgstr "WordPressのベースパスを使用する。" 104 104 105 #: xpressme.php:2 29105 #: xpressme.php:257 106 106 msgid "XPressME Other Setting" 107 107 msgstr "XPressME その他の設定" 108 108 109 #: xpressme.php:2 34109 #: xpressme.php:262 110 110 msgid "The change tracking of the post is preserved" 111 111 msgstr "投稿の変更履歴を有効にする。" 112 112 113 #: xpressme.php:2 40113 #: xpressme.php:268 114 114 msgid "Select Multi user mode" 115 115 msgstr "マルチユーザーモードを選択" 116 116 117 #: xpressme.php:2 45117 #: xpressme.php:273 118 118 msgid "Is the posts author views counted?" 119 119 msgstr "投稿者の閲覧をカウントしますか?" 120 120 121 #: xpressme.php:2 51121 #: xpressme.php:279 122 122 msgid "Is SQL debugging window displayed?" 123 123 msgstr "SQLデバッグウィンドを表示しますか?" 124 124 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 126 msgid "Select warning display of block file version check" 127 msgstr "ブロックファイルのバージョンチェック時における警告表示" 128 129 #: xpressme.php:285 130 msgid "Do display" 131 msgstr "表示する" 132 133 #: xpressme.php:286 134 msgid "Do not display" 135 msgstr "表示しない" 136 137 #: xpressme_class.php:61 138 #: xpressme_class.php:243 169 139 msgid "Older Post" 170 140 msgstr "前の投稿へ" 171 141 172 #: xpressme_class.php: 56173 #: xpressme_class.php:2 35142 #: xpressme_class.php:62 143 #: xpressme_class.php:246 174 144 msgid "Newer Post" 175 145 msgstr "次の投稿へ" 176 146 177 #: xpressme_class.php: 58178 #: xpressme_class.php:2 38147 #: xpressme_class.php:64 148 #: xpressme_class.php:249 179 149 msgid "Older Entries" 180 150 msgstr "前ページへ" 181 151 182 #: xpressme_class.php: 59183 #: xpressme_class.php:2 41152 #: xpressme_class.php:65 153 #: xpressme_class.php:252 184 154 msgid "Newer Entries" 185 155 msgstr "次ページへ" 186 156 187 #: xpressme_class.php:7 3188 #: xpressme_class.php: 74189 #: xpressme_class.php:2 44157 #: xpressme_class.php:79 158 #: xpressme_class.php:80 159 #: xpressme_class.php:255 190 160 msgid "Read the rest of this entry »" 191 161 msgstr "この投稿の続きを読む »" 192 162 193 #: xpressme_class.php:3 42163 #: xpressme_class.php:356 194 164 msgid "Single Post Navi Setting" 195 165 msgstr "シングルポストナビの設定" 196 166 197 #: xpressme_class.php:3 47198 #: xpressme_class.php: 392167 #: xpressme_class.php:361 168 #: xpressme_class.php:406 199 169 msgid "Adjustment of Navi link display position" 200 170 msgstr "リンクの表示位置設定" 201 171 202 #: xpressme_class.php:3 50172 #: xpressme_class.php:364 203 173 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 204 174 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示" 205 175 206 #: xpressme_class.php:3 51176 #: xpressme_class.php:365 207 177 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 208 178 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 209 179 210 #: xpressme_class.php:3 57180 #: xpressme_class.php:371 211 181 msgid "Select Display name of PostNavi Link" 212 182 msgstr "表示するリンクテキストを選択" 213 183 214 #: xpressme_class.php:3 60184 #: xpressme_class.php:374 215 185 msgid "Title of post" 216 186 msgstr "投稿記事のタイトルを表示" 217 187 218 #: xpressme_class.php:3 61188 #: xpressme_class.php:375 219 189 msgid "Title of Navi" 220 190 msgstr "ナビタイトルを表示" 221 191 222 #: xpressme_class.php:3 67192 #: xpressme_class.php:381 223 193 msgid "Display Navi Title of Old Post Link" 224 194 msgstr "古い記事へのナビタイトルを設定" 225 195 226 #: xpressme_class.php:3 74196 #: xpressme_class.php:388 227 197 msgid "Display Navi Title of Newer Post Link" 228 198 msgstr "より新しい記事へのナビタイトルを設定" 229 199 230 #: xpressme_class.php: 387200 #: xpressme_class.php:401 231 201 msgid "Posts List Page Navi Setting" 232 202 msgstr "ポストリストページナビの設定" 233 203 234 #: xpressme_class.php: 395204 #: xpressme_class.php:409 235 205 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right" 236 206 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示" 237 207 238 #: xpressme_class.php: 396208 #: xpressme_class.php:410 239 209 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right" 240 210 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示" 241 211 242 #: xpressme_class.php:4 02212 #: xpressme_class.php:416 243 213 msgid "Display Navi Title of Old Page Link" 244 214 msgstr "古いページへのナビタイトルを設定" 245 215 246 #: xpressme_class.php:4 09216 #: xpressme_class.php:423 247 217 msgid "Display Navi Title of Newer Page Link" 248 218 msgstr "より新しいページへのナビタイトルを設定" 249 219 250 #: xpressme_class.php:4 22220 #: xpressme_class.php:436 251 221 msgid "Dashboard feed Display Setting" 252 222 msgstr "ダッシュボード フィード表示設定" 253 223 254 #: xpressme_class.php:4 28224 #: xpressme_class.php:442 255 225 msgid "Display XPressMe Integration Kit Blog" 256 226 msgstr "XPressME Integration Kit ブログを表示する。" 257 227 258 #: xpressme_class.php:4 39228 #: xpressme_class.php:453 259 229 msgid "Display XPressMe Integration Kit Forum" 260 230 msgstr "XPressME Integration Kit フォーラムを表示する。" 261 231 262 #: xpressme_class.php:4 56232 #: xpressme_class.php:471 263 233 msgid "Role Setting at Login" 264 234 msgstr "ログイン時の権限設定" 265 235 266 #: xpressme_class.php:4 59236 #: xpressme_class.php:474 267 237 msgid "XOOPS Groupe" 268 238 msgstr "XOOPSグループ名" 269 239 270 #: xpressme_class.php:4 59240 #: xpressme_class.php:474 271 241 msgid "WordPress Role" 272 242 msgstr "WordPressでの権限" 273 243 274 #: xpressme_class.php:4 59244 #: xpressme_class.php:474 275 245 msgid "Role is set at each login" 276 246 msgstr "ログイン時、常に権限を更新する" 277 247 278 #: xpressme_class.php: 485279 #: xpressme_class.php: 489280 #: xpressme_class.php: 492248 #: xpressme_class.php:500 249 #: xpressme_class.php:504 250 #: xpressme_class.php:507 281 251 msgid "Default Role of WordPress" 282 252 msgstr "WordPressのデフォルト権限" 283 253 284 #: xpressme_class.php: 486285 #: xpressme_class.php: 490286 #: xpressme_class.php: 493254 #: xpressme_class.php:501 255 #: xpressme_class.php:505 256 #: xpressme_class.php:508 287 257 msgid "Group User Doesn't Register" 288 258 msgstr "ユーザ登録しない" 289 259 290 #: xpressme_class.php:524 260 #: xpressme_class.php:521 261 msgid "Only the Admin can set Group Role Setting" 262 msgstr "管理者だけがグループ権限を設定できます。" 263 264 #: xpressme_class.php:541 291 265 msgid "WordPress MU cannot integrate the comments." 292 266 msgstr "WordPress MUはコメント統合できません。" 293 267 294 #: xpressme_class.php:5 26268 #: xpressme_class.php:543 295 269 msgid "Do Not Comment Integration." 296 270 msgstr "コメント統合しません。" 297 271 298 #: xpressme_class.php:5 61272 #: xpressme_class.php:578 299 273 msgid "Comment integration with D3Forum" 300 274 msgstr "D3Forumとのコメント統合" 301 275 302 #: xpressme_class.php:5 63276 #: xpressme_class.php:580 303 277 msgid "Select the forum of D3Forum that does the comment integration from the following lists." 304 278 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。" 305 279 306 #: xpressme_class.php:5 68280 #: xpressme_class.php:585 307 281 msgid "Select the Type of display of D3Forum comment." 308 282 msgstr "D3Forumの表示タイプを選択" 309 283 310 #: xpressme_class.php:5 70311 #: xpressme_class.php:5 73284 #: xpressme_class.php:587 285 #: xpressme_class.php:590 312 286 msgid "Flat" 313 287 msgstr "フラット" 314 288 315 #: xpressme_class.php:5 71316 #: xpressme_class.php:5 74289 #: xpressme_class.php:588 290 #: xpressme_class.php:591 317 291 msgid "Threaded" 318 292 msgstr "スレッド" 319 293 320 #: xpressme_class.php:5 77294 #: xpressme_class.php:594 321 295 msgid "Select the order of display of D3Forum comment." 322 296 msgstr "D3Forumコメントの表示順を選択" 323 297 324 #: xpressme_class.php:5 79325 #: xpressme_class.php:5 82298 #: xpressme_class.php:596 299 #: xpressme_class.php:599 326 300 msgid "DESC" 327 301 msgstr "降順" 328 302 329 #: xpressme_class.php:5 80330 #: xpressme_class.php: 583303 #: xpressme_class.php:597 304 #: xpressme_class.php:600 331 305 msgid "ASC" 332 306 msgstr "昇順" 333 307 334 #: xpressme_class.php: 586308 #: xpressme_class.php:603 335 309 msgid "Number of displays of D3Forum comments." 336 310 msgstr "D3Forumのコメント表示数" 337 311 338 #: xpressme_class.php: 589312 #: xpressme_class.php:606 339 313 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. " 340 314 msgstr "WordPressコメントとD3Forumポスト間の一括転送(エクスポート・インポート)" 341 315 342 #: xpressme_class.php: 590316 #: xpressme_class.php:607 343 317 msgid "Export to D3Forum" 344 318 msgstr "D3Forumへ一括エクスポート" 345 319 346 #: xpressme_class.php: 591320 #: xpressme_class.php:608 347 321 msgid "Import from D3Forum" 348 322 msgstr "D3Forumから一括インポート" 349 323 350 #: xpressme_class.php:6 04324 #: xpressme_class.php:621 351 325 msgid "Contents Excerpt Setting" 352 326 msgstr "記事抜粋の設定" 353 327 354 #: xpressme_class.php:6 09328 #: xpressme_class.php:626 355 329 msgid "Is the excerpt display done with the archive of contents?" 356 330 msgstr "記事のアーカイブで抜粋表示を行いますか?" 357 331 358 #: xpressme_class.php:6 16332 #: xpressme_class.php:633 359 333 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. " 360 334 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。" 361 335 362 #: xpressme_class.php:6 23336 #: xpressme_class.php:640 363 337 msgid "Excerpt length of word for ASCII contents" 364 338 msgstr "ASCIIコンテンツの抜粋単語数" 365 339 366 #: xpressme_class.php:6 30340 #: xpressme_class.php:647 367 341 msgid "Excerpt length of character for multibyte contents" 368 342 msgstr "マルチバイトコンテンツの抜粋文字数" 369 343 370 #: xpressme_class.php:6 37344 #: xpressme_class.php:654 371 345 msgid "This text is displayed in the link that reads contents not excerpted.(Is not displayed for the blank.)" 372 346 msgstr "抜粋されていないコンテンツを読むためのリンクに表示されるテキスト(空白の場合リンクを表示しません)" 373 347 374 #: xpressme_class.php:6 44348 #: xpressme_class.php:661 375 349 msgid "This text is displayed in the link that more tag (<!--more-->). " 376 350 msgstr "more タグ (<!--more-->)のリンクに表示されるテキスト" 377 351 378 #: xpressme_class.php:6 56352 #: xpressme_class.php:673 379 353 msgid "Display Mode Setting" 380 354 msgstr "表示モード設定" 381 355 382 #: xpressme_class.php:6 59356 #: xpressme_class.php:676 383 357 msgid "Select the XPressME Display Mode." 384 358 msgstr "XPressMEの表示モードの選択" 385 359 386 #: xpressme_class.php:6 64360 #: xpressme_class.php:681 387 361 msgid "Xoops Mode" 388 362 msgstr "XOOPSモード" 389 363 390 #: xpressme_class.php:6 68364 #: xpressme_class.php:685 391 365 msgid "WordPress Mode" 392 366 msgstr "WordPressモード" 393 367 394 #: xpressme_class.php:6 72368 #: xpressme_class.php:689 395 369 msgid "User select" 396 370 msgstr "ユーザによる選択" 397 371 398 #: xpressme_class.php:6 77372 #: xpressme_class.php:694 399 373 msgid "Select the theme used in the XOOPS Mode." 400 374 msgstr "XOOPSモードで使用するテーマを選択" 401 375 402 #: xpressme_class.php:6 82376 #: xpressme_class.php:699 403 377 msgid "Use WordPress Selected Themes" 404 378 msgstr "WordPressで選択したテーマを使う" 405 379 406 #: xpressme_class.php:7 00380 #: xpressme_class.php:717 407 381 msgid "Header Meta Option" 408 382 msgstr "ヘッダメタ オプション" 409 383 410 #: xpressme_class.php:7 05384 #: xpressme_class.php:722 411 385 msgid "Select the Header keyword." 412 386 msgstr "ヘッダで使用するキーワードの選択" 413 387 414 #: xpressme_class.php:7 10388 #: xpressme_class.php:727 415 389 msgid "Xoops KeyWord" 416 390 msgstr "XOOPSのキーワード" 417 391 418 #: xpressme_class.php:7 13392 #: xpressme_class.php:730 419 393 msgid "WordPress KeyWord" 420 394 msgstr "WordPressのキーワード" 421 395 422 #: xpressme_class.php:7 16396 #: xpressme_class.php:733 423 397 msgid "WordPress & Xoops KeyWord" 424 398 msgstr "WordPressjとXOOPSのキーワード" 425 399 426 #: xpressme_class.php:7 22400 #: xpressme_class.php:739 427 401 msgid "Select the Header Description." 428 402 msgstr "ヘッダで使用するディスクリプション(説明)の選択" 429 403 430 #: xpressme_class.php:7 27404 #: xpressme_class.php:744 431 405 msgid "Xoops Description" 432 406 msgstr "XOOPSのディスクリプション" 433 407 434 #: xpressme_class.php:7 30408 #: xpressme_class.php:747 435 409 msgid "WordPress Description" 436 410 msgstr "WordPressのディスクリプション" 437 411 438 #: xpressme_class.php:7 33412 #: xpressme_class.php:750 439 413 msgid "WordPress & Xoops Description" 440 414 msgstr "WordPressとXOOPSのディスクリプション" 441 415 442 #: xpressme_class.php:7 39416 #: xpressme_class.php:756 443 417 msgid "Select the Header Robots Index." 444 418 msgstr "ヘッダで使用するロボットインデックスの選択" 445 419 446 #: xpressme_class.php:7 44420 #: xpressme_class.php:761 447 421 msgid "Xoops Robots Index" 448 422 msgstr "XOOPSのロボットインデックス" 449 423 450 #: xpressme_class.php:7 47424 #: xpressme_class.php:764 451 425 msgid "WordPress Robots Index" 452 426 msgstr "WordPressのロボットインデックス" 453 427 454 #: xpressme_class.php:7 76428 #: xpressme_class.php:793 455 429 #, php-format 456 430 msgid "Unable to create directory %s. Is its parent directory writable by the server?" 457 431 msgstr "%s ディレクトリーが作成できません。サーバーの親ディレクトリー書き込み権限があるか確認くださいr?" 458 432 433 #: xpressme_widget_class.php:17 434 msgid "XPressME User Menu Widget" 435 msgstr "XPressME ユーザメニュー ウィジェット" 436 437 #: xpressme_widget_class.php:19 438 msgid "XPressME MENU" 439 msgstr "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 445 msgid "Link" 446 msgstr "リンク" 447 448 #: xpressme_widget_class.php:144 449 #: xpressme_widget_class.php:160 450 msgid "Site Home" 451 msgstr "サイトホーム" 452 453 #: xpressme_widget_class.php:145 454 #: xpressme_widget_class.php:165 455 msgid "Add New" 456 msgstr "新規投稿" 457 458 #: xpressme_widget_class.php:146 459 #: xpressme_widget_class.php:170 460 msgid "User Profile" 461 msgstr "ユーザプロファイル" 462 463 #: xpressme_widget_class.php:147 464 #: xpressme_widget_class.php:176 465 msgid "WordPress Admin" 466 msgstr "WordPress管理" 467 468 #: xpressme_widget_class.php:148 469 #: xpressme_widget_class.php:181 470 msgid "Module Admin" 471 msgstr "モジュール管理" 472 473 #: xpressme_widget_class.php:149 474 #: xpressme_widget_class.php:186 475 msgid "XPressME Setting" 476 msgstr "XPressME設定" 477 478 #: xpressme_widget_class.php:150 479 msgid "Display Mode Select" 480 msgstr "表示モード選択" 481 482 #: xpressme_widget_class.php:152 483 #: xpressme_widget_class.php:171 484 msgid "Auto Setting" 485 msgstr "自動設定" 486 487 #: xpressme_widget_class.php:157 488 msgid "User Menu" 489 msgstr "ユーザメニュー" 490 491 #: xpressme_widget_class.php:245 492 msgid "Title:" 493 msgstr "タイトル:" 494 459 495 #: include/custom_functions.php:74 460 496 #, php-format … … 463 499 464 500 #: include/custom_functions.php:429 465 #: include/custom_functions.php:45 4501 #: include/custom_functions.php:459 466 502 #, php-format 467 503 msgid "views :%d" 468 504 msgstr "閲覧数 :%d" 469 505 470 #: include/custom_functions.php:6 08506 #: include/custom_functions.php:623 471 507 msgid "Main" 472 508 msgstr "メイン" 473 509 474 #: include/custom_functions.php:6 11510 #: include/custom_functions.php:626 475 511 #, php-format 476 512 msgid "Archive for the ‘%s’ Category" 477 513 msgstr "カテゴリー ‘%s’ のアーカイブ" 478 514 479 #: include/custom_functions.php:6 14515 #: include/custom_functions.php:629 480 516 #, php-format 481 517 msgid "Posts Tagged ‘%s’" 482 518 msgstr "‘%s’ タグのついている投稿" 483 519 484 #: include/custom_functions.php:6 17520 #: include/custom_functions.php:632 485 521 #, php-format 486 522 msgid "Archive for %s|Daily archive page" 487 523 msgstr "%sの日別アーカイブ" 488 524 489 #: include/custom_functions.php:6 17525 #: include/custom_functions.php:632 490 526 msgid "F jS, Y" 491 527 msgstr "Y年n月j日" 492 528 493 #: include/custom_functions.php:6 19529 #: include/custom_functions.php:634 494 530 #, php-format 495 531 msgid "Archive for %s|Monthly archive page" 496 532 msgstr "%sの月別アーカイブ" 497 533 498 #: include/custom_functions.php:6 19534 #: include/custom_functions.php:634 499 535 msgid "F, Y" 500 536 msgstr "Y年n月" 501 537 502 #: include/custom_functions.php:6 21538 #: include/custom_functions.php:636 503 539 #, php-format 504 540 msgid "Archive for %s|Yearly archive page" 505 541 msgstr "%sの年別アーカイブ " 506 542 507 #: include/custom_functions.php:6 21543 #: include/custom_functions.php:636 508 544 msgid "Y" 509 545 msgstr "Y年" 510 546 511 #: include/custom_functions.php:6 24547 #: include/custom_functions.php:639 512 548 #, php-format 513 549 msgid "Archive for the ‘%s’ Author" 514 550 msgstr "投稿者 ‘%s’ のアーカイブ" 515 551 516 #: include/custom_functions.php:6 27552 #: include/custom_functions.php:642 517 553 #, php-format 518 554 msgid "Search Results of word ‘%s’" 519 555 msgstr "‘%s’ の検索結果" 520 556 521 #: include/custom_functions.php:6 33522 #: include/custom_functions.php:6 35557 #: include/custom_functions.php:648 558 #: include/custom_functions.php:650 523 559 #, php-format 524 560 msgid "Article of %s" 525 561 msgstr "%sの記事" 526 562 527 #: include/custom_functions.php:6 57563 #: include/custom_functions.php:672 528 564 #, php-format 529 565 msgid "From %1$s on site %2$s" 530 566 msgstr "サイト %2$s の %1$s より" 531 567 532 #: include/custom_functions.php:6 78568 #: include/custom_functions.php:693 533 569 msgid "No Trackback/Pingback" 534 570 msgstr "トラックバック・ピンバックはありません" 535 571 536 #: include/custom_functions.php:6 79572 #: include/custom_functions.php:694 537 573 msgid "One Trackback/Pingback" 538 574 msgstr "トラックバック・ピンバック 1 件" 539 575 540 #: include/custom_functions.php:6 80576 #: include/custom_functions.php:695 541 577 msgid "% TrackBack/Pingback" 542 578 msgstr "トラックバック・ピンバック % 件" … … 584 620 msgstr "WordPressモードへ切替" 585 621 622 #: include/xpress_common_functions.php:390 623 #, php-format 624 msgid "Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s." 625 msgstr "ブロックファイル %1$s は古いバージョン %2$s の為、<br /> 新しいバージョン %4$s のブロックファイル %3$s を使用します。" 626 627 #: include/xpress_upgrade.php:13 628 msgid "XPressME Upgrade" 629 msgstr "XPressME アップグレード" 630 631 #: include/xpress_upgrade.php:28 632 #, php-format 633 msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>." 634 msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。" 635 636 #: include/xpress_upgrade.php:32 637 msgid "There is a new version of XPressME Integration Kit available for upgrade" 638 msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です" 639 640 #: include/xpress_upgrade.php:35 641 #, php-format 642 msgid "You can upgrade to version %s download the package and install it manually:" 643 msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 644 645 #: include/xpress_upgrade.php:38 646 #: include/xpress_upgrade.php:61 647 #, php-format 648 msgid "Download %s" 649 msgstr "%s をダウンロード" 650 651 #: include/xpress_upgrade.php:43 652 #, php-format 653 msgid "You can download the differential file from version %s to %s and upgrade it manually:" 654 msgstr "バージョン%sから%sへの差分ファイルをダウンロードし、手動でアップグレードすることができます:" 655 656 #: include/xpress_upgrade.php:46 657 #, php-format 658 msgid "Download differential file for %s" 659 msgstr "%sの差分ファイルをダウンロード" 660 661 #: include/xpress_upgrade.php:50 662 msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade" 663 msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。" 664 665 #: include/xpress_upgrade.php:58 666 #, php-format 667 msgid "You can use the development version %s download the package and install it manually:" 668 msgstr "開発バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 669 670 #: include/xpress_upgrade.php:67 671 #, php-format 672 msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after." 673 msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。 申し訳ありませんが、しばらく後で確認してください。" 674 675 #: include/xpress_upgrade.php:212 676 #, php-format 677 msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>." 678 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。" 679 680 #: include/xpress_upgrade.php:214 681 #, php-format 682 msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator." 683 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。" 684 685 #~ msgid "Title" 686 #~ msgstr "タイトル" 687 #~ msgid "URL" 688 #~ msgstr "URL" 586 689 #~ msgid "more" 587 690 #~ msgstr "続きを読む" -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r413 r451 22 22 require_once dirname( __FILE__ ).'/include/functions_for_wp_old.php' ; 23 23 24 if (!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 } 28 function 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 39 function 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 24 50 function my_plugin_menu() 25 51 { … … 190 216 echo '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ; 191 217 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)'; 192 220 echo $xpress_config->yes_no_radio_option('is_use_xoops_upload_path', 193 __('Media Upload Base Path','xpressme'),221 $upload_title, 194 222 __('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); 200 228 echo $xpress_config->d3forum_option($do_message); 201 229 echo "</table>\n"; … … 253 281 __('NO','xpressme') 254 282 ); 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 ); 255 288 echo "</table>\n"; 256 289 … … 264 297 } 265 298 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 299 include_once dirname( __FILE__ ).'/include/xpress_upgrade.php' ; 434 300 add_action( 'admin_notices', 'xpress_update_check', 3 ); 435 301 436 302 include_once dirname( __FILE__ ).'/include/dashboard_feed.php' ; 437 303 304 include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 305 438 306 ?> -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r406 r451 36 36 var $is_dashboard_forum_disp; 37 37 var $theme_select; 38 var $is_block_error_display; 38 39 //constructor 39 40 function XPressME_Class() … … 86 87 $this->is_dashboard_forum_disp = true; 87 88 $this->theme_select = 'use_wordpress_select'; 89 $this->is_block_error_display = true; 88 90 } 89 91 … … 143 145 'is_dashboard_blog_disp' => $this->is_dashboard_blog_disp, 144 146 '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 146 149 ); 147 150 if ($mode == 'add_new') { -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_widget_class.php
r406 r451 16 16 function XPress_Menu_Widget(){ 17 17 $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); 19 19 $this->WP_Widget('XPress_Menu', __('XPressME MENU'), $widget_ops, $control_ops); 20 20 } … … 26 26 function widget($args, $instance){ 27 27 global $xpress_config,$xoops_config; 28 global $current_user; 28 29 29 30 extract($args); … … 38 39 39 40 # 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 } 40 49 echo '<ul>'; 41 50 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 } 45 101 } 102 46 103 echo '</ul>'; 47 104 # After the widget … … 58 115 59 116 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])); 62 125 } 63 126 … … 71 134 function form($instance){ 72 135 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 73 154 //Defaults 74 155 $instance = wp_parse_args( (array) $instance, 75 156 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, 97 208 ) ); 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>'; 100 242 101 243 // Output the options 102 244 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 "; 105 255 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>'; 108 297 } 298 echo '</table>'; 109 299 } 110 300
Note: See TracChangeset
for help on using the changeset viewer.