Skip to:
Content
Pages
Categories
Search
Top
Bottom

codex help needed: documentation for dummies


  • enlightenmental1
    Participant

    @enlightenmental1

    <?php echo $user->avatar ?>

    where does one find more of these?

    specifically where/how to add elements to the users blog

    I have the blog admin information dispalying on their sidebar, but cannot get the other codex samples to work

    how do i define a dynamic user_id ?

    
     if ( bp_has_blogs() ) : 
    
      <div class="pag-count" id="blog-count">
     bp_blogs_pagination_count() 
    </div>
    
      <div class="pagination-links" id="blog-pag">
     bp_blogs_pagination_links() 
    </div>
    
      <ul id="blog-list" class="item-list">
     while ( bp_blogs() ) : bp_the_blog(); 
    
    <li>
    <!-- Example template tags you can use -->
     bp_blog_permalink() 
     bp_blog_title() 
     bp_blog_description() 
    </li>
       endwhile; 
    
     else: 
    
      <div id="message" class="info">
    <p>No blogs found for user.</p>
    </div>
    
     endif;

    in the above code, if I wanted to insert that into the sidebar of every user’s blog, how do i keep the user_id dynamic so it disaplys the content of the blog owner…. not pre-defined

    plz help….. the documentation is hard to understand without more examples for us noobs

Viewing 4 replies - 1 through 4 (of 4 total)

  • enlightenmental1
    Participant

    @enlightenmental1

    wait… wait…. Andy helped

    <?php if ( bp_has_blogs( ‘user_id=’ . bp_displayed_user_id() . ‘&per_page=15’ ) ) : ?>


    takuya
    Participant

    @takuya

    What does the above function do?


    Jeff Sayre
    Participant

    @jeffsayre

    Enlightenmental1-

    Based on your second post, I assume that this issue has been resolved. I’m setting this thread to indicate as much. If that is not the case, you can reset the status and ask for additional help.


    enlightenmental1
    Participant

    @enlightenmental1

    oops…. yeap sorry Jeff… I forgot to turn the lights off

    @ Socailpreneur I needed to add BP specific information to the sidebar of the users blogs.. like their avatar, last active, friends, groups, events etc

    something like this

    <?php

    $users = get_users_of_blog( $current_blog->blog_id );

    foreach ( $users as $user ) {

    $user = new BP_Core_User( $user->user_id );

    ?>

    <div style=”border:1px solid; padding-top:5px; padding-bottom:5px; margin:0px;”>

    <div style=”float:left;margin:0px;padding-left:5px;”><?php echo $user->avatar_thumb ?></div>

    <h4 align=”center”> Welcome to <?php echo $user->user_link ?>’s Page!</h4>

    <small><center><?php the_author(); ?> was last <?php echo $user->last_active ?></center></small>

    <?php

    global $blog_id;

    $blog_details = get_blog_details($blog_id);

    echo ‘<center>http://&#8217;.$blog_details->domain,$blog_details->path.’ </center>’ ;

    ?>

    </div>

    <div class=”clear”></div>

    <?php } ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘codex help needed: documentation for dummies’ is closed to new replies.
Skip to toolbar