Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2011
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div id="content">
  4. <div class="padder">
  5.  
  6. <?php do_action( 'bp_before_archive' ) ?>
  7.  
  8. <div class="page" id="blog-archives">
  9.  
  10. <h3 class="pagetitle"><?php printf( __( '%1$s.', 'buddypress' ), wp_title( false, false ) ); ?></h3>
  11.  
  12.  
  13.  
  14. <?php if ( have_posts() ) : ?>
  15.  
  16.  
  17. <?php while (have_posts()) : the_post(); ?>
  18.  
  19. <?php global $wpdb; $attachment_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post->ID'
  20. AND post_status = 'inherit' AND post_type='attachment' ORDER BY post_date DESC LIMIT 1"); ?>
  21.  
  22. <?php do_action( 'bp_before_blog_post' ) ?>
  23.  
  24. <div class="post" id="post-<?php the_ID(); ?>">
  25.  
  26. <div class="author-box">
  27. <?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?>
  28. <p><?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?></p>
  29. </div>
  30.  
  31. <div class="post-content">
  32. <div class="postthumb">
  33.  
  34.  
  35.  
  36. <?php // display image thumbnail for each post from within the index.php loop
  37. echo get_attachment_icon($attachment_id); ?>
  38.  
  39. </div>
  40. <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  41.  
  42. <p class="date"><em> <?php printf( __( 'Found by %s,', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?> <?php _e( 'filed in', 'buddypress' ) ?> <?php the_category(', ') ?></em> </p>
  43.  
  44. <div class="entry">
  45. <?php the_excerpt( __( 'Read the rest of this entry &rarr;', 'buddypress' ) ); ?>
  46. </div>
  47.  
  48.  
  49.  
  50. <p class="postmetadata"><span class="tags"><?php the_tags( __( 'Tags: ', 'buddypress' ), ', ', '<br />'); ?></span> <?php if ( is_user_logged_in() ) : ?>
  51. <div style="clear:both;"></div>
  52. <div id="custom-post-meta">
  53. <div class="tweet"> <script type="text/javascript">tweetmeme_style = "compact";</script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div>
  54. <div class="fbshare"><a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div>
  55. <div class="loveit">
  56. <?php if ( !bp_get_activity_is_favorite() ) : ?>
  57. <a class="fav" href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'ADD TO FAVOURITES', 'buddypress' ) ?>"><?php _e( 'Add to favourites', 'buddypress' ) ?></a>
  58. <?php else : ?>
  59. <a class="fav" href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'REMOVE FAVOURITE', 'buddypress' ) ?>"><?php _e( 'Un-Favourite', 'buddypress' ) ?></a>
  60. <?php endif; ?>
  61. <?php endif; ?></div>
  62. <div class="rating">
  63. <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
  64. </div>
  65. </div></div>
  66.  
  67. </div>
  68.  
  69. <?php do_action( 'bp_after_blog_post' ) ?>
  70.  
  71. <?php endwhile; ?>
  72.  
  73.  
  74.  
  75.  
  76. <?php else : ?>
  77.  
  78. <h2 class="center"><?php _e( 'Not Found', 'buddypress' ) ?></h2>
  79. <?php locate_template( array( 'searchform.php' ), true ) ?>
  80.  
  81. <?php endif; ?>
  82.  
  83. </div>
  84.  
  85. <?php do_action( 'bp_after_archive' ) ?>
  86.  
  87. </div><!-- .padder -->
  88. </div><!-- #content -->
  89. <div class="navigation">
  90.  
  91. <div class="alignleft"><?php next_posts_link( __( 'Next >>', 'buddypress' ) ) ?></div>
  92. <div class="alignright"><?php previous_posts_link( __( '<< Back ', 'buddypress' ) ) ?></div>
  93.  
  94. </div>
  95.  
  96. <?php locate_template( array( 'sidebar.php' ), true ) ?>
  97.  
  98. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement