XPressME Integration Kit

Trac

Changeset 120 for trunk/blocks


Ignore:
Timestamp:
Mar 18, 2009, 10:59:02 PM (15 years ago)
Author:
toemon
Message:

ブロックオプションの$selected = array_slice()部分が最後になるようにするため、ブロックオプションの$this_templateの位置を最後尾から2番目に変更
Ver 0.09 bump

Location:
trunk/blocks
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/blocks/archives_block.php

    r110 r120  
    1919        { 
    2020                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    21                 $type = empty( $options[1] ) ? false : true ; 
    22                 $limit = empty( $options[2] ) ? '10' : $options[2] ; 
    23                 $show_post_count = empty( $options[3] ) ? false : true ;                 
    24                 $drop_down = empty( $options[4] ) ? false : true ; 
    25                 $this_template = empty( $options[5] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[3] ); 
     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] ; 
     24                $show_post_count = empty( $options[4] ) ? false : true ;                 
     25                $drop_down = empty( $options[5] ) ? false : true ; 
    2626                 
    2727                require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php'); 
     
    3232 
    3333                $form .= "<br />" . yes_no_radio_option('options[1]', _MB_XPRESS_ARC_TYPE , $type,$a_month,$a_week); 
    34                 $form .= "<br />" . _MB_XPRESS_COUNT . "  <input type='text' name='options[2]' value='" . $limit . "' />"; 
    35                 $form .= "<br />" . yes_no_radio_option('options[3]', _MB_XPRESS_SHOW_NUM_OF_POST , $show_post_count); 
    36                 $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_SHOW_DROP_DOWN , $drop_down); 
     34                $form .= "<br />" . _MB_XPRESS_COUNT . "  <input type='text' name='options[3]' value='" . $limit . "' />"; 
     35                $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_SHOW_NUM_OF_POST , $show_post_count); 
     36                $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XPRESS_SHOW_DROP_DOWN , $drop_down); 
    3737//          $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 
    3838             
  • trunk/blocks/authors_block.php

    r110 r120  
    1919        { 
    2020                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    21                 $optioncount = empty( $options[1] ) ? false : true ; 
    22                 $exclude_admin = empty( $options[2] ) ? false : true ; 
    23                 $show_fullname = empty( $options[3] ) ? false : true ; 
    24                 $hide_empty = empty( $options[4] ) ? false : true ; 
    25                 $this_template = empty( $options[5] ) ? 'db:'.$mydirname.'_block_authors.html' : trim( $options[5] ); 
     21                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_authors.html' : trim( $options[1] ); 
     22                $optioncount = empty( $options[2] ) ? false : true ; 
     23                $exclude_admin = empty( $options[3] ) ? false : true ; 
     24                $show_fullname = empty( $options[4] ) ? false : true ; 
     25                $hide_empty = empty( $options[5] ) ? false : true ; 
    2626                 
    2727                require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php'); 
    2828                         
    2929                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    30                 $form .= yes_no_radio_option('options[1]', _MB_XPRESS_SHOW_NUM_OF_POST , $optioncount); 
    31                 $form .= "<br />" . yes_no_radio_option('options[2]', _MB_XPRESS_EXCLUEDEADMIN , $exclude_admin); 
    32                 $form .= "<br />" . yes_no_radio_option('options[3]', _MB_XPRESS_SHOW_FULLNAME , $show_fullname); 
    33                                 $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_HIDE_EMPTY , $hide_empty); 
     30                $form .= yes_no_radio_option('options[2]', _MB_XPRESS_SHOW_NUM_OF_POST , $optioncount); 
     31                $form .= "<br />" . yes_no_radio_option('options[3]', _MB_XPRESS_EXCLUEDEADMIN , $exclude_admin); 
     32                $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_SHOW_FULLNAME , $show_fullname); 
     33                                $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XPRESS_HIDE_EMPTY , $hide_empty); 
    3434//          $form .="<br /><input type='text' size='60' name='options[4]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 
    3535             
  • trunk/blocks/calender_block.php

    r109 r120  
    1818        { 
    1919                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    20                 $sun_color = empty( $options[1] ) ? '#DB0000' : $options[1] ; 
    21                 $sat_color = empty( $options[2] ) ? '#004D99' : $options[2] ; 
    22                 $this_template = empty( $options[3] ) ? 'db:'.$mydirname.'_calender_block.html' : trim( $options[3] ); 
     20                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_calender_block.html' : trim( $options[1] ); 
     21                $sun_color = empty( $options[2] ) ? '#DB0000' : $options[2] ; 
     22                $sat_color = empty( $options[3] ) ? '#004D99' : $options[3] ; 
    2323                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
    2424                 
  • trunk/blocks/popular_posts_block.php

    r109 r120  
    1717        { 
    1818                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    19                 $disp_count = empty( $options[1] ) ? '10' : $options[1] ; 
    20                 $show_month_range = empty( $options[2] ) ? '0' : $options[2] ; 
    21                 $tag_select = $options[3] ; 
    22                 $selected = array_slice($options, 4); // get allowed cats 
    23                 $this_template = empty( $options[5] ) ? 'db:'.$mydirname.'_block_popular.html' : trim( $options[5] ); 
     19                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_popular.html' : trim( $options[1] ); 
     20                $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 
     21                $show_month_range = empty( $options[3] ) ? '0' : $options[3] ; 
     22                $tag_select = $options[4] ; 
     23                $selected = array_slice($options, 5); // get allowed cats 
    2424                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
    2525                 
     
    2727 
    2828                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    29                 $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[1]' value='" . $disp_count . "' /><br />\n"; 
    30                 $form .= _MB_MONTH_RANGE .": <input type='text' name='options[2]' value='" . $show_month_range . "' /><br />\n"; 
     29                $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
     30                $form .= _MB_MONTH_RANGE .": <input type='text' name='options[3]' value='" . $show_month_range . "' /><br />\n"; 
    3131                $form .= "<br />\n"; 
    3232 
    33                 $form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[3]' value='" . $tag_select . "' /><br />\n";        
     33                $form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[4]' value='" . $tag_select . "' /><br />\n";        
    3434            $form .= _MB_XPRESS_CATS_SELECT ."<br />\n"; 
    3535            $isAll = (count($selected)==0||empty($selected[0]))?true:false; 
  • trunk/blocks/recent_comments_block.php

    r109 r120  
    1818        { 
    1919                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    20                 $disp_count = empty( $options[1] ) ? '10' : $options[1] ; 
    21                 $disp_length = empty( $options[2] ) ? '30' : $options[2] ; 
    22             $selected = array_slice($options,3); // get allowed cats 
    23                 $this_template = empty( $options[4] ) ? 'db:'.$mydirname.'_recent_comments_block.html' : trim( $options[4] ); 
     20                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_comments_block.html' : trim( $options[1] ); 
     21                $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 
     22                $disp_length = empty( $options[3] ) ? '30' : $options[3] ; 
     23            $selected = array_slice($options,4); // get allowed cats 
    2424                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
    2525 
     
    2727                 
    2828                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    29                 $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[1]' value='" . $disp_count . "' /><br />"; 
    30                 $form .= _MB_XPRESS_LENGTH .": <input type='text' name='options[2]' value='" . $disp_length . "' />"; 
     29                $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />"; 
     30                $form .= _MB_XPRESS_LENGTH .": <input type='text' name='options[3]' value='" . $disp_length . "' />"; 
    3131            $form .= "<br /><br />" . _MB_XPRESS_COM_TYPE ; 
    3232            $isAll = (count($selected)==0||empty($selected[0]))?true:false; 
  • trunk/blocks/recent_posts_content_block.php

    r109 r120  
    1818        { 
    1919                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    20                 $disp_count =  ($options[1])?intval($options[1]):10; 
    21                 $except = empty( $options[2] ) ? false : true ; 
    22                 $except_size =  ($options[3])?intval($options[3]):100; 
    23                 $tag_select = $options[4] ; 
    24             $selected = array_slice($options,5); // get allowed cats 
    25                 $this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[5] ); 
     20                $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                $except = empty( $options[3] ) ? false : true ; 
     23                $except_size =  ($options[4])?intval($options[4]):100; 
     24                $tag_select = $options[5] ; 
     25            $selected = array_slice($options,6); // get allowed cats 
    2626 
    2727                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     
    3030                 
    3131                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    32                 $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[1]' value='" . $disp_count . "' /><br />\n"; 
    33                 $form .= yes_no_radio_option('options[2]', _MB_XPRESS_P_EXCEPT , $except) . "<br />\n"; 
    34                 $form .= _MB_XPRESS_P_EXCEPT_SIZE .": <input type='text' name='options[3]' value='" . $except_size . "' /><br />\n"; 
     32                $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
     33                $form .= yes_no_radio_option('options[3]', _MB_XPRESS_P_EXCEPT , $except) . "<br />\n"; 
     34                $form .= _MB_XPRESS_P_EXCEPT_SIZE .": <input type='text' name='options[4]' value='" . $except_size . "' /><br />\n"; 
    3535                 
    3636                $form .= "<br />\n"; 
    37                 $form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[4]' value='" . $tag_select . "' /><br />\n"; 
     37                $form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[5]' value='" . $tag_select . "' /><br />\n"; 
    3838            $form .= _MB_XPRESS_CATS_SELECT ."<br />\n"; 
    3939            $isAll = (count($selected)==0||empty($selected[0]))?true:false; 
  • trunk/blocks/recent_posts_list_block.php

    r109 r120  
    1717        { 
    1818                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    19                 $disp_count = empty( $options[1] ) ? '10' : $options[1] ; 
    20                 $disp_red = empty( $options[2] ) ? '1' : $options[2] ; 
    21                 $disp_green = empty( $options[3] ) ? '7' : $options[3] ; 
    22                 $tag_select = $options[4] ; 
    23                 $selected = array_slice($options,5); // get allowed cats 
    24                 $this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_recent_posts_list_block.html' : trim( $options[6] ); 
     19                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_list_block.html' : trim( $options[1] ); 
     20                $disp_count = empty( $options[2] ) ? '10' : $options[2] ; 
     21                $disp_red = empty( $options[3] ) ? '1' : $options[3] ; 
     22                $disp_green = empty( $options[4] ) ? '7' : $options[4] ; 
     23                $tag_select = $options[5] ; 
     24                $selected = array_slice($options,6); // get allowed cats 
    2525                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
    2626                 
     
    2828 
    2929                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    30                 $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[1]' value='" . $disp_count . "' /><br />\n"; 
    31                 $form .= _MB_XPRESS_REDNEW_DAYS .": <input type='text' name='options[2]' value='" . $disp_red . "' /><br />\n"; 
    32                 $form .= _MB_XPRESS_GREENNEW_DAYS .": <input type='text' name='options[3]' value='" . $disp_green . "' /><br />\n"; 
     30                $form .= _MB_XPRESS_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
     31                $form .= _MB_XPRESS_REDNEW_DAYS .": <input type='text' name='options[3]' value='" . $disp_red . "' /><br />\n"; 
     32                $form .= _MB_XPRESS_GREENNEW_DAYS .": <input type='text' name='options[4]' value='" . $disp_green . "' /><br />\n"; 
    3333                 
    3434            $form .= "<br />\n"; 
    35                 $form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[4]' value='" . $tag_select . "' /><br />\n"; 
     35                $form .= _MB_XPRESS_TAGS_SELECT .": <input type='text' name='options[5]' value='" . $tag_select . "' /><br />\n"; 
    3636            $form .= _MB_XPRESS_CATS_SELECT ."<br />\n"; 
    3737            $isAll = (count($selected)==0||empty($selected[0]))?true:false; 
  • trunk/blocks/search_block.php

    r119 r120  
    1818        { 
    1919                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    20                 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_search.html' : trim( $options[1] ); 
     20                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_search_block.html' : trim( $options[1] ); 
    2121                $disp_count = empty( $options[2] ) ? '18' : $options[2] ; 
    2222                $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname ; 
Note: See TracChangeset for help on using the changeset viewer.