Using BuddyPress for Social Networks

Plugin – BP Profile Shortcodes Extra

Plugin – BP Profile Shortcodes Extra

https://wordpress.org/plugins/bp-profile-shortcodes-extra

BP Profile Shortcodes is a fork of BuddyPress Profile Shortcodes, there were a number of bugs and deprecation notices affecting that plugin and it had not kept up to date with new BP features such as cover-images. I’ve felt for a long time that this plugin missed a number of key features, so I decided to fork it. I did offer my code to the plugin developers but I’ve not had a response and after a month of waiting I decided to released my forcked version as a new plugin in the Repo.

BP Profile Shortcodes Extra maintains the features introduced in the original plugin, it provides shortcodes to display the username, display name, profile url, avatar photo etc. but in addition it provides the ability to display the users cover image, the profile header and lists of the users friends and group memberships.

I also decided to add a similar set of features for groups, so now you can display links to group pages, the group avatar, cover image and header and also list the group members.

I can see me adding quite a few more features to this plugin as what I really want to provide is a flaxible way to all site admin to create member dashboards etc, basically an alternative to heavy theme customisation in order to provide members pages that display the right information.

The complete feature set is as follows:

Member Profile Shortcodes

* Display Name – As text or a link to the members profile page.

* Username – As text or a link to the members profile page.

* Avatar or Profile Image – As an image, url or link to the members profile homepage.

* Cover Image – As an image, url or with a link to the members profile homepage.

* Profile Header – A collection of cover image, avatar and @username, with the username being a link to that members profile.

* Profile Fields – You can display information from any of the profiles Xprofile fields.

* Profile Edit link – link the the users edit profile page

* Profile Lists – provide friends and groups lists – Three list styles – List, avatar grid and avatar list. Group lists support group memberships, groups created and groups administered by the user.

* If no user_id is specified in the shortcode, the details of the member viewing that page will be displayed.

Group Shortcodes

* Group Links – provide links to any group page (home, activity, forum etc.

* Group Avatar Image – as an image or lnk to the group homepage

* Group Cover-Image – as an image or a link to the group homepage

* Group Header – including cover-image, avatar and group name with link to group homepage.

* Group Member List – three different list styles – text list, avatar grid and avatar list.

* Group ID must be specified as either the Group Id or the Group slug.

BP Profile Shortcodes Extra fills a gap where site members need to display profile or group information in posts, more advanced users could use it as a basis to create custom dashboard pages for users, a single page can be created and added to the users navbar in order to fully integrate the shortcode functionality with existing BuddyPress pages.

I’m open to further suggestions as to how to further develop this plugin. I’ve already got a god list of possible developments but I’d really appreciate some user feedback. I’ve added a lot of custom CSS attributes to help you style these page elements and it would be really good to see how this works in practice.

 

    • James on April 17, 2018 at 6:14 pm

    Reply

    This plugin is amazing.
    I am new to webpage design and I am having an issue with the style attribute in the shortcode. I am wanting to add a 5px solid border with a radius of 25px around a users avatar by adding the style option to the shortcode [bpps_profile_avatar_url]. Is this possible via the shortcode style option?

      • Venutius on April 17, 2018 at 6:37 pm
      • Author

      Reply

      Hi James,

      Yes you can simply add style=”border-radius: 25px;” etc. to the shortcode and it should work.

      • Venutius on April 27, 2018 at 1:12 pm
      • Author

      Reply

      That’s interesting, I’ll do some testing later and make sure this is working correctly, I’ll get back to you.

    • Matt on April 27, 2018 at 7:41 am

    Reply

    Hi,
    Awesome and very useful plugin, great job!

    I’m having a problem with getting [bpps_profile_field field=”fieldname” tab=”section”] to work.
    I keep getting “The tab name is invalid” error. Would you be able to provide some detailed instructions or examples please?
    I really appreciate your help

      • Venutius on April 27, 2018 at 8:07 am
      • Author

      Reply

      Hi Matt, thanks for giving the plugin a try. the tab=”” setting would need to reflect the field group that you are trying to pull the data from, the default tab used by BP is “Base”, so if you wanted to pull the Name field from there you would enter [bpps_profile_field field=”Name” tab=”Base” ].

      Hope that helps.

        • Matt on April 27, 2018 at 12:26 pm

        Reply

        Thank you for your quick reply!

        That’s exactly what I’ve done before reaching out to you ( I think) and it didn’t work.
        Just so we are on the same page: I am trying to display fields from Users/Profile Fields.
        I’ve created a number of field groups in there. Each group has a number of fields also.
        For example I have a field group called “Availability” and field called “Days”.
        I’ve tried the following shortcode: [bpps_profile_field field=”Days” tab=”Availability” ]. It resulted in “The tab name is invalid” being shown.

        Please advise if I’m doing something wrong, cheers.

          • Venutius on April 28, 2018 at 10:19 am
          • Author

          Reply

          Hi Matt,

          I tested this and the shortcode works for me, I tested it with both the Base tab and another tab I created called More Info, I was able to select and display info from fields in both tabs. I can’t see what you are doing wrong but somewhere you must be – maybe check the tab name that you are using? Maybe as a first tst you should see if you can get the Name from Base?

            • Matt on April 30, 2018 at 1:58 am

            Thanks for the help.

            The only shortcode that works for me is : [bpps_profile_displayname]
            I can’t get Name from Base. My Primary Field Group is called “Personal”, I’ve tried that and it doesn’t work either.
            Could you maybe email me directly and I’d send you some screenshots if that helps?

            Thanks so much

            • Venutius on April 30, 2018 at 8:12 am
            • Author

            Hi Matt, As requested I’ll email you directly.

    • V Kecman on June 29, 2018 at 11:25 am

    Reply

    After adding some shortcodes to the page, we get these errors (see below).
    What went wrong? I can provide complete error info.

    Warning: Illegal string offset ‘option’ in …

    Warning: Illegal string offset ‘option’ in…

    Fatal error: Uncaught Error: Call to undefined function bp_get_messages_slug() in …

      • Venutius on June 29, 2018 at 11:44 am
      • Author

      Reply

      Sorry to hear about the errors, can you let me know which shortcodes you were using?

      • Venutius on June 29, 2018 at 11:49 am
      • Author

      Reply

      This error “Fatal error: Uncaught Error: Call to undefined function bp_get_messages_slug() in …” points to some other problem on your system, I’ve checked and this BuddyPress function should be there in the current version of BuddyPress, so if you are getting this error them either BP is not loading correctly or you do not have messaging enabled.

      • Venutius on June 29, 2018 at 11:51 am
      • Author

      Reply

      Also, my plugin does not use the offset ‘option’ so I’m unclear how it could be causing this error.

    • Nathan on August 20, 2018 at 11:27 pm

    Reply

    Hey Venutius,

    I keep getting “The Tab Name Is Invalid” or “The Field Name Is Invalid” even when I follow your trouble shooting steps and use base and name.

      • Venutius on August 21, 2018 at 4:12 pm
      • Author

      Reply

      Hi Nathan,

      Sorry to hear you are having issues, I can’t replicate your issue, in that I can request the Name field from the Base tab and it displays the users name as expected. Not sure what to suggest.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.