XPressME Integration Kit

Trac

Changeset 425


Ignore:
Timestamp:
Oct 28, 2009, 11:00:33 AM (14 years ago)
Author:
toemon
Message:

最新の記事内容ブロックに、日付による抽出オプション追加 Fixes #240

Files:
22 edited

Legend:

Unmodified
Added
Removed
  • branches/XPressMU/extras/for_wordpressme2011/ja_EUC/language/japanese/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","ÂоݤΥ«¥Æ¥´¥ê¡¼ÁªÂò"); 
    4141        define("_MB_XP2_TAGS_SELECT","ÂоݤΥ¿¥°ÁªÂò(Ê£¿ô¤¢¤ë¾ì¹ç¤Ï¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÆþÎÏ"); 
     42        define("_MB_XP2_DAY_SELECT","ÆüÉդˤè¤ëÃê½Ð"); 
     43        define("_MB_XP2_NONE","¤Ê¤·"); 
     44        define("_MB_XP2_TODAY","ËÜÆü¤ÎÅê¹Æ"); 
     45        define("_MB_XP2_LASTES","ºÇ¿·¤ÎÅê¹Æ"); 
     46        define("_MB_XP2_DAY_BETWEEN",""); 
     47        define("_MB_XP2_DAYS_AND","¤«¤é"); 
     48        define("_MB_XP2_DAYS_AGO","ÆüÁ°¤Þ¤Ç¤Î´Ö"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/extras/for_wordpressme2011/ja_UTF/language/ja_utf8/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","対象のカテゴリー選択"); 
    4141        define("_MB_XP2_TAGS_SELECT","対象のタグ選択(複数ある場合はカンマ区切りで入力"); 
     42        define("_MB_XP2_DAY_SELECT","日付による抽出"); 
     43        define("_MB_XP2_NONE","なし"); 
     44        define("_MB_XP2_TODAY","本日の投稿"); 
     45        define("_MB_XP2_LASTES","最新の投稿"); 
     46        define("_MB_XP2_DAY_BETWEEN",""); 
     47        define("_MB_XP2_DAYS_AND","から"); 
     48        define("_MB_XP2_DAYS_AGO","日前までの間"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/extras/xpress_i18n/german/xpressme_modules_root/language/german/blocks.php

    r377 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Heute"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Zwischen"); 
     47        define("_MB_XP2_DAYS_AND","und vor"); 
     48        define("_MB_XP2_DAYS_AGO","Tagen"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/extras/xpress_i18n/persian/xpressme_modules_root/language/persian/blocks.php

    r388 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Today"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Between"); 
     47        define("_MB_XP2_DAYS_AND","and"); 
     48        define("_MB_XP2_DAYS_AGO","days ago"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/extras/xpress_i18n/portuguese-br/xpressme_modules_root/language/pt-br_utf8/blocks.php

    r366 r425  
    4040        define("_MB_XP2_CATS_SELECT","Selecionar a(s) categoria(s)"); 
    4141        define("_MB_XP2_TAGS_SELECT","Selecionar a(s) tag(s) (separadas por ,)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Hoje"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Entre"); 
     47        define("_MB_XP2_DAYS_AND","e"); 
     48        define("_MB_XP2_DAYS_AGO","dias atrás"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/extras/xpress_i18n/template/xpressme_modules_root/language/english/blocks.php

    r356 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Today"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Between"); 
     47        define("_MB_XP2_DAYS_AND","and"); 
     48        define("_MB_XP2_DAYS_AGO","days ago"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/xpressme_integration_kit/blocks/recent_posts_content_block.php

    r365 r425  
    1919                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    2020                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 
    21                 $disp_count =  ($options[2])?intval($options[2]):10; 
    22                 $excerpt = empty( $options[3] ) ? false : true ; 
    23                 $excerpt_size =  ($options[4])?intval($options[4]):100; 
    24                 $date_format = empty( $options[5] ) ? '' : $options[5] ; 
    25                 $time_format = empty( $options[6] ) ? '' : $options[6] ; 
    26                 $tag_select = $options[7] ; 
    27             $selected = array_slice($options,8); // get allowed cats 
     21                $day_select = ($options[2])?intval($options[2]):0; 
     22                $day_size = ($options[3])?intval($options[3]):0; 
     23                $disp_count =  ($options[4])?intval($options[4]):10; 
     24                $excerpt = empty( $options[5] ) ? false : true ; 
     25                $excerpt_size =  ($options[6])?intval($options[6]):100; 
     26                $date_format = empty( $options[7] ) ? '' : $options[7] ; 
     27                $time_format = empty( $options[8] ) ? '' : $options[8] ; 
     28                $tag_select = $options[9] ; 
     29            $selected = array_slice($options,10); // get allowed cats 
    2830 
    2931                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     
    3436            $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
    3537                $form .= "<br />"; 
    36                 $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
    37                 $form .= yes_no_radio_option('options[3]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n"; 
    38                 $form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[4]' value='" . $excerpt_size . "' /><br />\n"; 
    39                 $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n"; 
    40                 $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n"; 
     38                $form .= _MB_XP2_DAY_SELECT . ':' . _MB_XP2_DAY_BETWEEN . '<select name="options[2]">'; 
     39                switch ($day_select){ 
     40                case 1: 
     41                        $form .= '<option value="0">' . _MB_XP2_NONE . '</option>'; 
     42                        $form .= '<option value="1" selected>'. _MB_XP2_TODAY . '</option>'; 
     43                        $form .= '<option value="2">' . _MB_XP2_LASTES . '</option>'; 
     44                        break; 
     45                case 2: 
     46                        $form .= '<option value="0">' . _MB_XP2_NONE . '</option>'; 
     47                        $form .= '<option value="1">'. _MB_XP2_TODAY . '</option>'; 
     48                        $form .= '<option value="2" selected>' . _MB_XP2_LASTES . '</option>'; 
     49                        break; 
     50                default : 
     51                        $form .= '<option value="0" selected>' . _MB_XP2_NONE . '</option>'; 
     52                        $form .= '<option value="1">'. _MB_XP2_TODAY . '</option>'; 
     53                        $form .= '<option value="2">' . _MB_XP2_LASTES . '</option>'; 
     54                } 
     55                $form .= '</select>'; 
     56                 
     57                $form .= ' ' . _MB_XP2_DAYS_AND . " <input type='text' size='2' name='options[3]' value='" . $day_size . "' />" . _MB_XP2_DAYS_AGO . "<br />\n"; 
     58 
     59                $form .= _MB_XP2_COUNT .": <input type='text' name='options[4]' value='" . $disp_count . "' /><br />\n"; 
     60                $form .= yes_no_radio_option('options[5]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n"; 
     61                $form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[6]' value='" . $excerpt_size . "' /><br />\n"; 
     62                $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[7]' value='" . $date_format . "' /><br />\n"; 
     63                $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[8]' value='" . $time_format . "' /><br />\n"; 
    4164                 
    4265                include $mydirpath .'/wp-includes/version.php' ; 
    4366                if (wp_version_compare($wp_version, '>=','2.3')){ 
    4467                        $form .= "<br />\n"; 
    45                         $form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[7]' value='" . $tag_select . "' /><br />\n"; 
     68                        $form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[9]' value='" . $tag_select . "' /><br />\n"; 
    4669                } else { 
    47                         $form .= "<input type='hidden' name='options[7]' value='' /><br />\n"; 
     70                        $form .= "<input type='hidden' name='options[9]' value='' /><br />\n"; 
    4871                } 
    4972                 
  • branches/XPressMU/xpressme_integration_kit/language/english/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Today"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Between"); 
     47        define("_MB_XP2_DAYS_AND","and"); 
     48        define("_MB_XP2_DAYS_AGO","days ago"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/xpressme_integration_kit/language/ja_utf8/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","対象のカテゴリー選択"); 
    4141        define("_MB_XP2_TAGS_SELECT","対象のタグ選択(複数ある場合はカンマ区切りで入力"); 
     42        define("_MB_XP2_DAY_SELECT","日付による抽出"); 
     43        define("_MB_XP2_NONE","なし"); 
     44        define("_MB_XP2_TODAY","本日の投稿"); 
     45        define("_MB_XP2_LASTES","最新の投稿"); 
     46        define("_MB_XP2_DAY_BETWEEN",""); 
     47        define("_MB_XP2_DAYS_AND","から"); 
     48        define("_MB_XP2_DAYS_AGO","日前までの間"); 
    4249         
    4350// recent posts list     
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r274 r425  
    66        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    77        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 
    8         $disp_count =  ($options[2])?intval($options[2]):10; 
    9         $excerpt = empty( $options[3] ) ? false : true ; 
    10         $excerpt_size =  ($options[4])?intval($options[4]):100; 
    11         $date_format = empty( $options[5] ) ? '' : $options[5] ; 
    12         $time_format = empty( $options[6] ) ? '' : $options[6] ; 
    13         $tag_select = $options[7] ; 
    14     $selected = array_slice($options,8); // get allowed cats 
     8        $day_select = ($options[2])?intval($options[2]):0; 
     9        $day_size = ($options[3])?intval($options[3]):0; 
     10        $disp_count =  ($options[4])?intval($options[4]):10; 
     11        $excerpt = empty( $options[5] ) ? false : true ; 
     12        $excerpt_size =  ($options[6])?intval($options[6]):100; 
     13        $date_format = empty( $options[7] ) ? '' : $options[7] ; 
     14        $time_format = empty( $options[8] ) ? '' : $options[8] ; 
     15        $tag_select = $options[9] ; 
     16    $selected = array_slice($options,10); // get allowed cats 
    1517 
    1618        $mydirpath = get_xpress_dir_path(); 
     
    2628                $author_where = ''; 
    2729        } 
     30         
     31        $date_today = mktime (0, 0, 0, date("m"), date("d"), date("Y")); 
     32        $between_days = $day_size * 60 * 60 * 24; 
     33         
    2834        global $wpdb,$wp_query; 
    2935        $block = array(); 
     
    3339                if (array_search(0,$selected)===0) { 
    3440                        $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    35  
    3641                } else { 
    3742                        $cat_id = implode(',',$selected); 
    38                         $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     43                        $r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    3944                } 
    4045                while($r->have_posts()){                         
    4146                        $r->the_post(); 
     47                        if ($day_select == 1){ 
     48                                $post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y")); 
     49                                $base_date = $date_today - $between_days; 
     50                                if ($post_date < $base_date) continue; 
     51                        } 
     52                        if ($day_select == 2){ 
     53                                $post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y")); 
     54                                if (empty($lastes_date)) $lastes_date = $post_date; 
     55                                $base_date = $lastes_date - $between_days; 
     56                                if ($post_date < $base_date) continue; 
     57                        } 
     58                         
    4259                        ob_start(); 
    4360                                the_ID(); 
  • branches/XPressMU/xpressme_integration_kit/xoops_version.php

    r424 r425  
    4747 
    4848// status 
    49 $modversion['codename'] = "Bata2(r424)"; 
     49$modversion['codename'] = "Bata2(r425)"; 
    5050 
    5151// onInstall, onUpdate, onUninstall 
     
    144144        'edit_func'     => "b_". $mydirname . "_content_edit" , 
    145145        'template'              => '' , 
    146         'options'               => $mydirname. '||10|0|100||||0' , 
     146        'options'               => $mydirname. '||0|0|10|0|100||||0' , 
    147147        'can_clone'             => true , 
    148148        'func_num'              => $b_no, 
  • trunk/extras/for_wordpressme2011/ja_EUC/language/japanese/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","ÂоݤΥ«¥Æ¥´¥ê¡¼ÁªÂò"); 
    4141        define("_MB_XP2_TAGS_SELECT","ÂоݤΥ¿¥°ÁªÂò(Ê£¿ô¤¢¤ë¾ì¹ç¤Ï¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÆþÎÏ"); 
     42        define("_MB_XP2_DAY_SELECT","ÆüÉդˤè¤ëÃê½Ð"); 
     43        define("_MB_XP2_NONE","¤Ê¤·"); 
     44        define("_MB_XP2_TODAY","ËÜÆü¤ÎÅê¹Æ"); 
     45        define("_MB_XP2_LASTES","ºÇ¿·¤ÎÅê¹Æ"); 
     46        define("_MB_XP2_DAY_BETWEEN",""); 
     47        define("_MB_XP2_DAYS_AND","¤«¤é"); 
     48        define("_MB_XP2_DAYS_AGO","ÆüÁ°¤Þ¤Ç¤Î´Ö"); 
    4249         
    4350// recent posts list     
  • trunk/extras/for_wordpressme2011/ja_UTF/language/ja_utf8/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","対象のカテゴリー選択"); 
    4141        define("_MB_XP2_TAGS_SELECT","対象のタグ選択(複数ある場合はカンマ区切りで入力"); 
     42        define("_MB_XP2_DAY_SELECT","日付による抽出"); 
     43        define("_MB_XP2_NONE","なし"); 
     44        define("_MB_XP2_TODAY","本日の投稿"); 
     45        define("_MB_XP2_LASTES","最新の投稿"); 
     46        define("_MB_XP2_DAY_BETWEEN",""); 
     47        define("_MB_XP2_DAYS_AND","から"); 
     48        define("_MB_XP2_DAYS_AGO","日前までの間"); 
    4249         
    4350// recent posts list     
  • trunk/extras/xpress_i18n/german/xpressme_modules_root/language/german/blocks.php

    r377 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Heute"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Zwischen"); 
     47        define("_MB_XP2_DAYS_AND","und vor"); 
     48        define("_MB_XP2_DAYS_AGO","Tagen"); 
    4249         
    4350// recent posts list     
  • trunk/extras/xpress_i18n/persian/xpressme_modules_root/language/persian/blocks.php

    r388 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Today"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Between"); 
     47        define("_MB_XP2_DAYS_AND","and"); 
     48        define("_MB_XP2_DAYS_AGO","days ago"); 
    4249         
    4350// recent posts list     
  • trunk/extras/xpress_i18n/portuguese-br/xpressme_modules_root/language/pt-br_utf8/blocks.php

    r366 r425  
    4040        define("_MB_XP2_CATS_SELECT","Selecionar a(s) categoria(s)"); 
    4141        define("_MB_XP2_TAGS_SELECT","Selecionar a(s) tag(s) (separadas por ,)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Hoje"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Entre"); 
     47        define("_MB_XP2_DAYS_AND","e"); 
     48        define("_MB_XP2_DAYS_AGO","dias atrás"); 
    4249         
    4350// recent posts list     
  • trunk/extras/xpress_i18n/template/xpressme_modules_root/language/english/blocks.php

    r356 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Today"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Between"); 
     47        define("_MB_XP2_DAYS_AND","and"); 
     48        define("_MB_XP2_DAYS_AGO","days ago"); 
    4249         
    4350// recent posts list     
  • trunk/xpressme_integration_kit/blocks/recent_posts_content_block.php

    r365 r425  
    1919                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    2020                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 
    21                 $disp_count =  ($options[2])?intval($options[2]):10; 
    22                 $excerpt = empty( $options[3] ) ? false : true ; 
    23                 $excerpt_size =  ($options[4])?intval($options[4]):100; 
    24                 $date_format = empty( $options[5] ) ? '' : $options[5] ; 
    25                 $time_format = empty( $options[6] ) ? '' : $options[6] ; 
    26                 $tag_select = $options[7] ; 
    27             $selected = array_slice($options,8); // get allowed cats 
     21                $day_select = ($options[2])?intval($options[2]):0; 
     22                $day_size = ($options[3])?intval($options[3]):0; 
     23                $disp_count =  ($options[4])?intval($options[4]):10; 
     24                $excerpt = empty( $options[5] ) ? false : true ; 
     25                $excerpt_size =  ($options[6])?intval($options[6]):100; 
     26                $date_format = empty( $options[7] ) ? '' : $options[7] ; 
     27                $time_format = empty( $options[8] ) ? '' : $options[8] ; 
     28                $tag_select = $options[9] ; 
     29            $selected = array_slice($options,10); // get allowed cats 
    2830 
    2931                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     
    3436            $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
    3537                $form .= "<br />"; 
    36                 $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
    37                 $form .= yes_no_radio_option('options[3]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n"; 
    38                 $form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[4]' value='" . $excerpt_size . "' /><br />\n"; 
    39                 $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n"; 
    40                 $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n"; 
     38                $form .= _MB_XP2_DAY_SELECT . ':' . _MB_XP2_DAY_BETWEEN . '<select name="options[2]">'; 
     39                switch ($day_select){ 
     40                case 1: 
     41                        $form .= '<option value="0">' . _MB_XP2_NONE . '</option>'; 
     42                        $form .= '<option value="1" selected>'. _MB_XP2_TODAY . '</option>'; 
     43                        $form .= '<option value="2">' . _MB_XP2_LASTES . '</option>'; 
     44                        break; 
     45                case 2: 
     46                        $form .= '<option value="0">' . _MB_XP2_NONE . '</option>'; 
     47                        $form .= '<option value="1">'. _MB_XP2_TODAY . '</option>'; 
     48                        $form .= '<option value="2" selected>' . _MB_XP2_LASTES . '</option>'; 
     49                        break; 
     50                default : 
     51                        $form .= '<option value="0" selected>' . _MB_XP2_NONE . '</option>'; 
     52                        $form .= '<option value="1">'. _MB_XP2_TODAY . '</option>'; 
     53                        $form .= '<option value="2">' . _MB_XP2_LASTES . '</option>'; 
     54                } 
     55                $form .= '</select>'; 
     56                 
     57                $form .= ' ' . _MB_XP2_DAYS_AND . " <input type='text' size='2' name='options[3]' value='" . $day_size . "' />" . _MB_XP2_DAYS_AGO . "<br />\n"; 
     58 
     59                $form .= _MB_XP2_COUNT .": <input type='text' name='options[4]' value='" . $disp_count . "' /><br />\n"; 
     60                $form .= yes_no_radio_option('options[5]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n"; 
     61                $form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[6]' value='" . $excerpt_size . "' /><br />\n"; 
     62                $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[7]' value='" . $date_format . "' /><br />\n"; 
     63                $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[8]' value='" . $time_format . "' /><br />\n"; 
    4164                 
    4265                include $mydirpath .'/wp-includes/version.php' ; 
    4366                if (wp_version_compare($wp_version, '>=','2.3')){ 
    4467                        $form .= "<br />\n"; 
    45                         $form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[7]' value='" . $tag_select . "' /><br />\n"; 
     68                        $form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[9]' value='" . $tag_select . "' /><br />\n"; 
    4669                } else { 
    47                         $form .= "<input type='hidden' name='options[7]' value='' /><br />\n"; 
     70                        $form .= "<input type='hidden' name='options[9]' value='' /><br />\n"; 
    4871                } 
    4972                 
  • trunk/xpressme_integration_kit/language/english/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","Select categorie"); 
    4141        define("_MB_XP2_TAGS_SELECT","Tags Select(Comma separated list of tags)"); 
     42        define("_MB_XP2_DAY_SELECT","Select Post Date"); 
     43        define("_MB_XP2_NONE","None"); 
     44        define("_MB_XP2_TODAY","Today"); 
     45        define("_MB_XP2_LASTES","Lastes"); 
     46        define("_MB_XP2_DAY_BETWEEN","Between"); 
     47        define("_MB_XP2_DAYS_AND","and"); 
     48        define("_MB_XP2_DAYS_AGO","days ago"); 
    4249         
    4350// recent posts list     
  • trunk/xpressme_integration_kit/language/ja_utf8/blocks.php

    r339 r425  
    4040        define("_MB_XP2_CATS_SELECT","対象のカテゴリー選択"); 
    4141        define("_MB_XP2_TAGS_SELECT","対象のタグ選択(複数ある場合はカンマ区切りで入力"); 
     42        define("_MB_XP2_DAY_SELECT","日付による抽出"); 
     43        define("_MB_XP2_NONE","なし"); 
     44        define("_MB_XP2_TODAY","本日の投稿"); 
     45        define("_MB_XP2_LASTES","最新の投稿"); 
     46        define("_MB_XP2_DAY_BETWEEN",""); 
     47        define("_MB_XP2_DAYS_AND","から"); 
     48        define("_MB_XP2_DAYS_AGO","日前までの間"); 
    4249         
    4350// recent posts list     
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r274 r425  
    66        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    77        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 
    8         $disp_count =  ($options[2])?intval($options[2]):10; 
    9         $excerpt = empty( $options[3] ) ? false : true ; 
    10         $excerpt_size =  ($options[4])?intval($options[4]):100; 
    11         $date_format = empty( $options[5] ) ? '' : $options[5] ; 
    12         $time_format = empty( $options[6] ) ? '' : $options[6] ; 
    13         $tag_select = $options[7] ; 
    14     $selected = array_slice($options,8); // get allowed cats 
     8        $day_select = ($options[2])?intval($options[2]):0; 
     9        $day_size = ($options[3])?intval($options[3]):0; 
     10        $disp_count =  ($options[4])?intval($options[4]):10; 
     11        $excerpt = empty( $options[5] ) ? false : true ; 
     12        $excerpt_size =  ($options[6])?intval($options[6]):100; 
     13        $date_format = empty( $options[7] ) ? '' : $options[7] ; 
     14        $time_format = empty( $options[8] ) ? '' : $options[8] ; 
     15        $tag_select = $options[9] ; 
     16    $selected = array_slice($options,10); // get allowed cats 
    1517 
    1618        $mydirpath = get_xpress_dir_path(); 
     
    2628                $author_where = ''; 
    2729        } 
     30         
     31        $date_today = mktime (0, 0, 0, date("m"), date("d"), date("Y")); 
     32        $between_days = $day_size * 60 * 60 * 24; 
     33         
    2834        global $wpdb,$wp_query; 
    2935        $block = array(); 
     
    3339                if (array_search(0,$selected)===0) { 
    3440                        $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    35  
    3641                } else { 
    3742                        $cat_id = implode(',',$selected); 
    38                         $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     43                        $r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    3944                } 
    4045                while($r->have_posts()){                         
    4146                        $r->the_post(); 
     47                        if ($day_select == 1){ 
     48                                $post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y")); 
     49                                $base_date = $date_today - $between_days; 
     50                                if ($post_date < $base_date) continue; 
     51                        } 
     52                        if ($day_select == 2){ 
     53                                $post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y")); 
     54                                if (empty($lastes_date)) $lastes_date = $post_date; 
     55                                $base_date = $lastes_date - $between_days; 
     56                                if ($post_date < $base_date) continue; 
     57                        } 
     58                         
    4259                        ob_start(); 
    4360                                the_ID(); 
  • trunk/xpressme_integration_kit/xoops_version.php

    r424 r425  
    4747 
    4848// status 
    49 $modversion['codename'] = "Bata2(r424)"; 
     49$modversion['codename'] = "Bata2(r425)"; 
    5050 
    5151// onInstall, onUpdate, onUninstall 
     
    144144        'edit_func'     => "b_". $mydirname . "_content_edit" , 
    145145        'template'              => '' , 
    146         'options'               => $mydirname. '||10|0|100||||0' , 
     146        'options'               => $mydirname. '||0|0|10|0|100||||0' , 
    147147        'can_clone'             => true , 
    148148        'func_num'              => $b_no, 
Note: See TracChangeset for help on using the changeset viewer.