/bp-themes/bp-default/attachment.php

  1. <?php get_header(); ?> 
  2.  
  3. <div id="content"> 
  4. <div class="padder"> 
  5.  
  6. <?php do_action( 'bp_before_attachment' ); ?> 
  7.  
  8. <div class="page" id="attachments-page" role="main"> 
  9.  
  10. <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
  11.  
  12. <?php do_action( 'bp_before_blog_post' ); ?> 
  13.  
  14. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
  15.  
  16. <div class="author-box"> 
  17. <?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?> 
  18. <p><?php printf( _x( 'by %s', 'Post written by...', 'buddypress' ), str_replace( '<a href=', '<a rel="author" href=', bp_core_get_userlink( $post->post_author ) ) ); ?></p> 
  19. </div> 
  20.  
  21. <div class="post-content"> 
  22. <h2 class="posttitle"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php esc_attr_e( 'Permanent Link to', 'buddypress' ); ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> 
  23.  
  24. <p class="date"> 
  25. <?php the_date(); ?> 
  26. <span class="post-utility alignright"><?php edit_post_link( __( 'Edit this entry', 'buddypress' ) ); ?></span> 
  27. </p> 
  28.  
  29. <div class="entry"> 
  30. <?php echo wp_get_attachment_image( $post->ID, 'large', false, array( 'class' => 'size-large aligncenter' ) ); ?> 
  31.  
  32. <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div> 
  33. <?php the_content(); ?> 
  34. </div> 
  35.  
  36. <p class="postmetadata"> 
  37. <?php 
  38. if ( wp_attachment_is_image() ) : 
  39. $metadata = wp_get_attachment_metadata(); 
  40. printf( __( 'Full size is %s pixels', 'buddypress' ),  
  41. sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>',  
  42. wp_get_attachment_url(),  
  43. esc_attr( __( 'Link to full size image', 'buddypress' ) ),  
  44. $metadata['width'],  
  45. $metadata['height'] 
  46. ); 
  47. endif; 
  48. ?> 
  49.   
  50. </p> 
  51. </div> 
  52.  
  53. </div> 
  54.  
  55. <?php do_action( 'bp_after_blog_post' ); ?> 
  56.  
  57. <?php comments_template(); ?> 
  58.  
  59. <?php endwhile; else: ?> 
  60.  
  61. <p><?php _e( 'Sorry, no attachments matched your criteria.', 'buddypress' ); ?></p> 
  62.  
  63. <?php endif; ?> 
  64.  
  65. </div> 
  66.  
  67. <?php do_action( 'bp_after_attachment' ); ?> 
  68.  
  69. </div><!-- .padder --> 
  70. </div><!-- #content --> 
  71.  
  72. <?php get_sidebar(); ?> 
  73.  
  74. <?php get_footer(); ?> 
.