- Timestamp:
- Apr 4, 2009, 6:47:22 PM (16 years ago)
- Location:
- trunk/wp-content/plugins/xpressme
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/custom_functions.php
r154 r155 1 1 <?php 2 function xpress_selected_author($show=true ) { 3 $output = ''; 4 $author_cookie = get_xpress_dir_name() . "_select_author" ; 5 if (!empty($_COOKIE[$author_cookie])){ 6 $uid = intval($_COOKIE[$author_cookie]); 7 $user_info = get_userdata($uid); 8 $output = $user_info->display_name; 9 } 10 if (empty($show)) 11 return $output; 12 else 13 echo $output; 14 15 } 2 16 3 17 function xpress_list_pings($trackback, $args, $depth) { … … 199 213 } 200 214 215 function xpress_is_multi_user(){ 216 global $xpress_config; 217 return $xpress_config->is_multi_user; 218 } 219 220 201 221 function xpress_substr($str, $start, $length, $trimmarker = '...') 202 222 { … … 352 372 function xpress_conditional_title($display = true) 353 373 { 374 $selected_author = xpress_selected_author(false); 375 354 376 $output = __('Main', 'xpressme'); 355 377 if (is_category()) … … 363 385 if (is_year()) 364 386 $output = sprintf(__('Archive for %s|Yearly archive page', 'xpressme'), get_the_time(__('Y', 'xpressme'))); 365 if (is_author()) 366 $output = sprintf(__('Archive for the ‘%s’ Author', 'xpressme'), get_author_name( get_query_var('author'))); 387 if (is_author()){ 388 if (empty($selected_author)) 389 $output = sprintf(__('Archive for the ‘%s’ Author', 'xpressme'), get_author_name( get_query_var('author'))); 390 } 367 391 if (is_search()) 368 392 $output = sprintf(__('Search Results of word ‘%s’', 'xpressme'), get_search_query()); 393 394 if (!empty($selected_author)) 395 $output = sprintf(__('Article of %s', 'xpressme'), $selected_author) . ' - ' . $output; 369 396 370 397 if ($display) -
trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php
r147 r155 235 235 } 236 236 237 function xpress_set_author_cookie() 238 { 239 $author_cookie = get_xpress_dir_name() . "_select_author" ; 240 if(xpress_is_multi_user()){ 241 if (empty($_GET)){ 242 // $GLOBALS["wp_xoops_author"] = null; 243 setcookie($author_cookie, 0); 244 $_COOKIE[$author_cookie] = 0; 245 246 } else { 247 $auth = intval( @$_GET["author"] ); 248 if ($auth > 0){ 249 setcookie($author_cookie, $auth); 250 $_COOKIE[$author_cookie] = $auth; 251 } 252 } 253 }else{ 254 // $GLOBALS["wp_xoops_author"] = null; 255 setcookie($author_cookie, 0); 256 $_COOKIE[$author_cookie] = 0; 257 } 258 } 259 260 function xpress_query_filter(&$query) 261 { 262 $author_cookie = get_xpress_dir_name() . "_select_author" ; 263 264 if (strpos($query,'SELECT') !==0) return $query; 265 266 $select_pattern = "SELECT(.*)post_author(.*)FROM"; 267 if (preg_match ( "/".$select_pattern."/i", $query, $select_match )) 268 return $query; 269 270 $query = preg_replace('/\s\s+/', ' ', $query); 271 if (!empty($_COOKIE[$author_cookie])){ 272 $pattern = "WHERE(.*)post_type(.*)=(.*)'post'"; 273 if ( preg_match ( "/".$pattern."/i", $query, $match ) ){ 274 $where_str = "$match[0]"; 275 $where_arry = split(' ',$where_str); 276 $post_prefix = ''; 277 foreach ($where_arry as $p){ 278 if ( preg_match ( "/post_type/", $p, $match3 ) ){ 279 $post_prefix = preg_replace("/post_type/", "", $p); 280 break; 281 } 282 } 283 preg_match ( "/post_type(.*)/", $where_str, $p_match ); 284 $patern = $p_match[0]; 285 $replace = $patern . " AND {$post_prefix}post_author = " . intval($_COOKIE[$author_cookie]) . " "; 286 $query = preg_replace("/$patern/", $replace, $query); 287 } 288 } 289 // xpress_show_sql_quary($query); 290 return $query; 291 } 237 292 ?> -
trunk/wp-content/plugins/xpressme/language/xpressme-ja.po
r150 r155 3 3 "Project-Id-Version: XPressME Plugin\n" 4 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: 2009-04-0 2 14:04+0900\n"5 "PO-Revision-Date: 2009-04-04 18:30+0900\n" 6 6 "Last-Translator: toemon <toychee@toemon.com>\n" 7 7 "Language-Team: \n" … … 15 15 "X-Poedit-SearchPath-0: .\n" 16 16 17 #: xpressme_class.php:4 217 #: xpressme_class.php:43 18 18 msgid "XPressME Settings" 19 19 msgstr "XPressME設定" 20 20 21 #: xpressme_class.php: 5922 #: xpressme_class.php: 18621 #: xpressme_class.php:60 22 #: xpressme_class.php:206 23 23 msgid "Older Post" 24 24 msgstr "前の投稿へ" 25 25 26 #: xpressme_class.php:6 027 #: xpressme_class.php: 18826 #: xpressme_class.php:61 27 #: xpressme_class.php:208 28 28 msgid "Newer Post" 29 29 msgstr "次の投稿へ" 30 30 31 #: xpressme_class.php:6 232 #: xpressme_class.php: 19131 #: xpressme_class.php:63 32 #: xpressme_class.php:211 33 33 msgid "Older Entries" 34 34 msgstr "前ページへ" 35 35 36 #: xpressme_class.php:6 337 #: xpressme_class.php: 19336 #: xpressme_class.php:64 37 #: xpressme_class.php:213 38 38 msgid "Newer Entries" 39 39 msgstr "次ページへ" 40 40 41 #: xpressme_class.php:7 741 #: xpressme_class.php:78 42 42 msgid "more" 43 43 msgstr "続きを読む" 44 44 45 #: xpressme_class.php:244 46 #: xpressme_class.php:260 47 #: xpressme_class.php:628 48 #: xpressme_class.php:633 49 #: xpressme_class.php:643 45 #: xpressme_class.php:264 46 #: xpressme_class.php:280 50 47 #: xpressme_class.php:648 48 #: xpressme_class.php:653 49 #: xpressme_class.php:659 50 #: xpressme_class.php:670 51 #: xpressme_class.php:675 51 52 msgid "YES" 52 53 msgstr "はい" 53 54 54 #: xpressme_class.php:245 55 #: xpressme_class.php:261 56 #: xpressme_class.php:629 57 #: xpressme_class.php:634 58 #: xpressme_class.php:644 55 #: xpressme_class.php:265 56 #: xpressme_class.php:281 59 57 #: xpressme_class.php:649 58 #: xpressme_class.php:654 59 #: xpressme_class.php:660 60 #: xpressme_class.php:671 61 #: xpressme_class.php:676 60 62 msgid "NO" 61 63 msgstr "いいえ" 62 64 63 #: xpressme_class.php:3 0365 #: xpressme_class.php:323 64 66 msgid "Single Post Navi Setting" 65 67 msgstr "シングルポストナビの設定" 66 68 67 #: xpressme_class.php:3 0868 #: xpressme_class.php:3 5369 #: xpressme_class.php:328 70 #: xpressme_class.php:373 69 71 msgid "Adjustment of Navi link display position" 70 72 msgstr "リンクの表示位置設定" 71 73 72 #: xpressme_class.php:3 1174 #: xpressme_class.php:331 73 75 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 74 76 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示" 75 77 76 #: xpressme_class.php:3 1278 #: xpressme_class.php:332 77 79 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 78 80 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 79 81 80 #: xpressme_class.php:3 1882 #: xpressme_class.php:338 81 83 msgid "Select Display name of PostNavi Link" 82 84 msgstr "表示するリンクテキストを選択" 83 85 84 #: xpressme_class.php:3 2186 #: xpressme_class.php:341 85 87 msgid "Title of post" 86 88 msgstr "投稿記事のタイトルを表示" 87 89 88 #: xpressme_class.php:3 2290 #: xpressme_class.php:342 89 91 msgid "Title of Navi" 90 92 msgstr "ナビタイトルを表示" 91 93 92 #: xpressme_class.php:3 2894 #: xpressme_class.php:348 93 95 msgid "Display Navi Title of Old Post Link" 94 96 msgstr "古い記事へのナビタイトルを設定" 95 97 96 #: xpressme_class.php:3 3598 #: xpressme_class.php:355 97 99 msgid "Display Navi Title of Newer Post Link" 98 100 msgstr "より新しい記事へのナビタイトルを設定" 99 101 100 #: xpressme_class.php:3 48102 #: xpressme_class.php:368 101 103 msgid "Posts List Page Navi Setting" 102 104 msgstr "ポストリストページナビの設定" 103 105 104 #: xpressme_class.php:3 56106 #: xpressme_class.php:376 105 107 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right" 106 108 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示" 107 109 108 #: xpressme_class.php:3 57110 #: xpressme_class.php:377 109 111 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right" 110 112 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示" 111 113 112 #: xpressme_class.php:3 63114 #: xpressme_class.php:383 113 115 msgid "Display Navi Title of Old Page Link" 114 116 msgstr "古いページへのナビタイトルを設定" 115 117 116 #: xpressme_class.php:3 70118 #: xpressme_class.php:390 117 119 msgid "Display Navi Title of Newer Page Link" 118 120 msgstr "より新しいページへのナビタイトルを設定" 119 121 120 #: xpressme_class.php: 385122 #: xpressme_class.php:405 121 123 msgid "Role Setting at Login" 122 124 msgstr "ログイン時の権限設定" 123 125 124 #: xpressme_class.php: 388126 #: xpressme_class.php:408 125 127 msgid "XOOPS Groupe" 126 128 msgstr "XOOPSグループ名" 127 129 128 #: xpressme_class.php: 388130 #: xpressme_class.php:408 129 131 msgid "WordPress Role" 130 132 msgstr "WordPressでの権限" 131 133 132 #: xpressme_class.php: 388134 #: xpressme_class.php:408 133 135 msgid "Role is set at each login" 134 136 msgstr "ログイン時、常に権限を更新する" 135 137 136 #: xpressme_class.php:4 14137 #: xpressme_class.php:4 18138 #: xpressme_class.php:4 21138 #: xpressme_class.php:434 139 #: xpressme_class.php:438 140 #: xpressme_class.php:441 139 141 msgid "Default Role of WordPress" 140 142 msgstr "WordPressのデフォルト権限" 141 143 142 #: xpressme_class.php:4 15143 #: xpressme_class.php:4 19144 #: xpressme_class.php:4 22144 #: xpressme_class.php:435 145 #: xpressme_class.php:439 146 #: xpressme_class.php:442 145 147 msgid "Group User Doesn't Register" 146 148 msgstr "ユーザ登録しない" 147 149 148 #: xpressme_class.php:4 51150 #: xpressme_class.php:471 149 151 msgid "Do Not Comment Integration." 150 152 msgstr "コメント統合しません。" 151 153 152 #: xpressme_class.php: 485154 #: xpressme_class.php:505 153 155 msgid "Comment integration with D3Forum" 154 156 msgstr "D3Forumとのコメント統合" 155 157 156 #: xpressme_class.php: 487158 #: xpressme_class.php:507 157 159 msgid "Select the forum of D3Forum that does the comment integration from the following lists." 158 160 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。" 159 161 160 #: xpressme_class.php: 491162 #: xpressme_class.php:511 161 163 msgid "Select the Type of display of D3Forum comment." 162 164 msgstr "D3Forumの表示タイプを選択" 163 165 164 #: xpressme_class.php: 493165 #: xpressme_class.php: 496166 #: xpressme_class.php:513 167 #: xpressme_class.php:516 166 168 msgid "Flat" 167 169 msgstr "フラット" 168 170 169 #: xpressme_class.php: 494170 #: xpressme_class.php: 497171 #: xpressme_class.php:514 172 #: xpressme_class.php:517 171 173 msgid "Threaded" 172 174 msgstr "スレッド" 173 175 174 #: xpressme_class.php:5 00176 #: xpressme_class.php:520 175 177 msgid "Select the order of display of D3Forum comment." 176 178 msgstr "D3Forumコメントの表示順を選択" 177 179 178 #: xpressme_class.php:5 02179 #: xpressme_class.php:5 05180 #: xpressme_class.php:522 181 #: xpressme_class.php:525 180 182 msgid "DESC" 181 183 msgstr "降順" 182 184 183 #: xpressme_class.php:5 03184 #: xpressme_class.php:5 06185 #: xpressme_class.php:523 186 #: xpressme_class.php:526 185 187 msgid "ASC" 186 188 msgstr "昇順" 187 189 188 #: xpressme_class.php:5 09190 #: xpressme_class.php:529 189 191 msgid "Number of displays of D3Forum comments." 190 192 msgstr "D3Forumのコメント表示数" 191 193 192 #: xpressme_class.php:5 13194 #: xpressme_class.php:533 193 195 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. " 194 196 msgstr "WordPressコメントとD3Forumポスト間の一括転送(エクスポート・インポート)" 195 197 196 #: xpressme_class.php:5 14198 #: xpressme_class.php:534 197 199 msgid "Export to D3Forum" 198 200 msgstr "D3Forumへ一括エクスポート" 199 201 200 #: xpressme_class.php:5 15202 #: xpressme_class.php:535 201 203 msgid "Import from D3Forum" 202 204 msgstr "D3Forumから一括インポート" 203 205 204 #: xpressme_class.php:5 27206 #: xpressme_class.php:547 205 207 msgid "Contents Excerpt Setting" 206 208 msgstr "記事抜粋の設定" 207 209 208 #: xpressme_class.php:5 32210 #: xpressme_class.php:552 209 211 msgid "Is the excerpt display done with the archive of contents?" 210 212 msgstr "記事のアーカイブで抜粋表示を行いますか?" 211 213 212 #: xpressme_class.php:5 39214 #: xpressme_class.php:559 213 215 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. " 214 216 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。" 215 217 216 #: xpressme_class.php:5 46218 #: xpressme_class.php:566 217 219 msgid "Excerpt length of word for ASCII contents" 218 220 msgstr "ASCIIコンテンツの抜粋単語数" 219 221 220 #: xpressme_class.php:5 53222 #: xpressme_class.php:573 221 223 msgid "Excerpt length of character for multibyte contents" 222 224 msgstr "マルチバイトコンテンツの抜粋文字数" 223 225 224 #: xpressme_class.php:5 60226 #: xpressme_class.php:580 225 227 msgid "More Link Text (Is not displayed for the blank.)" 226 228 msgstr "Moreリンクテキスト(ブランクの場合リンクを表示しません。)" 227 229 228 #: xpressme_class.php:5 72230 #: xpressme_class.php:592 229 231 msgid "Display Mode Setting" 230 232 msgstr "表示モード設定" 231 233 232 #: xpressme_class.php:5 75234 #: xpressme_class.php:595 233 235 msgid "Select the XPressME Display Mode." 234 236 msgstr "XPressMEの表示モードの選択" 235 237 236 #: xpressme_class.php: 580238 #: xpressme_class.php:600 237 239 msgid "Xoops Mode" 238 240 msgstr "XOOPSモード" 239 241 240 #: xpressme_class.php: 584242 #: xpressme_class.php:604 241 243 msgid "WordPress Mode" 242 244 msgstr "WordPressモード" 243 245 244 #: xpressme_class.php: 588246 #: xpressme_class.php:608 245 247 msgid "User select" 246 248 msgstr "ユーザによる選択" 247 249 248 #: xpressme_class.php:6 17250 #: xpressme_class.php:637 249 251 msgid "XPressME Configuration Page" 250 252 msgstr "XPressMEの設定ページ" 251 253 252 #: xpressme_class.php:6 22254 #: xpressme_class.php:642 253 255 msgid "Media Upload Base Path" 254 256 msgstr "メディアアップロードのベースパス設定" 255 257 256 #: xpressme_class.php:6 23258 #: xpressme_class.php:643 257 259 msgid "Use XOOPS UPLOAD PATH" 258 260 msgstr "XOOPSのアップロードパスを使用する。" 259 261 260 #: xpressme_class.php:6 24262 #: xpressme_class.php:644 261 263 msgid "USE WordPress BASE_PATH" 262 264 msgstr "WordPressのベースパスを使用する。" 263 265 264 #: xpressme_class.php:6 27266 #: xpressme_class.php:647 265 267 msgid "Thema Sidebar Display" 266 268 msgstr "テーマ表示時にサイドバー表示する。" 267 269 268 #: xpressme_class.php:6 32270 #: xpressme_class.php:652 269 271 msgid "The change tracking of the post is preserved" 270 272 msgstr "投稿の変更履歴を有効にする。" 271 273 272 #: xpressme_class.php:642 274 #: xpressme_class.php:658 275 msgid "Select Multi user mode" 276 msgstr "マルチユーザーモードを選択" 277 278 #: xpressme_class.php:669 273 279 msgid "Is the posts author views counted?" 274 280 msgstr "投稿者の閲覧をカウントしますか?" 275 281 276 #: xpressme_class.php:6 47282 #: xpressme_class.php:674 277 283 msgid "Is SQL debugging window displayed?" 278 284 msgstr "SQLデバッグウィンドを表示しますか?" 279 285 280 #: xpressme_class.php:6 59286 #: xpressme_class.php:686 281 287 msgid "Update Config" 282 288 msgstr "更新" 283 289 284 #: xpressme_class.php:6 60290 #: xpressme_class.php:687 285 291 msgid "Preset Config" 286 292 msgstr "プリセット" 287 293 288 #: include/custom_functions.php:2 38294 #: include/custom_functions.php:258 289 295 #, php-format 290 296 msgid "views :%d" 291 297 msgstr "閲覧数 :%d" 292 298 293 #: include/custom_functions.php:3 54299 #: include/custom_functions.php:376 294 300 msgid "Main" 295 301 msgstr "メイン" 296 302 297 #: include/custom_functions.php:3 56303 #: include/custom_functions.php:378 298 304 #, php-format 299 305 msgid "Archive for the ‘%s’ Category" 300 306 msgstr "カテゴリー ‘%s’ のアーカイブ" 301 307 302 #: include/custom_functions.php:3 58308 #: include/custom_functions.php:380 303 309 #, php-format 304 310 msgid "Posts Tagged ‘%s’" 305 311 msgstr "‘%s’ タグのついている投稿" 306 312 307 #: include/custom_functions.php:3 60313 #: include/custom_functions.php:382 308 314 #, php-format 309 315 msgid "Archive for %s|Daily archive page" 310 316 msgstr "%sの日別アーカイブ" 311 317 312 #: include/custom_functions.php:3 60318 #: include/custom_functions.php:382 313 319 msgid "F jS, Y" 314 320 msgstr "Y年n月j日" 315 321 316 #: include/custom_functions.php:3 62322 #: include/custom_functions.php:384 317 323 #, php-format 318 324 msgid "Archive for %s|Monthly archive page" 319 325 msgstr "%sの月別アーカイブ" 320 326 321 #: include/custom_functions.php:3 62327 #: include/custom_functions.php:384 322 328 msgid "F, Y" 323 329 msgstr "Y年n月" 324 330 325 #: include/custom_functions.php:3 64331 #: include/custom_functions.php:386 326 332 #, php-format 327 333 msgid "Archive for %s|Yearly archive page" 328 334 msgstr "%sの年別アーカイブ " 329 335 330 #: include/custom_functions.php:3 64336 #: include/custom_functions.php:386 331 337 msgid "Y" 332 338 msgstr "Y年" 333 339 334 #: include/custom_functions.php:3 66340 #: include/custom_functions.php:389 335 341 #, php-format 336 342 msgid "Archive for the ‘%s’ Author" 337 343 msgstr "投稿者 ‘%s’ のアーカイブ" 338 344 339 #: include/custom_functions.php:3 68345 #: include/custom_functions.php:392 340 346 #, php-format 341 347 msgid "Search Results of word ‘%s’" 342 348 msgstr "‘%s’ の検索結果" 343 349 344 #: include/custom_functions.php:382 350 #: include/custom_functions.php:395 351 #, php-format 352 msgid "Article of %s" 353 msgstr "%sの記事" 354 355 #: include/custom_functions.php:410 345 356 #, php-format 346 357 msgid "From %1$s on site %2$s" 347 358 msgstr "サイト %2$s の %1$s より" 348 359 349 #: include/custom_functions.php: 398360 #: include/custom_functions.php:433 350 361 #, fuzzy 351 362 msgid "% TrackBack/Pingback" 352 363 msgstr "トラックバック・ピンバック % 件" 353 364 354 #: include/custom_functions.php:4 00365 #: include/custom_functions.php:435 355 366 msgid "No Trackback/Pingback" 356 367 msgstr "トラックバック・ピンバックはありません" 357 368 358 #: include/custom_functions.php:4 02369 #: include/custom_functions.php:437 359 370 msgid "One Trackback/Pingback" 360 371 msgstr "トラックバック・ピンバック 1 件" -
trunk/wp-content/plugins/xpressme/xpressme.php
r147 r155 69 69 } 70 70 71 72 73 71 74 //The trackback and the pingback are excluded from the count of the comment. 72 75 add_filter('get_comments_number', 'xpress_comment_count', 0); 76 77 // Query filter for MultiUser 78 add_filter('query','xpress_query_filter'); 79 add_action("init", "xpress_set_author_cookie"); 73 80 74 81 // SQL debug windows -
trunk/wp-content/plugins/xpressme/xpressme_class.php
r152 r155 28 28 var $more_link_text; 29 29 var $viewer_type; 30 var $is_multi_user; 30 31 //constructor 31 32 function XPressME_Class() … … 77 78 $this->more_link_text = __('more', 'xpressme'); 78 79 $this->viewer_type = 'xoops'; 80 $this->is_multi_user = false; 79 81 80 82 } … … 124 126 'excerpt_length_character' => $this->excerpt_length_character, 125 127 'more_link_text' => $this->more_link_text, 126 'viewer_type' => $this->viewer_type 128 'viewer_type' => $this->viewer_type, 129 'is_multi_user' => $this->is_multi_user 127 130 ); 128 131 if ($mode == 'add_new') { … … 235 238 $this->more_link_text = stripslashes(trim($_POST['ch_more_link_text'])); 236 239 $this->viewer_type = stripslashes(trim($_POST['ch_viewer_type'])); 237 240 $this->is_multi_user = stripslashes(trim($_POST['ch_is_multi_user'])); 238 241 global $xoops_db; 239 242 $table = get_wp_prefix() . 'group_role'; … … 652 655 ); 653 656 657 echo $this->yes_no_radio_option('is_multi_user', 658 __('Select Multi user mode','xpressme'), 659 __('YES','xpressme'), 660 __('NO','xpressme') 661 ); 662 663 654 664 echo $this->single_post_navi_option(); 655 665 echo $this->posts_page_navi_option();
Note: See TracChangeset
for help on using the changeset viewer.