Advertisement
Guest User

Patrick

a guest
May 25th, 2010
792
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. <?php if ( !is_user_logged_in() ) : ?>
  2. You must be logged in to view this section.
  3. <?php endif;?>
  4.  
  5. <?php if ( is_user_logged_in() ) : ?>
  6.  
  7. <?php if ( bp_has_forum_topics( bp_ajax_querystring( 'forums' ) ) ) : ?>
  8.  
  9. <div class="pagination">
  10.  
  11. <div id="post-count" class="pag-count">
  12. <?php if ( bp_is_group_forum() && is_user_logged_in() ) : ?>
  13. <a href="#post-new" class="button"><?php _e( 'New Topic', 'buddypress' ) ?></a> &nbsp;
  14. <?php endif; ?>
  15.  
  16. <?php bp_forum_pagination_count() ?>
  17. </div>
  18.  
  19. <div class="pagination-links" id="topic-pag">
  20. <?php bp_forum_pagination() ?>
  21. </div>
  22.  
  23. </div>
  24.  
  25. <?php do_action( 'bp_before_directory_forums_list' ) ?>
  26.  
  27. <table class="forum">
  28.  
  29. <tr>
  30. <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th>
  31. <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th>
  32.  
  33. <?php if ( !bp_is_group_forum() ) : ?>
  34. <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th>
  35. <?php endif; ?>
  36.  
  37. <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th>
  38. <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ) ?></th>
  39. </tr>
  40.  
  41. <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>
  42.  
  43. <tr class="<?php bp_the_topic_css_class() ?>">
  44. <td class="td-title">
  45. <a class="topic-title" href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>">
  46. <?php bp_the_topic_title() ?>
  47. </a>
  48. </td>
  49. <td class="td-poster">
  50. <a href="<?php bp_the_topic_permalink() ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ) ?></a>
  51. <div class="poster-name"><?php bp_the_topic_last_poster_name() ?></div>
  52. </td>
  53.  
  54. <?php if ( !bp_is_group_forum() ) : ?>
  55. <td class="td-group">
  56. <a href="<?php bp_the_topic_object_permalink() ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) ?></a>
  57. <div class="object-name"><a href="<?php bp_the_topic_object_permalink() ?>" title="<?php bp_the_topic_object_name() ?>"><?php bp_the_topic_object_name() ?></a></div>
  58. </td>
  59. <?php endif; ?>
  60.  
  61. <td class="td-postcount">
  62. <?php bp_the_topic_total_posts() ?>
  63. </td>
  64. <td class="td-freshness">
  65. <?php bp_the_topic_time_since_last_post() ?>
  66. </td>
  67.  
  68. <?php do_action( 'bp_directory_forums_extra_cell' ) ?>
  69. </tr>
  70.  
  71. <?php do_action( 'bp_directory_forums_extra_row' ) ?>
  72.  
  73. <?php endwhile; ?>
  74.  
  75. </table>
  76.  
  77. <?php do_action( 'bp_after_directory_forums_list' ) ?>
  78.  
  79. <?php else: ?>
  80.  
  81. <div id="message" class="info">
  82. <p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ) ?></p>
  83. </div>
  84.  
  85. <?php endif;?>
  86.  
  87. <?php endif;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement