Ticket #172: buddypress_l18n_blogs_theme.patch
File buddypress_l18n_blogs_theme.patch, 8.7 KB (added by , 16 years ago) |
---|
-
bp-blogs/bp-blogs-templatetags.php
220 220 return $posts_template->the_post(); 221 221 } 222 222 223 function bp_post_title( ) {223 function bp_post_title( $echo = true ) { 224 224 global $posts_template; 225 echo $posts_template->post->post_title; 225 226 if ( $echo == true ) 227 echo $posts_template->post->post_title; 228 else 229 return $posts_template->post->post_title; 226 230 } 227 231 228 232 function bp_post_permalink() { … … 248 252 echo $posts_template->post->post_status; 249 253 } 250 254 251 function bp_post_date( $date_format = null ) {255 function bp_post_date( $date_format = null, $echo = true ) { 252 256 global $posts_template; 253 257 254 258 if ( !$date_format ) 255 259 $date_format = get_option('date_format'); 256 260 257 echo mysql2date( $date_format, $posts_template->post->post_date ); 261 if ( $echo == true ) 262 echo mysql2date( $date_format, $posts_template->post->post_date ); 263 else 264 return mysql2date( $date_format, $posts_template->post->post_date ); 258 265 } 259 266 260 267 function bp_post_comment_count() { … … 299 306 echo '</a>'; 300 307 } 301 308 302 function bp_post_author( ) {309 function bp_post_author( $echo = true ) { 303 310 global $posts_template; 304 echo bp_core_get_userlink( $posts_template->post->post_author ); 311 312 if( $echo == true) 313 echo bp_core_get_userlink( $posts_template->post->post_author ); 314 else 315 return bp_core_get_userlink( $posts_template->post->post_author ); 305 316 } 306 317 307 318 function bp_post_id() { … … 309 320 echo $posts_template->post->ID; 310 321 } 311 322 312 function bp_post_category( $separator = '', $parents='', $post_id = false ) {323 function bp_post_category( $separator = '', $parents='', $post_id = false, $echo = true ) { 313 324 global $posts_template; 314 echo get_the_category_list($separator, $parents, $posts_template->post->ID ); 325 326 if ( $echo == true ) 327 echo get_the_category_list($separator, $parents, $posts_template->post->ID ); 328 else 329 return get_the_category_list($separator, $parents, $posts_template->post->ID ); 315 330 } 316 331 317 332 function bp_post_tags( $before = '', $sep = ', ', $after = '' ) { … … 555 570 echo $comments_template->comment->comment_ID; 556 571 } 557 572 558 function bp_comment_post_permalink( ) {573 function bp_comment_post_permalink( $echo = true ) { 559 574 global $comments_template; 560 echo bp_post_get_permalink( $comments_template->comment->post, $comments_template->comment->blog_id ) . '#comment-' . $comments_template->comment->comment_ID; 575 576 if ( $echo == true ) 577 echo bp_post_get_permalink( $comments_template->comment->post, $comments_template->comment->blog_id ) . '#comment-' . $comments_template->comment->comment_ID; 578 else 579 return bp_post_get_permalink( $comments_template->comment->post, $comments_template->comment->blog_id ) . '#comment-' . $comments_template->comment->comment_ID; 561 580 } 562 581 563 function bp_comment_post_title( ) {582 function bp_comment_post_title( $echo = true ) { 564 583 global $comments_template; 565 echo $comments_template->comment->post->post_title; 584 585 if ( $echo == true ) 586 echo $comments_template->comment->post->post_title; 587 else 588 return $comments_template->comment->post->post_title; 566 589 } 567 590 568 function bp_comment_author() { 569 global $comments_template; 570 echo bp_core_get_userlink( $comments_template->comment->user_id ); 591 function bp_comment_author( $echo = true ) { 592 global $comments_template; 593 594 if ( $echo == true ) 595 echo bp_core_get_userlink( $comments_template->comment->user_id ); 596 else 597 return bp_core_get_userlink( $comments_template->comment->user_id ); 571 598 } 572 599 573 600 function bp_comment_content() { … … 578 605 echo $content; 579 606 } 580 607 581 function bp_comment_date( $date_format = null ) {608 function bp_comment_date( $date_format = null, $echo = true ) { 582 609 global $comments_template; 583 610 584 611 if ( !$date_format ) 585 612 $date_format = get_option('date_format'); 586 613 587 echo mysql2date( $date_format, $comments_template->comment->post->post_date ); 614 if ( $echo == true ) 615 echo mysql2date( $date_format, $comments_template->comment->post->post_date ); 616 else 617 return mysql2date( $date_format, $comments_template->comment->post->post_date ); 588 618 } 589 619 590 function bp_comment_blog_permalink( ) {620 function bp_comment_blog_permalink( $echo = true ) { 591 621 global $comments_template; 592 echo get_blog_option( $comments_template->comment->blog_id, 'siteurl' ); 622 623 if ( $echo == true ) 624 echo get_blog_option( $comments_template->comment->blog_id, 'siteurl' ); 625 else 626 return get_blog_option( $comments_template->comment->blog_id, 'siteurl' ); 593 627 } 594 628 595 function bp_comment_blog_name( ) {629 function bp_comment_blog_name( $echo = true ) { 596 630 global $comments_template; 597 echo get_blog_option( $comments_template->comment->blog_id, 'blogname' ); 631 632 if ( $echo == true ) 633 echo get_blog_option( $comments_template->comment->blog_id, 'blogname' ); 634 else 635 return get_blog_option( $comments_template->comment->blog_id, 'blogname' ); 598 636 } 599 637 600 638 -
buddypress-theme/buddypress-member/blogs/create.php
12 12 <?php else: ?> 13 13 14 14 <div id="message" class="info"> 15 <p> Blog registration is currently disabled</p>15 <p><?php _e("Blog registration is currently disabled", "buddypress"); ?></p> 16 16 </div> 17 17 18 18 <?php endif; ?> -
buddypress-theme/buddypress-member/blogs/recent-comments.php
2 2 </div> 3 3 4 4 <div id="content"> 5 <h2> Recent Comments</h2>5 <h2><?php _e("Recent Comments", "buddypress"); ?></h2> 6 6 <?php do_action( 'template_notices' ) // (error/success feedback) ?> 7 7 8 8 <?php if ( bp_has_comments() ) : ?> 9 9 <ul id="comment-list"> 10 10 <?php while ( bp_comments() ) : bp_the_comment(); ?> 11 11 <li id="comment-<?php bp_comment_id() ?>"> 12 <span class="small"> On <?php bp_comment_date('F jS, Y') ?> <?php bp_comment_author() ?> said:</span>12 <span class="small"><?php printf(__('On %1$s %2$s said:', 'buddypress'), bp_comment_date(__('F jS, Y', 'buddypress'), false), bp_comment_author(false)); ?></span> 13 13 <p><?php bp_comment_content() ?></p> 14 <span class="small"> Commented on the post <a href="<?php bp_comment_post_permalink() ?>"><?php bp_comment_post_title() ?></a> on the blog <a href="<?php bp_comment_blog_permalink() ?>"><?php bp_comment_blog_name() ?></a>.</span>14 <span class="small"><?php printf(__('Commented on the post <a href="%1$s">%2$s</a> on the blog <a href="%3$s">%4$s</a>.', 'buddypress'), bp_comment_post_permalink(false), bp_comment_post_title(false), bp_comment_blog_permalink(false), bp_comment_blog_name(false)); ?></span> 15 15 </li> 16 16 <?php endwhile; ?> 17 17 </ul> -
buddypress-theme/buddypress-member/blogs/recent-posts.php
2 2 </div> 3 3 4 4 <div id="content"> 5 <h2> Recent Posts</h2>5 <h2><?php _e("Recent Posts", "buddypress"); ?></h2> 6 6 <?php do_action( 'template_notices' ) // (error/success feedback) ?> 7 7 8 8 <?php if ( bp_has_posts() ) : ?> 9 9 <?php while ( bp_posts() ) : bp_the_post(); ?> 10 10 <div class="post" id="post-<?php bp_post_id(); ?>"> 11 <h2><a href="<?php bp_post_permalink() ?>" rel="bookmark" title=" Permanent Link to <?php bp_post_title(); ?>"><?php bp_post_title(); ?></a></h2>12 <p class="date"><?php bp_post_date('F jS, Y') ?> <em>in <?php bp_post_category(', ') ?> by <?php bp_post_author() ?></em></p>13 <?php bp_post_content( 'Read the rest of this entry »'); ?>14 <p class="postmetadata"><?php bp_post_tags('<span class="tags">', ', ', '</span>'); ?> <span class="comments"><?php bp_post_comments( 'No Comments', '1 Comment', '% Comments'); ?></span></p>11 <h2><a href="<?php bp_post_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'buddypress'), bp_post_title(false)); ?>"><?php bp_post_title(); ?></a></h2> 12 <p class="date"><?php printf(__('%1$s <em>in %2$s by %3$s</em>', 'buddypress'), bp_post_date(__('F jS, Y', 'buddypress'), false), bp_post_category(', ', '', null, false), bp_post_author(false)); ?></p> 13 <?php bp_post_content(__('Read the rest of this entry »')); ?> 14 <p class="postmetadata"><?php bp_post_tags('<span class="tags">', ', ', '</span>'); ?> <span class="comments"><?php bp_post_comments(__('No Comments'), __('1 Comment'), __('% Comments')); ?></span></p> 15 15 <hr /> 16 16 </div> 17 17 <?php endwhile; ?>