Changeset 435 for trunk/xpressme_integration_kit/wp-content
- Timestamp:
- Nov 13, 2009, 6:38:28 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
r418 r435 9 9 $time_format = empty( $options[5] ) ? '' : $options[5] ; 10 10 $tag_select = $options[6] ; 11 $selected = array_slice($options, 7); // get allowed cats 11 $cat_select = empty( $options[7] ) ? '0' : $options[7] ; 12 13 $selected = explode(',' , $cat_select); 12 14 13 15 $mydirpath = get_xpress_dir_path(); … … 15 17 if (empty($date_format)) $date_format = get_settings('date_format'); 16 18 if (empty($time_format)) $time_format = get_settings('time_format'); 17 if (array_search(0,$selected)===0) { 18 $cat_select = false; 19 }else { 20 $cat_select = true; 21 } 22 $cat_id = implode(',',$selected); 19 if (array_search(0,$selected)===0) $cat_select = 0; 20 21 $cat_select; 23 22 $block = array(); 24 23 $item_no = 0; … … 58 57 59 58 if ($cat_select) { 60 $where .= " AND ($term_taxonomy.term_id IN ($cat_ id))";59 $where .= " AND ($term_taxonomy.term_id IN ($cat_select))"; 61 60 } 62 61 … … 75 74 76 75 if ($cat_select) { 77 $where .= " AND ($post2cat_tb.category_id IN ($cat_ id))";76 $where .= " AND ($post2cat_tb.category_id IN ($cat_select))"; 78 77 } 79 78 } -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
r429 r435 6 6 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 7 7 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 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 17 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 $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 15 $day_select = ($options[9])?intval($options[9]):0; 16 $day_size = ($options[10])?intval($options[10]):0; 17 18 $selected = explode(',' , $cat_select); 19 18 20 $mydirpath = get_xpress_dir_path(); 19 21 … … 21 23 if (empty($time_format)) $time_format = get_settings('time_format'); 22 24 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 23 25 if (array_search(0,$selected)===0) $cat_select = 0; 26 24 27 $selected_author_id = xpress_selected_author_id('echo=0'); 25 28 if (!empty($selected_author_id)){ … … 37 40 if (!is_null($wpdb)){ 38 41 $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 39 if (array_search(0,$selected)===0) { 42 if ($cat_select) { 43 $r = new WP_Query($author_where . $tag_where ."cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 44 } else { 40 45 $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 41 } else {42 $cat_id = implode(',',$selected);43 $r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");44 46 } 45 47 while($r->have_posts()){ -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php
r272 r435 10 10 $time_format = empty( $options[6] ) ? '' : $options[6] ; 11 11 $tag_select = $options[7] ; 12 $selected = array_slice($options,8); // get allowed cats 12 $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 13 14 $selected = explode(',' , $cat_select); 13 15 14 16 $mydirpath = get_xpress_dir_path(); … … 17 19 if (empty($time_format)) $time_format = get_settings('time_format'); 18 20 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 21 if (array_search(0,$selected)===0) $cat_select = 0; 19 22 20 23 $selected_author_id = xpress_selected_author_id('echo=0'); … … 30 33 if (!is_null($wpdb)){ 31 34 $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 32 if (array_search(0,$selected)===0) { 35 if ($cat_select) { 36 $r = new WP_Query($author_where . $tag_where . "cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 37 } else { 33 38 $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 34 35 } else {36 $cat_id = implode(',',$selected);37 $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");38 39 } 39 40 while($r->have_posts()){
Note: See TracChangeset
for help on using the changeset viewer.