Group Mods

  • Profile picture of Hugo
  • Profile picture of r-a-y
  • Profile picture of @mercime

bpContents 1.0 Alpha 1 – Member, Group and Blog Tagging for BuddyPress (26 posts)

Started 3 years ago by: Burt Adsit

  • Profile picture of Burt Adsit Burt Adsit said 3 years ago:

    bpContents 1.0 alpha 1

    Requirements
    ————————
    WordPress MU 2.7.1
    BuddyPress 1.0

    Demo at: http://ourcommoninterest.org/

    Description
    ————————
    bpContents is a sitewide content aggregation and organization tool for BuddyPress.

    Features
    ————————
    Member, Group and Blog tagging.

    Custom Member, Group and Blog directories. Standard WordPress tag cloud widgets and tag cloud template tags for Members, Groups and Blogs. Enhancements to the member theme by creating a new BP component.

    Member Tags:
    ————————
    Each BuddyPress user can create profile tags that represent their interests. Visit My Account > Tags > Edit to create individual user tags. Enter a comma separated list of tags.

    Member profiles have been extended to include their individual tags with a user tag cloud visible in each user’s profile – My Account > Profile. A tag cloud is visible in the option’s bar that represents that particular user’s tags.

    The BP Member directory has been extended to include a site wide member tag cloud. Selecting a tag from the site wide cloud, displays all members with a similar tag in the directory. The directory functions as a normal member directory with letter selection and search active. The default BP directory was hijacked with one of Andy’s filters and the directory in /oci-contents/directories/members is displayed instead. The new tagging features in the directory were implemented by extending the default member template class and creating a new oci_has_site_members() template tag to fire up the extended template class.

    A widget for sitewide Member Tags is distributed with bpContents. Activate it in the normal sidebar widget fashion through the wp back end Appearance > Widgets > Member Tags. The wp widget directs tag clicks to the bp member directory.

    Group Tags:
    ————————
    Each BP Group can create individual tags to allow easier discovery. Any Group admin or moderator can create group tags by going to the group home page Groups > My Group > Tags.

    The Group home has been extended with an individual group tag cloud visible in a similar place as the Member tags in the profile. Groups > My Group > Home.

    The Group directory has been enhanced the same way as the Member directory.

    A widget for sitewide Group Tags is distributed.

    Blog Tags:
    ————————
    Each blog in a wpmu installation can be tagged through the blog’s Blog Tags widget. Visit Appearance > Widgets > Blog Tags.

    There is an additional option in the Blog Tags widget for tags. Enter a comma seperated list of tag names to tag each individual blog. You do not have to actively display each blog’s Blog Tag widget. However you must use the blog widget on each blog at least once to create the tags for that blog. You can then uninstal the widget if you prefer not to display it. You just have to get those tags in there once by using it once and saving the widget. If you are not actively displaying a blog’s tag widget you’ll have to activate it temporarily to change the blog tags.

    The BP Blog directory has been hijacked like the other directories. It displays a sitewide blog tag cloud and it functions as a normal directory also.

    Installation:
    ————————
    1) unzip the bpcontents.zip file into /wp-contents/plugins/oci-contents

    2) Copy the template directory /wp-content/plugins/oci-contents/oci-contents to the member theme directory:

    /wp-content/bp-themes/bpmember/oci-content

    That directory should be at the same level as /bpmember/groups and /bpmember/profile etc..

    2) activate the plugin site wide

    Activating the plugin creates four new tables in the wpmu db.

    oci_tree
    oci_terms
    oci_items
    oci_tree_meta

    Have fun, be good. ~ Burt

    Download link available at the bottom of this:

    http://code.ourcommoninterest.org/2009/05/25/bpcontents-10-alpha-1-member-group-and-blog-tagging-for-buddypress/

    P.S. If you were running bpContents 0.1x Dev Sneak Peek previously, drop all the oci_ tables and then activate 1.0 Alpha 1.

  • Profile picture of Manoj Kumar talk2manoj said 3 years ago:

    Hi Burt,

    This seems amazing! looking forward to use the same.

    Can we use this along with our custom developed component?

    Thanks

  • Profile picture of Burt Adsit Burt Adsit said 3 years ago:

    I’m not sure what you mean Manoj. It will work with other bp custom plugins yes. Is it going to be enhanced to allow you to use it in your own components. Yes also.

  • Profile picture of Manoj Kumar talk2manoj said 3 years ago:

    Thanks for the quick answer. Yes, I want to use it in my own component.

  • Profile picture of Manoj Kumar talk2manoj said 3 years ago:

    When I add tag in Group its says

    string 'http://domain.com/groups/admin-group-name/edit' (length=49)

  • Profile picture of Roger Coathup Roger Coathup said 3 years ago:

    Hi Burt,

    this looks excellent for a new project we have starting.

    Is there any way of restricting the tags that can be applied? i.e. the administrator / developer defines the list of allowed tags, and the member has to chose tags from that list.

    Members on the new project will be businesses, and we want to be able to categorise them, i.e. as Accountants, Restaurant, Newsagent, Bank, etc. We have about 20 categories in total.

    Cheers,
    Roger

  • Profile picture of Burt Adsit Burt Adsit said 3 years ago:

    @manoj, never seen that. You running wpmu 2.7.1, bp 1.0 and bpc is installed properly?

  • Profile picture of Burt Adsit Burt Adsit said 3 years ago:

    @roger, this version works just like wp’s tag system. No restrictions. It is possible to do what you are talking about. It would take some custom programming to do so. I’m not going to document this for programmers yet. After things are stable with this project I will.

    However, it is intended as a tool for site admins and programmers to use. I’m trying to get the core stable in all environments first. This release is intended to do that. When it gets to beta I’ll document the core and the template tags. This purpose of this version is to get something useful out there. Knock a couple of features off Andy’s wish list for bp 1.x.

    This is an end user version at the moment.

  • Profile picture of Roger Coathup Roger Coathup said 3 years ago:

    @burt, thanks for the quick response

    I’ll hopefully get it downloaded this week, and running on a site we already have out there… speed up the testing for you!

    Cheers,
    Roger

  • Profile picture of Roy McKenzie Roy McKenzie said 3 years ago:

    Received this error when posting a new tag to a group as admin:

    <br />
    string(60) "http://modestobuzz.com/groups/modesto-area-disk-golfers/edit"<br />
    Warning: Cannot modify header information - headers already sent by (output started at /home/chedstone/webapps/modbuzz/wp-content/plugins/oci-contents/oci-contents.php:292) in /home/chedstone/webapps/modbuzz/wp-includes/pluggable.php on line 856<br />

    Blank page with the above text on it. The tag was still added though.

    Running BP 1.0 and WPMU 2.7.1

  • Profile picture of Burt Adsit Burt Adsit said 3 years ago:

    Everybody posting problems please state your bp version, wpmu version. Maybe a link to the site with the issue would help. This is successfully running on the demo site http://ourcommoninterest.org/ using WPMU 2.7.1, BP 1.0 and also under Windows.

  • Profile picture of Andy Peatling Andy Peatling said 3 years ago:

    oci-contents.php line 292 there is var_dump() call that is causing the problems above.

  • Profile picture of Burt Adsit Burt Adsit said 3 years ago:

    Ha! Yep. Andy is right. Delete that line and things should work alot better. Oops. Fixing the download. Thanks Andy.

    3000+ lines of code and one var_dump() included for free.

  • Profile picture of Burt Adsit Burt Adsit said 3 years ago:

    Oh. Before anyone publicly complains, no, there isn’t any pagination included in alpha 1′s directories. I’m totally ignoring it on purpose. All the code is there ready to take advantage of it but I purposely didn’t implement it.

    bpc uses a mechanism called Modifed Pre-Order Tree Traversal (MPTT) that was specifically designed to track tree like structures in SQL tables. I need to find out if that part of the core is working properly. I had no intention of introducing another complexity down at the SQL level right now. As far as I can tell the MPTT implementation is stable.

    I swore I wasn’t gonna document this for programmers yet but I guess it wouldn’t hurt to talk about MPTT now.

    When you look at the properties for a node, in the class OCI_Node, you’ll notice two vars $this->lft and $this->rgt. These are MPTT specfic vars that represent the parent/child relationships of all nodes in the tree. . See these for info about MPTT:

    http://www.sitepoint.com/article/hierarchical-data-database/
    http://dev.mysql.com/tech-resources/articles/hierarchical-data.html

    http://www.dbmsmag.com/9604d06.html

    A simple node insert operation in the tree has a good chance of changing 50% of the lft/rgt values in the entire tree.

    Any sql operation that changes these values must:

    1) lock the table
    2) get the node and it’s valid lft/rgt values
    3) do the operation
    4) unlock the tree

    The only reliable property for a node in the tree is the $this->id which is the record id in the table.

    The boys and girls at wp are investigating MPTT right now for a future version of wp. I can’t wait around until they get to that so I’ve implemented this in bpc. It’s a natural for this kind of project and has many advantages.

  • Profile picture of John James Jacoby John James Jacoby said 3 years ago:

    Good job Burt!