Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show group members blogs

  • @thecorkboard

    Participant

    Hey there-
    I need to modify the group members listing to also include each member’s blog title and URL.

    So far I’ve digged into the blogs-loop.php to see how it’s getting all of this for the blogs directory, but it seems pretty specific to the directory and not at all able to be worked into the group information.

    I’m hacking around in BP-Default theme fwiw.

    Thanks,
    ~Kyle~

Viewing 5 replies - 1 through 5 (of 5 total)
  • @nuprn1

    Participant

    just a general theory

    what about hooking on the action “bp_directory_members_item” in members-loop template

    then within that hooked function – call “bp_blogs_get_blogs” (see bp-blogs.php line 279) which accepts a few arg params (user_id, per_page,page – but set those to so you do not paginate) Use the templatetag bp_get_member_user_id() for the user_id

    “bp_blogs_get_blogs” will return an array( ‘blogs’ => $paged_blogs, ‘total’ => $total_blogs ) – $paged_blogs is the direct result from the mysql query though. Have a look at bp-blogs-classes.php and the ::get function for the column names (domain, path, name, description). You may need to reference bp-blogs-templatetags.php as the blog_permalink is built depending on if the domain is empty

    though the only drawback is for each user in the member-loop – this will perform a bunch of extra queries just to find the blog info.

    @thecorkboard

    Participant

    rich-
    a theory is much better than what I had… crap. :)

    I figured I’d have to hook into something but didn’t know in what order to do things. I’ll try it out later sometime and report back.

    Thanks,
    ~Kyle~

    @djpaul

    Keymaster

    Yeah, I was hesitant to suggest that without some thought as it’s going to be quite database heavy (even though the BuddyPress blogs table does aggregate this information for you).

    @thecorkboard

    Participant

    So, I read through all of this and tried to piece it together. I get the theory but I can’t write it to make it work.

    I’m trying but I’m not really getting anywhere. If you’ve got a spare second, I’d love to see an example and dissect some of your code.

    Thanks,
    ~Kyle~

    @nuprn1

    Participant

    ok, if you can wait until the weekend ( some non-computer priority stuff right now :P ) – i’ll give it a go at coding up a solution

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show group members blogs’ is closed to new replies.
Skip to toolbar