Idea: "Trust" module

Events happening in the community are now at Drupal community events on www.drupal.org.
icecreamyou's picture

I'm building/have built a social networking site, and coming across Twine made me realize that it would be nice to build some kind of "Trust" module, where users could specify what level of trust they attribute to others, and this trust level would affect how content shows up and is organized.

Trust Levels

Specifically, I'm thinking of 5 levels of trust:
* Always Hide - Essentially equivalent to "block user," this would make it so the blocker doesn't see any content from the blocked user
* Collapse - Instead of completely hiding the blocked user's content, the content is replaced with a link labeled something like "Show [blocked user]'s Post." This link could appear in two places: (A) in the place the post would otherwise have appeared, and when clicked on would reveal the original post with AHAH/AJAX/JS (degradable to an HTML-based page-reload); (B) at the top or bottom of the page, to show/hide all blocked posts on the page for either (1) one or more users chosen from a list or (2) all blocked users.
* Conditional Hide - Will behave like option one, except that the blocker can set options for when the blocked user's content appears. For example, the blocker could set it so he doesn't see any blog posts from the blocked user.
* Approve User - the default. Make it so all user's content shows up normally.
* Trust User - the real power of this module. Would arrange content (probably in a separate part of the site) in a knowledge network, displaying only information from trusted users. This would probably be arranged based on a taxonomy built for the purpose; users could also add their own "connections" between nodes based on their own, customizable taxonomy so they could organize content however they wanted. The idea is for users to end up with filtered views (not literally from views.module, although that's a possibility) of content that they're (A) interested in and (B) think is well-written or otherwise valuable.

Conditional Hide

For the Conditional Hide option, the following conditions could exist:
* Content Type - filter what is hidden by what content type it is, i.e. 'hide all blog posts from user A'
* Taxonomy Term - since much of the Trust Network would be built around taxonomies/categories, users could hide information from certain users that was posted into a certain taxonomy (this would include forums--at least in D5, I'm not sure how that works in D6)
* Individual Nodes - filter individual nodes (a lower priority feature)
* Responses to another user - hide all comments for User A if the comments are on content posted by User B
* Posts in Organic Groups

Each of these options would also need a "not" option -- that is, users should be able to say "hide all posts from user A that are not blog posts," not just "hide all blog posts from user A."

Choosing Trust Levels

The Trust Levels could be chosen by the users in one of these ways:
* Profile - the configuration could appear on each user's Profile page (if profile.module is enabled) or Profile node (if Usernode and/or NodeProfile is enabled)
* Content - configuration could appear on content-viewing pages
* List - a separate page would have a list of users with Trust/block settings

Choosing Trust Levels could occur via:

  • Link - A link to configuration page
  • List Menus - Series of drop-down lists
  • Block - a block containing the config options

Configuration for trust levels would have to allow choosing:

  • The blocked/trusted user
  • Trust Level
  • Conditions/types for each Trust Level if applicable

These abilities would also have to exist:

  • Each of the options specified above would have to be toggle-able by the admin
  • Each would have to have permissions associated with it
  • Special permissions: view all Trust Networks, view own Trust Network, Edit all Trust Networks, Edit own Trust Network
  • Some sort of Favorites/Bookmarking tool; ideally, we could integrate with a module or modules that already exist.
  • Blocks displaying user- and admin-customizable parts of the Trust Network
  • Views integration - fields, filters, arguments, sorting
  • Allow admin to re-name terms like "Trust Network," "Trust Relationship," etc.

...

So: thoughts? Is anyone interested in coding this? I'm basically just starting with PHP so this is a pretty ridiculously ambitious project for me to start out with, but I'm willing to help as much as I can if someone will agree to build the main structure.

Comments

spadkins's picture

Hi,

Great idea.
Perhaps it could also implement the notion of "transitive trust".
i.e. I trust whoever Joe trusts.

Perhaps also it could be integrated with VotingAPI so that people's votes whom you trust count
more than people's votes whom you don't trust.

Stephen

P.S. I think this would be a great module for inclusion in the Drupit project.
http://groups.drupal.org/node/7968

just wanted to add

KerrySanto's picture

I think the module idea is fantastic and I just wanted to add my thoughts about the transitive trust, after using so many networks over the past years, I have witnessed that being used against people in a negative and abusive way, so I would be a bit dubious about having "I trust whoever Joe trusts" as it only takes one instance of dodgy behaviour of a trusted person in a network to throw the whole trust issue into question. I just recently started to build my own network site as I found the ones out there didnt really fit with what I wanted Just learning php myself so at the stage wouldnt be able to do any coding but would like to help out with the testing and feedback.

I like that

icecreamyou's picture

Good idea about transitive trust and Voting API. I know there are concerns with using that, so (like much of the functionality in this module) it should be possible for the admin to turn off this ability. Very likely it would exist as a contrib module.

I would be happy to see this as part of Drupit.

Developer?

icecreamyou's picture

Is there anyone interested in coding this? As I mentioned I'm basically just starting and so have no chance of doing this by myself.

RIght. Just edit your

moshe weitzman's picture

RIght. Just edit your original post so it also appears in that group.

greggles's picture

A lot of these concepts just sound like extensions to the various existing "buddylist" modules. Note that buddylist(2) is not the only relationship module we have for users. Here is the list of relationship modules that I know of for users:

http://drupal.org/project/buddylist
http://drupal.org/project/buddylist2
http://drupal.org/project/user_relationships
http://drupal.org/project/friend

So, there are quite a few options to base your ideas on. I think the goal of any work in this area should be to first evaluate the list of current modules, then decide on the best one, then extend that best one to do all the other fun things you need.

In my opinion, the last thing that Drupal needs need is "yet another trust network." Instead we need one or two clear winners which can be extended to include your features.

--
Open Prediction Markets | Drupal Dashboard

Modules

icecreamyou's picture

That sounds like a good idea to me.

I use Buddylist on my current social networking site (probably not the one where I'd implement this module...). It works fine but it required some creative argument handling with Views to get Friend-of-a-Friend functionality. In fact, Buddylist 2 was created (according to its project page) in order to create a more extensible--and separate--API. However, though I haven't used Buddylist 2 it seems rough and lacking in features to me. Friend was also created as something to use until Buddylist got ported to 6.x - as such, it's relatively simple and so not great for plugging another module into it.

That leaves User Relationships. I haven't actually used it but everything I've heard about it is very positive. It has an acceptable API and there's even documentation for it.

I agree about the whole "yet another" thing.

Thanks for your interest.

+1 on "one or two clear winners"...

Walt Esquivel's picture

I think the goal of any work in this area should be to first evaluate the list of current modules, then decide on the best one, then extend that best one to do all the other fun things you need.

Amen to that, brother! It can sometimes be tough trying to figure out the "best" contributed module in a specific area when we have half a dozen or more maintainers all trying to add their individualized "feature set" to their specific modules. I think that with a bit more collaboration, we could have fewer (but with richer features) modules vs. more (but too specialized) modules.

Basically, I'd prefer modules that are enhanced and robust enough to tackle a wider variety of tasks or quite simply be "best of breed" in their category. A good example is the plethora of WYSIWYG editors as described here: Comparision of Drupal 5 WYSIWYG Editors. I realize everyone is free to "scratch their own itch", but do we really need 12 WYSIWYG Editors? :)

That's why I'm so happy to see something like Drupal Modules arrive on the scene to help some of us make better decisions on selecting specific modules, especially in some of the "crowded" categories. :)

Anyway, back to the issue at hand. Here's a link to a poll on Buddylist vs. User relationships vs. Friend: Which module set is the best/most promising for building a social network on Drupal?.

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

I saw that poll too

icecreamyou's picture

I think more people use Buddylist than User Relationships, but that User Relationship is probably the more useful - and more importantly, more extensible - project.

I did implement the user relationships

KerrySanto's picture

on the new test site I did, but had to trash the lot and start again, I really did like it as it gave a degree more than just the connection between the two people. Will implement it again on the new test site I started and would like to see that expanded and maybe offer more, maybe in the way of activity between the user relationships on the site in terms of activity, ie private messages, comments to threads that happen on the site I haven't found out if this is done already so forgive me if it has.

I have never liked the friend of a friend function as I find a lot of people who are on sites and who fall out then end up messaging those friends of a friend with all sorts of stories and tales and have witnessed all out war starting which is not good for a site. I know you are discussing just the modules and functionality but I think you have to be aware of the human behaviour and psychology that goes with them

Take a look at Karma module,

develcuy's picture

Take a look at [http://drupal.org/project/karma|Karma] module, it implements a fivestar like widget with personalized labels for every rate. This module seems to be abandoned and your project can extend it, though.

Blessings!

--
(3 John 1:2) Dear friend, I pray that you may enjoy good health and that all may go well with you, even as your soul is getting along well.

--
[develCuy](http://steemit.com/@develcuy) on steemit

Karma

icecreamyou's picture

While I think there are other, better "Karma" modules out there, structuring the module using VotingAPI or similar would certainly help. Good idea.

IceCreamYou

SamRose's picture

It happens that I am evaluating developing user_relationships module to be extended with trust levels that apply to content pretty much as described by you. These additions would be released under open license.

User_relationships seems to be the most flexible, and useful for what you are describing (IMO).

I am still working on the specification, but I'd like the basic foundations to be re-usable outside of the payed project I am working on.

I think a lot of people are going to have unique local needs. For instance, my client wants the following levels:

    Self
    Friends(in network)
    Public

So it would server everyone to basically create a way to create as many levels as desired, name them what you want, give each level it's own access control that meets the requirements of that level. Then, users could create content and choose that level, based on relationship. It could be and should be a wholly separate access control that is based on relationship "role" presets.

It seems to me that existing Access Control code could possibly be rolled into a module that accomplishes this, and works with user_relationships. Advice from readers here would be appreciated, because I'd like to turn out something that works, and builds from existing and highly supported modules.

Sam Rose
Social Synergy
Open Source Ecology
P2P Foundation

Hey Sam, take a look at the

sprsquish's picture

Hey Sam, take a look at the most recent dev snapshot of UR. Node Access has been bundled in to it. It lets users set view/update/delete permissions on a per-node-per-relationship basis.

I see that! Kick ass! That

SamRose's picture

I see that! Kick ass! That is even better than what I was talking about, with update/delete idea.

sprsquish, thanks. If I add anything to this, I'll be sure to share it

Sam Rose
Social Synergy
Open Source Ecology
P2P Foundation

Sweet

icecreamyou's picture

I'm happy to hear that someone is working on this. I didn't really follow what you were saying about adding roles and access control - my original idea didn't involve placing users into roles, but maybe you're talking more about the Relationships that UR allows. I do think it's perfectly logical to turn Trust Levels into Relationships, and allow admin to create as many relationship levels as they want. All that would remain would be to figure out how to assign each Relationship the ability to block certain things, and then creating easy ways for users to manipulate their new Relationships.

It sounds like UR is moving in this direction anyway, though. I'll look into that - it sounds promising.

I haven't tested it, but

icecreamyou's picture

...this module might have some code that's worth looking at.

Trust and Relationships

SamRose's picture

IceCreamYou,

Yes, I think my discussion here was drifting a bit from what you were talking about originally. What I am working on is an application where people have already established access to information, and relationships based on trust. So, we're trying to emulate those relationships in a Drupal site.

Not yet at liberty to discuss a lot, but UR snapshot mentioned above seems to be doing what I need.

Sam Rose
Social Synergy
Open Source Ecology
P2P Foundation

What I want to do is

icecreamyou's picture

What I want to do is basically take the UR node-access that exists right now, and make it apply to all content that a specific user creates rather than just nodes. I'm not sure I totally understand what you're saying, but if you're working on something that lets people choose which content they see from other users, it's probably aligned in the direction I'm looking.

I guess it's kind of like the CRE (content recommendation engine module) except with a lot of user control. So instead of seeing all content and having blocks or pages with recommendations, you only see the recommendations.

IceCreamYou, Your idea is

SamRose's picture

IceCreamYou,

Your idea is awesome, actually, although different than mine. Looks like yours is a recommendation system that gives controls to the reader.

In the case of what i am talking about, it is giving the content creator control over who sees their creations, based on their stated relationships with others.

Your idea is much more interesting than the specification I am working on. Your concept of a recommendation system could actually be useful for another project I am working on. Please keep us informed of where you go with this, and consider me interested in helping to create, or test ideas. Thanks!

Sam Rose
Social Synergy
Open Source Ecology
P2P Foundation

Thanks. I'm totally

icecreamyou's picture

Thanks.

I'm totally incapable of doing this myself right now though. I plan to get into PHP way more this summer so depending on how difficult the code is I might consider this as a first big project. But until then--and more likely, until someone else picks this up as at least a mentor--there won't be any work on this.

If/when it does happen though, I'll be sure to get you in on it. :)

I'd like to humbly suggest

SamRose's picture

I'd like to humbly suggest that:

  • there are already some existing modules that have at least part of what you need (namely Voting API, and UR).
  • that we could extend those modules to get what you are looking for.

The idea you present here, at it's root, is similar to the simple http://twitter.com "follow/follow" protocol.

I think that it's possible that a "rating" could be implemented for users, which works with the http://drupal.org/project/votingapi

I think there is enough overall need and use for this on it's own, that it could be a module, that works with the existing Voting API.

But, we could also ask the folks working on User relationships if they would like to include this as a set of functions within that module, and work with them.

The "follow/follow" protocol is going to be useful for a project that I am working on right now. (I'd also like to extend it to groups as seen in http://edmodo.com, but this is possibly unrelated to what we are talking about here).

Right now, unless someone can help me understand a better way, I'll explore your idea with a combination of extending UR, and connecting with Voting API.

Sam Rose
Social Synergy
Open Source Ecology
P2P Foundation

Your idea of VotingAPI

icecreamyou's picture

Your idea of VotingAPI integration didn't seem like what I'd originally planned out in the first post of this discussion, but now that I think about it, it would be pretty cool to be able to automatically place users into trust levels based on your average rating of their posts/content.

I agree that UR is certainly the place to start. It already has the user-blocking/trusting functionality, it's just that it has to be assigned per-node. If the deeper functions there could be exposed to the UI, and if the blocking could acquire a little more granularity, I think we'd have our module.

I just came across the

icecreamyou's picture

I just came across the Content Blocker module which likely contains a lot of useful code.

Another one

icecreamyou's picture

TBase

This module tries to connect users based on relations like "[Fred] [is_a_member_of] [Group] AND [bought] [programmingBook] FOR [$10.00]"

It seems like what User Relationships is doing with custom relationship types but more comprehensively. AFAIK it doesn't implement any content selection/blocking except maybe by group, but it looks like a solid implementation of user (and content?) filtering.

Developing more on this

icecreamyou's picture

Developing more on this idea:

The module should provide an option to filter searches.
It should also provide several default Views that show users with whom the current user/any given user has a trust relationship.
There could also be integration with the Userpoints module, such that a user could automatically "trust" any user with over 1000 Userpoints.

Also, I officially created the project page for this module. Anyone who wishes to help with development is more than welcome to request CVS access; just create an issue in the queue or contact me via the Contact tab on my profile.

http://drupal.org/project/trust_network

Project

sun's picture

This would be a great module if it was acting on a low level, solely providing trust information to other modules.

Because, if it's gonna be more, then you're effectively duplicating existing modules.
That said, you should add this list of related module links to the project page:

http://drupal.org/project/recommendation
http://drupal.org/project/contentblocker
http://drupal.org/project/tbase
http://drupal.org/project/ignore_user
http://drupal.org/project/user_relationships

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

At this point I'm

icecreamyou's picture

At this point I'm envisioning this module playing the same kind of role that Michelle's Advanced Profile and Advanced Forum modules play. Most of the functionality already exists, but it needs some glue and a connected interface. Some of this project (in the non-drupal sense of the word) might involve some enhancements to already existing modules though...

You're quite correct, sun, that various efforts at parts of my vision have been implemented at one time or another.

I'm going to formally write up the project page with a (hopefully) clear plan sometime this week or next... I'll add all these links at that point. Then we'll have to see how much time I have to actually write the module. It would certainly go faster with some help, since this is my first Drupal module!

I finally updated the

icecreamyou's picture

I finally updated the project page. As I'm sure you can tell, progress is slow; I haven't written any code for the module yet and probably won't even try to before summer 2009. I know enough about Drupal and PHP now, I think, to tackle this, but I have very, very little time to do so. Of course, any other developers that are interested are encouraged to take a stab at it.

Definitely following this project

shareumentarian-dupe's picture

This is great work, I'll be watching this closely. Thanks for the effort you've made

Social Networking Sites

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week