BuddyDev

Search

[Resolved] buddyBlog bp_current_component() == 'buddyblog'

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #17264

    hi Brajesh,

    I have an issue of a mis-match between plugins. In buddyBlog the code question bp_current_component() returns ‘buddyblog’, which is probably correct. In WPSSO the question is differentiated between their -Free and their -Pro versions to return a different URL in each case.

    What they do, is to check the return value of bp_current_component() and if it’s true then they return an *activity* URL, which would be wrong in this case. I’m still discussing this with them, but can you think of a practical way to maybe intercept the call and return false *in this case*?

    I’m not convinced this is the correct long-term solution, and am still looking into the details, but wanted to run this past you for your opinion.

    R.

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #17271

    Hi Richard,

    I am sorry but I am unable to understand the question.

    bp_current_component() will return a slug that identifies current component. If you are on user’s profile blog page, It will give you ‘buddyblog’, if you are on user’s groups page it is “groups” and so on.

    As a plugin developer, we only register a component, BuddyPress handles what will be the current component and other information.

    If you can explain me the issue, I may be able to help with it.

    Thank yopu
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #17273

    hi Brajesh,

    I understand it’s not simple to understand 🙂 There is a ticket, for the WPSSO plugin, which I have opened and may help with clarifying what the issue is.

    http://support.surniaulula.com/support/tickets/4684

    Essentially, WPSSO *assumes* that if an item is a component therefore it is also an activity. I think this assumption is wrong. For instance a member is a component, but a member is not an activity. It is the same with the buddyBlog, I think, as imho. buddyBlog is a component but not an activity. Their logic seems to be:

    
    if component {
      therefore activity 
    }
    

    I think it should be:

    
    if component {
      may be activity
    }
    

    The problem is with WPSSO-RRSSB-Free which displays buddyBlog share links in the free version, (which does not support buddyPress). and WPSSO-RRSSB-Pro which does NOT display buddyBlog share links, (and does support buddyPress). It’s weird, I know 🙂

    R.

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #17292

    hi Brajesh,

    a question, might it be possible to assign a unique post_type to buddyBlog posts, so people can program against it cleanly?

    R.

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #17295

    Hi Richard,

    You can retrieve the post type being used by

    
    
    $post_type = buddyblog_get_posttype();
    

    It returns the post type being used/assigned to BuddyBlog.

    Hope that helps.

    Brajesh

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #17297

    yes, but I think that’s just “post_type=post”, which is fine, but doesn’t help us identify buddyblog itself 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #17304

    Hi Richard,
    you are right about it.

    I am still not sure of the issue. A post is a post whether it comes from BuddyBlog or anything else that should not matter.

    Also, what do you need to uniquely identify? Can you please help me understand again.

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #17311

    hi Brajesh,

    I agree with you, that a post is a post is a post. The WPSSO plugin author originally saw that slightly differently. The issue is to simply identify whether the post is a blog post, or something else under the buddyPress umbrella.

    However, the WPSSO plugin author appears to be helpfully working with me on this issue, so perhaps I should not waste your time, at this time, on this issue. Closing for now.

    R.

You must be logged in to reply to this topic.

This topic is: resolved