sbrajesh

Brajesh Singh

Apr 16th, 2010
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.31 KB | None | 0 0
  1. <div id="footer-featured" class="widget">
  2.        
  3.         <div id="bottom-content" class="widget-content">
  4.             <div class="bottom_col">
  5.             <h3><?php _e("From Our Blogs","bpdev");?></h3>
  6.             <div class="posts">
  7.              <ul>
  8.                  <?php
  9.                  switch_to_blog(2);
  10.                   $wpq=new Wp_Query();
  11.                   $wpq->query("showposts=3");?>
  12.                   <?php if($wpq->have_posts()):
  13.                     while($wpq->have_posts()):$wpq->the_post();
  14.                      $editor_image=bp_core_fetch_avatar( "item_id=".$wpq->post->post_author."&type=thumb&height=32&width=32") ;
  15.                     ?>
  16.                     <li>
  17.                         <div class="item-avatar"><?php echo $editor_image;?>
  18.                         </div>
  19.                         <div class="post-snippet">
  20.                             <p> <?php echo substr(strip_tags($wpq->post->post_content),0,60);?></p>
  21.                         </div>
  22.                         <div class="read_more">
  23.                          <?php the_time(' F j');?>|<a href="<?php the_permalink();?>"><?php _e("Read More","bpdev");?></a>
  24.                         </div>
  25.                         <br class="clear" />
  26.                     </li>
  27.                 <?php endwhile;?>
  28.                 <?php else :?>
  29.                     <li>
  30.                         <div class="info">
  31.                             <p><?php _e("No New Posts Found");?></p>
  32.                         </div>
  33.                         <br class="clear" />
  34.                     </li>
  35.                 <?php endif;
  36.                 restore_current_blog();
  37.                 ?>         
  38.             </ul>  
  39.             </div>
  40.         </div>
  41.         <div class="bottom_col">
  42.             <h3><?php _e("Recent Comments","bpdev");?></h3>
  43.            
  44.             <div class="recent_activity">
  45.                 <ul>
  46.                 <?php if ( bp_has_activities( 'type=sitewide&action=new_blog_comment&max=3' ) ) : ?>
  47.                   <?php while ( bp_activities() ) : bp_the_activity(); ?>
  48.                        <li>
  49.                          <div class="item-avatar">
  50.                           <?php bp_activity_avatar("height=32&width=32"); ?>
  51.                          </div>
  52.                          <div class="post-snippet">
  53.                            <?php bp_activity_content() ?>
  54.                          </div>
  55.                          <br class="clear" />
  56.                        </li>
  57.                     <?php endwhile;?>
  58.                     <?php else:?>
  59.                         <li>   
  60.                         <p><?php _e("No Sitewide Comments yet","bpdev");?></p>                           
  61.                          <br class="clear" />
  62.                         </li>
  63.                     <?php endif;?>
  64.                 <ul>  
  65.                 <br class="clear" />
  66.             </div>
  67.         </div>
  68.         <div class="bottom_col">
  69.         <h3><?php _e("Tags","bpdev");?></h3>
  70.             <div class="recent-tags">                                      
  71.               <?php wp_tag_cloud('smallest=12&largest=24&number=30&orderby=count&order=RAND&unit=px'); ?>
  72.               <br class="clear" />
  73.             </div>
  74.         </div>
  75.         <br class="clear" />
  76.     </div><!--end of bottom content -->
  77.     <br class="clear" />
  78. </div><!-- end of featured footer -->
Add Comment
Please, Sign In to add comment