Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 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><!-- .author-box -->
  30.  
  31. <div class="post-content">
  32.  
  33.  
  34.  
  35. <div class="postthumb">
  36.  
  37.  
  38.  
  39. <?php // display image thumbnail for each post from within the index.php loop
  40. echo get_attachment_icon($attachment_id); ?>
  41.  
  42. </div><!-- .postthumb -->
  43. <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>
  44.  
  45. <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>
  46.  
  47. <div class="entry">
  48. <?php the_excerpt( __( 'Read the rest of this entry &rarr;', 'buddypress' ) ); ?>
  49. </div><!-- .entry -->
  50.  
  51.  
  52.  
  53. <p class="postmetadata"><span class="tags"><?php the_tags( __( 'Tags: ', 'buddypress' ), ', ', '<br />'); ?></span> <?php if ( is_user_logged_in() ) : ?>
  54.  
  55.  
  56. <div style="clear:both;"></div>
  57.  
  58.  
  59.  
  60.  
  61. <div id="custom-post-meta">
  62. <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>
  63. <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>
  64. <div class="loveit">
  65. <?php if ( !bp_get_activity_is_favorite() ) : ?>
  66. <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>
  67. <?php else : ?>
  68. <a class="fav" href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'REMOVE FAVOURITE', 'buddypress' ) ?>"><?php _e( 'Un-Favourite', 'buddypress' ) ?></a>
  69. <?php endif; ?>
  70. <?php endif; ?></div>
  71. <div class="rating">
  72. <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
  73. </div><!-- ratings -->
  74. </div><!-- custom-post-meta -->
  75.  
  76.  
  77.  
  78.  
  79.  
  80. </div><!-- post content-->
  81.  
  82. </div><!-- post-->
  83.  
  84. <?php do_action( 'bp_after_blog_post' ) ?>
  85.  
  86. <?php endwhile; ?>
  87.  
  88.  
  89.  
  90.  
  91. <?php else : ?>
  92.  
  93. <h2 class="center"><?php _e( 'Not Found', 'buddypress' ) ?></h2>
  94. <?php locate_template( array( 'searchform.php' ), true ) ?>
  95.  
  96. <?php endif; ?>
  97.  
  98. </div><!---page archives -->
  99.  
  100. <?php do_action( 'bp_after_archive' ) ?>
  101.  
  102. </div><!-- .padder -->
  103. </div><!-- #content -->
  104. <div class="navigation">
  105.  
  106. <div class="alignleft"><?php next_posts_link( __( 'Next >>', 'buddypress' ) ) ?></div>
  107. <div class="alignright"><?php previous_posts_link( __( '<< Back ', 'buddypress' ) ) ?></div>
  108.  
  109. </div>
  110.  
  111. <?php locate_template( array( 'sidebar.php' ), true ) ?>
  112.  
  113. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement