Changeset 262
- Timestamp:
- Jun 8, 2009, 5:55:59 PM (16 years ago)
- Location:
- trunk/xpressme_integration_kit/wp-content
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r253 r262 16 16 $output .= ob_get_contents(); 17 17 ob_end_clean(); 18 19 if(function_exists('the_title_attribute')){ 20 $title = the_title_attribute('echo=0'); 21 } else { 22 ob_start(); 23 the_title(); 24 $title = ob_get_contents(); 25 ob_end_clean(); 26 } 18 27 19 28 $output .= '" rel="bookmark" title="'; 20 $output .= sprintf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0'));29 $output .= sprintf(__('Permanent Link to %s', 'xpress'), $title); 21 30 $output .= '">'; 22 ob_start(); 23 the_title(); 24 $output .= ob_get_contents(); 25 ob_end_clean(); 31 $output .= $title; 26 32 $output .= '</a></h2>' . "\n"; 27 33 $output .= '</div>' . "\n"; -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp20.php
r252 r262 248 248 } 249 249 250 // ADD WP 2.1.0 251 function the_modified_date($d = '') { 252 echo apply_filters('the_modified_date', get_the_modified_date($d), $d); 253 } 254 255 // ADD WP 2.1.0 256 function get_the_modified_date($d = '') { 257 if ( '' == $d ) 258 $the_time = get_post_modified_time(get_option('date_format')); 259 else 260 $the_time = get_post_modified_time($d); 261 return apply_filters('get_the_modified_date', $the_time, $d); 262 } 263 264 250 265 /** 251 266 * @ignore -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php
r252 r262 60 60 'recurse' => 1, 61 61 ); 62 $block['categories'] = wp_list_cats($param); 63 62 ob_start(); 63 wp_list_cats($param); 64 $block['categories'] = ob_get_contents(); 65 ob_end_clean(); 64 66 } 65 67 return $block ; -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php
r232 r262 22 22 if ($show_date == 'none' ) $show_date = ''; 23 23 24 $parm = array( 25 'sort_column' => $sort_column, 26 'sort_order' => $sort_order, 27 'exclude' => $exclude, 28 'exclude_tree' => $exclude_tree, 29 'include' => $includes, 30 'depth' => $depth, 31 'child_of' => $child_of, 32 'show_date' => $show_date, 33 'date_format' => $date_format, 34 'title_li' => '', 35 'echo' => 0, 36 'hierarchical' => $hierarchical, 37 'meta_key' => $meta_key, 38 'meta_value' => $meta_value 39 ); 40 41 $output = "<ul>\n" . wp_list_pages($parm) . "\n</ul>\n"; 24 if (!xpress_is_wp20()){ 25 $parm = array( 26 'sort_column' => $sort_column, 27 'sort_order' => $sort_order, 28 'exclude' => $exclude, 29 'exclude_tree' => $exclude_tree, 30 'include' => $includes, 31 'depth' => $depth, 32 'child_of' => $child_of, 33 'show_date' => $show_date, 34 'date_format' => $date_format, 35 'title_li' => '', 36 'echo' => 0, 37 'hierarchical' => $hierarchical, 38 'meta_key' => $meta_key, 39 'meta_value' => $meta_value 40 ); 41 $output = "<ul>\n" . wp_list_pages($parm) . "\n</ul>\n"; 42 } else { 43 $output = "<ul>\n"; 44 ob_start(); 45 wp_list_pages($parm); 46 $output .= ob_get_contents(); 47 ob_end_clean(); 48 $output .="\n</ul>\n"; 49 } 42 50 $block['list_pages'] = $output; 43 51 return $block ; -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
r158 r262 44 44 45 45 $select = "SELECT $view_tb.post_views, $post_tb.ID, $post_tb.post_title, $post_tb.post_date"; 46 46 if ($wp_db_version >= 6124){ 47 47 $from = " FROM ((("; 48 48 $from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)"; … … 66 66 $where .= " AND ($term_taxonomy.term_id IN ($tag_id_list))"; 67 67 } 68 } else { 69 $from = " FROM (("; 70 $from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)"; 71 $from .= " LEFT JOIN $post2cat_tb ON $post_tb.ID = $post2cat_tb.post_id)"; 72 $from .= " INNER JOIN $user_tb ON $post_tb.post_author = $user_tb.ID"; 73 74 $where = " WHERE ($post_tb.post_status = 'publish') AND (UNIX_TIMESTAMP($post_tb.post_date) <= UNIX_TIMESTAMP())" ; 75 76 if ($cat_select) { 77 $where .= " AND ($post2cat_tb.category_id IN ($cat_id))"; 78 } 79 } 68 80 69 81 … … 106 118 ob_end_clean(); 107 119 108 ob_start(); 109 the_tags(__('Tags:', 'kubrick') . ' ',' • ',''); 110 $tags = ob_get_contents(); 111 ob_end_clean(); 120 if (function_exists('the_tags')){ 121 ob_start(); 122 the_tags(__('Tags:', 'xpress') . ' ',' • ',''); 123 $tags = ob_get_contents(); 124 ob_end_clean(); 125 } else { 126 $tags = ''; 127 } 112 128 113 129 ob_start(); … … 115 131 $post_modified_date = ob_get_contents(); 116 132 ob_end_clean(); 117 133 118 134 ob_start(); 119 135 the_modified_date($time_format); -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
r142 r262 46 46 $comment_sql = "SELECT comment_ID,comment_post_ID,comment_author,comment_author_email,comment_author_url,comment_content, comment_type,UNIX_TIMESTAMP(comment_date) as comment_unix_time "; 47 47 $comment_sql .= "FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID "; 48 $comment_sql .= "WHERE comment_approved = '1' AND post_type = 'post' AND post_status = 'publish' $type_select "; 48 if (xpress_is_wp20()){ 49 $comment_sql .= "WHERE comment_approved = '1' AND post_status = 'publish' $type_select "; 50 } else { 51 $comment_sql .= "WHERE comment_approved = '1' AND post_type = 'post' AND post_status = 'publish' $type_select "; 52 } 49 53 $comment_sql .= "ORDER BY comment_date_gmt DESC LIMIT $disp_count"; 50 51 54 $comments = $wpdb->get_results($comment_sql); 52 55 -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
r232 r262 62 62 ob_end_clean(); 63 63 64 ob_start(); 65 the_tags(__('Tags:', 'kubrick') . ' ',' • ',''); 66 $tags = ob_get_contents(); 67 ob_end_clean(); 68 64 if (function_exists('the_tags')){ 65 ob_start(); 66 the_tags(__('Tags:', 'xpress') . ' ',' • ',''); 67 $tags = ob_get_contents(); 68 ob_end_clean(); 69 } else { 70 $tags = ''; 71 } 72 69 73 if ($excerpt){ 70 74 $excerpt_length_word = $excerpt_size; … … 82 86 $post_modified_date = ob_get_contents(); 83 87 ob_end_clean(); 84 88 85 89 ob_start(); 86 90 the_modified_date($time_format); … … 111 115 <?php if (function_exists('hotDates')) { hotDates(); }?> 112 116 <div class ="xpress-post-title"> 113 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2> 117 <?php if(function_exists('the_title_attribute')) : ?> 118 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2> 119 <?php else : ?> 120 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title('','',false)); ?>"><?php the_title(); ?></a></h2> 121 <?php endif; ?> 122 114 123 </div> 115 124 </div> -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php
r157 r262 64 64 ob_end_clean(); 65 65 66 ob_start(); 67 the_tags(__('Tags:', 'kubrick') . ' ',' • ',''); 68 $tags = ob_get_contents(); 69 ob_end_clean(); 66 if (function_exists('the_tags')){ 67 ob_start(); 68 the_tags(__('Tags:', 'xpress') . ' ',' • ',''); 69 $tags = ob_get_contents(); 70 ob_end_clean(); 71 } else { 72 $tags = ''; 73 } 70 74 71 75 ob_start(); … … 73 77 $post_modified_date = ob_get_contents(); 74 78 ob_end_clean(); 75 79 76 80 ob_start(); 77 81 the_modified_date($time_format); … … 141 145 } 142 146 return $block ; 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 if (strstr($call_url,$this_url)){189 $output ='<!-- xpress_recent_entries direct load -->' . "\n";190 if (array_search(0,$selected)===0) {191 $r = new WP_Query("showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");192 } else {193 $cat_id = implode(',',$selected);194 $r = new WP_Query("cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");195 }196 if ($r->have_posts()) {197 $red_sec = $disp_red *60*60*24;198 $green_sec = $disp_green *60*60*24;199 $output .= '<!-- xpress_recent_block -->' . "\n" . '<ul>';200 while ($r->have_posts()){201 $r->the_post();202 ob_start();203 if ( get_the_title() ) {204 the_title();205 } else {206 the_ID();207 }208 $title = ob_get_contents();209 ob_end_clean();210 ob_start();211 the_time('U');212 $post_time = ob_get_contents();213 ob_end_clean();214 $elapse = time() - $post_time;215 $new_mark = '';216 if ($elapse < $red_sec ) {217 $new_mark = '<em style="color: red; font-size: small;">New!</em>';218 219 } else if ($elapse < $green_sec) {220 $new_mark = '<em style="color: green; font-size: small;">New!</em>';221 }222 ob_start();223 the_permalink();224 $permalink = ob_get_contents();225 ob_end_clean();226 ob_start();227 the_author();228 $author = ob_get_contents();229 ob_end_clean();230 $output .= '<li><a href="' . $permalink . '">' . $title . '</a> ';231 if ($show_new) {232 $output .= $new_mark ;233 }234 if ($show_author){235 $output .= ' ' . $author;236 }237 switch($show_date){238 case 1 :239 $format = get_settings('date_format');240 $output .= '<p class="recentpost_time">(' . date($format,$post_time) . ')</p>';241 break;242 case 2 :243 $format = get_settings('date_format') . ' ' . get_settings('time_format');244 $output .= '<p class="recentpost_time">(' . date($format,$post_time) . ')</p>';245 break;246 default :247 }248 $output .= '</li>'. "\n";249 }250 $output .= '</ul>';251 }252 $block['content'] = $output;253 } else {254 $para = '?showposts=' . $disp_count;255 $para .= '&show_new=' . $show_new;256 $para .= '&disp_red=' . $disp_red;257 $para .= '&disp_green=' . $disp_green;258 $para .= '&show_author=' . $show_author;259 $para .= '&show_date=' .$show_date;260 $para .= '&cat_id=' . implode(',',$selected);261 262 $block['content'] = fetch_block($mydirname,$bid,'recent_entries_block',$para);263 }264 return $block ;265 266 147 } 267 268 148 ?>
Note: See TracChangeset
for help on using the changeset viewer.