sbrajesh

Brajesh Singh

Jul 18th, 2010
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.65 KB | None | 0 0
  1. <?php global $bp;
  2. $user_id=$bp->displayed_user->id?$bp->displayed_user->id:$bp->loggedin_user->id;
  3. if(bp_is_home()||  gf_is_my_topics())
  4.     $name=__("You","gf");
  5. else
  6.     $name=bp_core_get_user_displayname ($user_id);
  7.  
  8. if ( gf_has_forum_topics( "type=my-topics&user_id=".$user_id ) ) : ?>
  9.  
  10.  
  11.  
  12.     <?php do_action( 'bp_before_directory_forums_list' ) ?>
  13.     <div id="topics-list">
  14.         <h3><?php printf(__("Topics Started by %s","gf"),$name);?></h3>
  15.                 <ul>
  16.                    
  17.                 <?php while ( gf_forum_topics() ) : gf_the_forum_topic(); ?>
  18.             <li class="<?php gf_the_topic_css_class() ?>"> <a class="topic-title" href="<?php gf_the_topic_permalink() ?>" title="<?php gf_the_topic_title() ?> - <?php _e( 'Permalink', 'gf' ) ?>"><?php gf_the_topic_title() ?></a>
  19.                             -<?php printf(__("%s replies","gf"),gf_get_the_topic_total_posts()) ?>
  20.  
  21.                         -<?php printf(__("Last reply- %s ago","gf"), gf_get_the_topic_time_since_last_post()); ?>
  22.                         <div class="clear"></div>
  23.                         </li>
  24.                                 <?php endwhile; ?>
  25.            
  26.                 </ul>
  27.         <div class="nav">
  28.                      <div class="clear"></div>
  29.             <div id="post-count" class="pag-count">
  30.                     <?php gf_forum_pagination_count() ?>
  31.             </div>
  32.  
  33.             <div class="pagination-links" id="topic-pag">
  34.                 <?php gf_forum_pagination() ?>
  35.             </div>
  36.  
  37.             </div>
  38.  
  39.     </div><!-- end of discussion -->
  40.  
  41.  
  42.     <?php do_action( 'bp_after_directory_forums_list' ) ?>
  43.  
  44. <?php else: ?>
  45.  
  46.     <div id="message" class="info">
  47.         <p><?php _e( 'Sorry, there were no forum topics found.', 'gf' ) ?></p>
  48.     </div>
  49.  
  50. <?php endif;?>
Add Comment
Please, Sign In to add comment