This topic has 34 replies, 6 voices, and was last updated 8 years by sharmstr.

  • Author
  • #12995
     sharmstr
    Moderator

    Here’s another hack I did for Kleo. “Plugin to add a new BuddyPress profile menu called ‘Posts’ if member is an author. When clicked on, it will display a list of categories and the associated posts using Kleo’s masonry format.”

    https://github.com/colabsadmin/Kleo-Hacks/tree/master/BuddyPress-Posts-In-Profile

    https://31.media.tumblr.com/26c062e912bc80412e60cf82583d25c3/tumblr_n2opxlSKwW1squolvo1_500.jpg

    THIS IS NOT SUPPORTED BY THE KLEO TEAM. DO NOT BUG THEM ABOUT IT.

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #13178
     Abe
    Keymaster

    That is really nice. We might just add it as a theme functionality in the future

    Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #13293
     Kieran
    Participant

    Very nice indeed

    #19504
     kcurlsjr
    Participant

    @sharmstr That’s pretty sweet.

    Think it would be too difficult for me to mod it to do something similar for BuddyPress groups, but instead of post authors it would use tags?

    Or perhaps anyone knows of an existing solution.

    #19864
     Abe
    Keymaster

    you need to look at @sharmstr code and adapt the queries to march your needs.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #27792
     sharmstr
    Moderator

    @sharmstr, I would to ask a questions about your mypost plugin. Can you please tell me which parts I need to comment for making it work not only for authors, for all levels?


    @splendor

    line 33. this bit

    COPY CODE
    
    
    if (get_the_author_meta( 'user_level', $bp->displayed_user->id ) == 2) {
    
    

    If you want to show for all user levels, you can remove lines 32, 33 and 43.

    If I remember correctly, the code on gitHub will display the post in a mansory grid, but it doen’t apply all of the kleo styling like on a blog page. Let me know if that’s the case and I’ll figure out how I did it and update it.

    Actually, I was planing on updating the entire plugin soon, maybe I’ll do that now. I can probably add an admin section to allow admins to choose the minimum user level.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #27795
     sharmstr
    Moderator

    Oh. and I just remembered why I used ‘user_level’ instead of ‘user_can’ which is normally used. I wanted it to display only for authors specifically. Not for admins, or editors and such.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #27797
     Splendor
    Participant

    Yes, I also remember something like this..Thanks for answering my question. Great idea with the admin section by the way..

    #27860
     Splendor
    Participant

    @sharmstr it seams that plugin have a problem, the older published posts are not showing up but if I publish one now, it shows up. What do you think the problem could be?

    #27869
     sharmstr
    Moderator

    The entire plugin is based off of Display Posts Shortcode: http://www.billerickson.net/shortcode-to-display-posts/

    Here is a list of all possible attributes. I’m only sending ‘category’ and ‘author’, plus a custom one to load the ‘page-parts/post-content-masonry’ template.

    COPY CODE
    
    
    $atts = shortcode_atts( array(
    		'title'              => '',
    		'author'              => '',
    		'category'            => '',
    		'date_format'         => '(n/j/Y)',
    		'display_posts_off'   => false,
    		'exclude_current'     => false,
    		'id'                  => false,
    		'ignore_sticky_posts' => false,
    		'image_size'          => false,
    		'include_title'       => true,
    		'include_author'      => false,
    		'include_content'     => false,
    		'include_date'        => false,
    		'include_excerpt'     => false,
    		'meta_key'            => '',
    		'meta_value'          => '',
    		'no_posts_message'    => '',
    		'offset'              => 0,
    		'order'               => 'DESC',
    		'orderby'             => 'date',
    		'post_parent'         => false,
    		'post_status'         => 'publish',
    		'post_type'           => 'post',
    		'posts_per_page'      => '10',
    		'tag'                 => '',
    		'tax_operator'        => 'IN',
    		'tax_term'            => false,
    		'taxonomy'            => false,
    		'wrapper'             => 'ul',
    		'wrapper_class'       => 'display-posts-listing',
    		'wrapper_id'          => false,
    		'template'			  => false	
    	), $atts, 'display-posts' );
    
    

    Is it only showing a specific number of posts? Or the masonry auto load isnt working? Or something else?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #27870
     Splendor
    Participant

    Everything works besides the older posts.. Can it be that it doesn’t like category hierarchy or post format?

    #27871
     Splendor
    Participant

    ahh.. it’s fetching my own post still..

    #27872
     Splendor
    Participant

    All I want to display all post for all the users.. Not by author..

    #27873
     sharmstr
    Moderator

    I’m confused. The plugin shows all posts published by the member that your viewing. The author attribute is needed in order to do this. If you want all posts by all users basically you’re wanting to show the sites blog in every users profile. Is that what you’re trying to do? If so, then remove the author attribute on line 101

    COPY CODE
    
    echo do_shortcode('[bp-posts-in-profile category="'.$category.'" author="'.bp_core_get_username($bp->displayed_user->id).'"]'); // Displays a shortcode output.
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #27875
     Splendor
    Participant

    Yes,I commented //line 138 and 130 and that worked..but I will comment line 101 also.

    #28028
     Splendor
    Participant

    @sharmstr i saw that recently that the plugin doesn’t have pagination, do you have any plan for add it or you can just point in the right direction and I’ll figure it out. You are popular guy..hehe..sorry..

    #28033
     sharmstr
    Moderator

    Hmmm. My site is still in testing phase and I dont have a ton of posts so I guess I hadn’t thought of that yet or at least wasnt aware that it was an issue. You might try adding kleo_pagination(); after the endwhile in bp_show_posts_shortcode. Like I said before, I’m using a new version of the plugin so its hard to help you with the old code on my github. And before you ask… No, you cant have the new version yet. Its not ready.

    Also, I’m not a guy.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #28034
     Splendor
    Participant

    OOOhh…Thank you popular girl! 🙂

    #28102
     sharmstr
    Moderator

    @splendor Here’s what the developer has said about pagination: https://github.com/billerickson/display-posts-shortcode/issues/7

    He’s been asked about it several times and he is strongly opposed to it.

    By default it will return the 10 most recent posts. He does have an attribute to change that. So what I’ll probably do is set it to the value set in wp-admn ->settings ->reading ->blog pages show at most. At the end I’ll display a link to the standard wp author page /author/membername. I realize that this doesnt quite fit for you since you’re displaying all posts by all users (still confused as to why you want to do that in a member page), but you should be able to edit the link to point to your blog.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #28112
     Splendor
    Participant

    @sharmstr, I can explain, it seems that a lot people want the information very close to the navigation tabs instead going to the menu and click a page link. As everything else, for example groups tab, shows below the tabs the groups, forums tabs shows below the tabs the forums etc etc. It’s a behaviour that arises when using this theme and buddypress. So that’s why a thought of pagination if it’s a a good solution, I could add it so they have the blog very near.But thanks for the information, a will add link instead to the blog at the bottom.

    1. Simplest solution to this are by either adding tabs with a link to the page, the helps to get rid of the extra step to navigate to a page

    2. Adding a tab with embedded page that show below the tab

    3. Fetching information from different plugins and post in different tabs

    Do you understand me now?

    #28118
     sharmstr
    Moderator

    I have a better understanding now, thank you. But those ‘groups’ and ‘forums’ tabs are specific to that member. When you’re viewing a members profile and you click on “groups” you dont see all the groups on the site. You only see what groups that member is participating in. Same goes for Forums.

    Please understand I’m not arguing. I really have no issue with what you’re doing. 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #28119
     Splendor
    Participant

    Could be nice to add a new subnav with read more articles linked to the blog and forget about the pagination all together..

    #28120
     sharmstr
    Moderator

    I just had a thought. If you want to create a dashboard for users, you could probably display different menu items depending on if the user is looking at their own profile or someone else’s. So, if I’m looking at my own profile, instead of seeing “My Posts”, I’d see “Recent Blog” or something like that.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #28133
     Splendor
    Participant

    Yes, I understand that @sharmstr that the groups/forums are individually. But when it comes to posts I see more general view. But I think it’s great also defined by author. But we have only have one author hahaha..for now.

    I have already change you code to Recent Articles adding a subnav with read more articles link.

    #28134
     sharmstr
    Moderator

    That makes more sense now in my little brain. 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #28157
     sharmstr
    Moderator

    I’ve updated the plugin and moved it to its own github repo: https://github.com/colabsadmin/bp-posts-in-profile

    (@splendor, I dont see any reason why you should use the new version of the plugin. Mainly I’ve only turned the code into a class and added the posts_per_page=”‘.get_option(‘posts_per_page’) code. )

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #28169
     Splendor
    Participant

    ok, Very nice work @sharmstr. Looking to forward your progress in the the profile/group cover and your real-time username password plugin. Right know I’m checking out a groups moderation flag plugin, for flagging posts. https://wordpress.org/plugins/bp-moderation/ seems outdated. My site is launched, but I’m in “final beta” but it feels that it never gets finished. Always something new to add hehe.. and I don’t want add more but I must.. 🙂

    #38544
     sharmstr
    Moderator

    I’ve updated this plugin so it now displays the view switcher (if enabled). As such, it now supports displaying the posts in Masonry, Small and Standard formats.

    https://github.com/colabsadmin/bp-posts-in-profile

    (@splendor, remember to redo your customizations)

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #38639
     Splendor
    Participant

    Great @sharmstr , I’ll check this out. Yeah, do I remember those customization? I’m reading the whole thread.. hmm.. hehe..

    #38648
     sharmstr
    Moderator

    Cool. Let me know if it works 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #40719
     Splendor
    Participant

    @sharmstr, it works pretty nice. You have done some changes. One thing I’m thinking of, would that be possible that it only show, we say the first 6 articles and then icon with show all below. Right now for me it shows all the posts and after the icon with show all. But is that dependent of the blog settings? So if we say, I have 30 posts, but I have set pagination after 10 posts. Would it affect the plugin?

    #40721
     sharmstr
    Moderator

    @splendor – there’s an option for that. look at the options in the thirdparty/display-posts-shortcode.php

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #40725
     Splendor
    Participant

    Oki, thanks! I’ll check that out @sharmstr 🙂

    #68175
     Julian
    Participant

    Seems this plugin no longer works with the new Kleo version…
    Got an idea?

    #68188
     sharmstr
    Moderator

    No. I’m not using it anymore so I havent updated it nor do I plan to.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 35 posts - 1 through 35 (of 35 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?