Skip to:
Content
Pages
Categories
Search
Top
Bottom

Filtering Activity Loop with Meta Values


  • danbrellis
    Participant

    @danbrellis

    I am developing a way for group mods to moderate activity on the group. So I’ve set new activity posts to have a meta key of ‘status’ and value of either publish or pending.

    What I am having trouble with is:
    1) excluding the ‘pending’ activities from the normal loop that group users and site users would see
    2) providing the group mod a link to view those activities which are awaiting approval (i.e. meta value pending)

    I think I’m suppose to use the bp_ajax_querystring filter, but I don’t see a way to specify the meta data.

    Any help would be amazing and very appreciated.

    Thanks!

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

  • Ross Wintle
    Participant

    @magicroundabout

    Hi Dan, I want to do this too and can’t see a way. Did you ever get an answer or figure it out?


    abysshorror
    Member

    @abysshorror

    Me too


    danbrellis
    Participant

    @danbrellis

    @abysshorror & @magicroundabout
    I almost have it down, but I’m still working on it. I am developing it as a plugin of sorts, though I never planned on releasing it, so it’s not entirely compatible all around. I can send you both what I’ve got so far and I’d love to collaborate with either of you to turn this into a real plugin.

    Basically, I set up a value for groups to see if the group should be moderated, then if they are moderated all new posts get the meta value of pending. I then filter the activity stream to exclude activities which have that meta value, unless it’s an admin, in which case they get a link to approve it.

    All is pretty well, though I’m still struggling with filtering the activity in the most efficient way. You can download what I’m working on here: http://pastebin.com/239ZjLLq. You can also add this to style posts that need to be moderated.

    `.activity-list li.pending {
    background-color: #FF9;
    }
    .activity-list li.pending .moderation {
    float: right;
    }`

    Remember, it’s a work in progress and may not work out of the box on your install. I’ll answer any questions if I can though. Like I said, I’d really like to collaborate and make this a useful plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filtering Activity Loop with Meta Values’ is closed to new replies.
Skip to toolbar