- Timestamp:
- Mar 20, 2009, 12:47:52 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/blocks/archives_block.php
r121 r125 20 20 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 21 21 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[1] ); 22 $type = empty( $options[2] ) ? false : true;23 $limit = empty( $options[3] ) ? '10': $options[3] ;22 $type = empty( $options[2] ) ? 'monthly' : $options[2] ; 23 $limit = !is_numeric( $options[3] ) ? 0 : $options[3] ; 24 24 $show_post_count = empty( $options[4] ) ? false : true ; 25 25 $drop_down = empty( $options[5] ) ? false : true ; … … 33 33 $a_week = _MB_XPRESS_ARC_WEEK ; 34 34 35 $form .= "<br />" . yes_no_radio_option('options[2]', _MB_XPRESS_ARC_TYPE , $type,$a_month,$a_week); 36 $form .= "<br />" . _MB_XPRESS_COUNT . " <input type='text' name='options[3]' value='" . $limit . "' />"; 35 $form .= _MB_XPRESS_ARC_TYPE .": "; 36 $form .= "<select name='options[2]'>"; 37 if ($type =='yearly') 38 $form .= "<option value='yearly' selected='selected'>". _MB_XPRESS_ARC_YEAR; 39 else 40 $form .= "<option value='yearly'>". _MB_XPRESS_ARC_YEAR; 41 42 if ($type =='monthly') 43 $form .= "<option value='monthly' selected='selected'>". _MB_XPRESS_ARC_MONTH; 44 else 45 $form .= "<option value='monthly'>". _MB_XPRESS_ARC_MONTH; 46 47 if ($type =='weekly') 48 $form .= "<option value='weekly' selected='selected'>". _MB_XPRESS_ARC_WEEK; 49 else 50 $form .= "<option value='weekly'>". _MB_XPRESS_ARC_WEEK; 51 52 if ($type =='daily') 53 $form .= "<option value='daily' selected='selected'>". _MB_XPRESS_ARC_DAY; 54 else 55 $form .= "<option value='daily'>". _MB_XPRESS_ARC_DAY; 56 57 if ($type =='postbypost') 58 $form .= "<option value='postbypost' selected='selected'>". _MB_XPRESS_ARC_POST; 59 else 60 $form .= "<option value='postbypost'>". _MB_XPRESS_ARC_POST; 61 62 $form .= "</select><br/>"; 63 64 $form .= "<br />" . _MB_XPRESS_COUNT_ZERO_ALL . " <input type='text' name='options[3]' value='" . $limit . "' />"; 37 65 $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_SHOW_NUM_OF_POST , $show_post_count); 38 66 $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XPRESS_SHOW_DROP_DOWN , $drop_down); -
trunk/language/ja_utf8/blocks.php
r122 r125 4 4 // general 5 5 define("_MB_XPRESS_COUNT",'表示数'); 6 define("_MB_XPRESS_COUNT_ZERO_ALL",'表示数(0の場合全てを表示)'); 6 7 define("_MB_XPRESS_LENGTH","長さ"); 7 8 define("_MB_XPRESS_ALL","すべて"); … … 46 47 47 48 // archives 48 define("_MB_XPRESS_ARC_MONTH","月間アーカイブ");49 define("_MB_XPRESS_ARC_WEEK","週間アーカイブ");50 49 define("_MB_XPRESS_ARC_TYPE","アーカイブタイプ"); 50 define("_MB_XPRESS_ARC_YEAR","年別アーカイブ"); 51 define("_MB_XPRESS_ARC_MONTH","月別アーカイブ"); 52 define("_MB_XPRESS_ARC_WEEK","週別アーカイブ"); 53 define("_MB_XPRESS_ARC_DAY","日別アーカイブ"); 54 define("_MB_XPRESS_ARC_POST","個別記事アーカイブ"); 51 55 52 56 // authors -
trunk/templates/source/archives_block.html
r121 r125 2 2 The template tag of the following list can be used. 3 3 <{$block.err_message}> // When the block cannot be displayed, this outputs the reason. Please do not delete it. 4 <{$block.data_count}> // The number of archives is displayed. 5 <{$block.config.is_archive_doropdown}> // When this returns the true value. The user has selected the archive to be displayed by the drop down list in the setting of the block. 6 <{$block.archive_dropdown}> // Displays a dropdown list of links to date-based archives. 7 <{$block.contents}> // Data array of archives. 8 // Examples of <{$block.contents}> 9 <{foreach from=$block.contents item=content}> // Loop 10 <{$content.archive}> // Displays a list of links to date-based archives. 11 <{/foreach}> // End of Loop 4 <{$block.archive}> // Displays Archives from wp_get_archives() function 12 5 ************************* End of usage ************************ *}> 13 6 <{* Start Template *}> … … 16 9 <{$block.err_message}> 17 10 <div class="xpress_archive_block"> 18 <{if $block.config.is_archive_doropdown}> 19 <{$block.archive_dropdown}> 20 <{else}> 21 <ul> 22 <{foreach from=$block.contents item=content}> 23 <li> 24 <{$content.archive}> 25 </li> 26 <{/foreach}> 27 </ul> 28 <{/if}> 11 <{$block.archive}> 29 12 </div> 30 13 </div> -
trunk/wp-content/themes/xpress_default/blocks/archives_block_theme.php
r120 r125 4 4 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 5 5 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_archives_block.html' : trim( $options[1] ); 6 $type = empty( $options[2] ) ? false : true;7 $limit = empty( $options[3] ) ? '10': $options[3] ;6 $type = empty( $options[2] ) ? 'monthly' : $options[2] ; 7 $limit = !is_numeric( $options[3] ) ? 0 : $options[3] ; 8 8 $show_post_count = empty( $options[4] ) ? false : true ; 9 9 $drop_down = empty( $options[5] ) ? false : true ; 10 10 11 if ($type) { 12 $type_name = 'monthly'; 11 switch($type){ 12 case 'yearly': 13 $select_str = __('Select Yearly', 'xpress'); 14 break; 15 case 'monthly': 16 $select_str = __('Select Monthly', 'xpress'); 17 break; 18 case 'weekly': 19 $select_str = __('Select Weekly', 'xpress'); 20 break; 21 case 'daily': 22 $select_str = __('Select Daily', 'xpress'); 23 break; 24 case 'postbypost': 25 $select_str = __('Select Post', 'xpress'); 26 break; 27 default: 28 $select_str = __('Select Monthly', 'xpress'); 29 } 30 31 if ($drop_down) $format = 'option'; else $format = 'html'; 32 if ($limit == 0 ) $limit_str = ''; else $limit_str = $limit; 33 34 $param = array( 35 'type' => $type, 36 'limit' => $limit_str, 37 'format' => $format, 38 'before' => '', 39 'after' => '', 40 'show_post_count' => $show_post_count 41 ); 42 43 ob_start(); 44 wp_get_archives($param); 45 $get_archives_output = ob_get_contents(); 46 ob_end_clean(); 47 48 49 if($drop_down){ 50 51 52 $output = '<form id="archiveform" action="">'; 53 $output .= '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">'; 54 $output .= "<option value=''>" . $select_str . "</option>\n"; 55 $output .= $get_archives_output; 56 $output .= '</select>'; 57 $output .= '</form>'; 58 59 $output = '<select name="archive-dropdown"' . "onChange='document.location.href=this.options[this.selectedIndex].value;'>\n"; 60 $output .= '<option value="">'.attribute_escape($select_str) . "</option>\n"; 61 $output .= $get_archives_output; 62 $output .= "</select>\n"; 63 13 64 } else { 14 $type_name = 'weekly'; 15 } 16 17 $drop_down_list = '<form id="archiveform" action="">'; 18 $drop_down_list .= '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">'; 19 $drop_down_list .= "<option value=''>"; 20 if ($type) { 21 $drop_down_list .= __('Select Monthly', 'xpress'); 22 } else { 23 $drop_down_list .= __('Select Weekly', 'xpress'); 65 $output = "<ul>\n"; 66 $output .= $get_archives_output; 67 $output .= "</ul>\n"; 24 68 } 25 $drop_down_list .= '</option>'; 26 ob_start(); 27 get_archives($type_name,$limit,'option','','',$show_post_count); 28 $drop_down_list .= ob_get_contents(); 29 ob_end_clean(); 30 $drop_down_list .= '</select>'; 31 $drop_down_list .= '</form>'; 32 33 ob_start(); 34 get_archives($type_name,$limit,'custom','','|',$show_post_count); 35 $output = ob_get_contents(); 36 ob_end_clean(); 37 $output = preg_replace('/\|$/', '' ,$output); // "|" at the end of line is deleted. 38 $archives = explode('|',$output); 39 $item_no = 0; 40 foreach ($archives as $archive){ 41 $row_data = array( 42 'archive' => $archive 43 ); 44 $block['contents']['item'.$item_no] = $row_data; 45 $item_no++; 46 } 47 $block['data_count'] = $item_no; 48 $block['config']['is_archive_doropdown'] = $drop_down; 49 $block['archive_dropdown'] = $drop_down_list; 69 $block['archive'] = $output; 50 70 return $block ; 51 71 } -
trunk/wp-content/themes/xpress_default/ja.po
r122 r125 18 18 "Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n" 19 19 "POT-Creation-Date: 2008-08-15 21:16+0900\n" 20 "PO-Revision-Date: 2009-03- 19 16:41+0900\n"20 "PO-Revision-Date: 2009-03-20 12:18+0900\n" 21 21 "Last-Translator: toemon <toychee@toemon.com>\n" 22 22 "Language-Team: toemon <info@toemon.com>\n" … … 654 654 msgstr "この投稿を編集 " 655 655 656 #: xpress_default/blocks/archives_block_theme.php:21 656 #: xpress_default/blocks/archives_block_theme.php:13 657 msgid "Select Yearly" 658 msgstr "年を選択" 659 660 #: xpress_default/blocks/archives_block_theme.php:16 661 #: xpress_default/blocks/archives_block_theme.php:28 657 662 msgid "Select Monthly" 658 663 msgstr "月を選択" 659 664 660 #: xpress_default/blocks/archives_block_theme.php: 23665 #: xpress_default/blocks/archives_block_theme.php:19 661 666 msgid "Select Weekly" 662 667 msgstr "週を選択" 668 669 #: xpress_default/blocks/archives_block_theme.php:22 670 msgid "Select Daily" 671 msgstr "日を選択" 672 673 #: xpress_default/blocks/archives_block_theme.php:25 674 msgid "Select Post" 675 msgstr "記事を選択" 663 676 664 677 #: xpress_default/blocks/calender_block_theme.php:71 -
trunk/xoops_version.php
r124 r125 31 31 $modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XPRESS_NAME') ; 32 32 $modversion['description'] = constant( '_MI_XPRESS_DESC'); 33 $modversion['version'] = "0.1 0";33 $modversion['version'] = "0.11"; 34 34 $modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://www.toemon.com) ;"; 35 35 $modversion['author'] = "toemon (http://www.toemon.com)"; … … 40 40 41 41 // status 42 $modversion['codename'] = "r12 4";42 $modversion['codename'] = "r125"; 43 43 44 44 // onInstall, onUpdate, onUninstall … … 165 165 'show_func' => "b_". $mydirname . "_archives_show" , 166 166 'edit_func' => "b_". $mydirname . "_archives_edit" , 167 'options' => $mydirname. '|| 1|10|1|0' ,168 'can_clone' => false ,167 'options' => $mydirname. '||monthly|0|1|0' , 168 'can_clone' => true , 169 169 'func_num' => $b_no, 170 170 );
Note: See TracChangeset
for help on using the changeset viewer.