The MU forums have moved to WordPress.org

wpmu-relationship (13 posts)

  1. TomK32
    Member
    Posted 18 years ago #

    Right now I'm working on a module for relationships between users and blogs (for a blog can have plenty users!).

    I've started programming an hour ago thus no visible demo yet but I'd like to put my ideas here to find out if someone has a better solution for it. Should save me some time afterwards ;-)

    possible relations:
    A->B and B->A where A and B can be either a blog or user. It is a directed graph thus the relationship A->B can differ from B->A.

    I'd like to organzise the types of relationships in a different table for two reasons:
    extendable, saves db space in very large communites and translateable because I want to add a language flag (CHAR(5) e.g. 'de-de' or 'de-at' if you want to discuss that detail).

    Of course the relationships will have a short and long (desciption) text.

    Data will come through the individual user profiles and for blogs via the blog options.

    New thread about conrete look will come tomorrow, save your thoughts until then.

  2. TomK32
    Member
    Posted 18 years ago #

    the db layout:

    CREATE TABLE " . $wpdb->wpmu_relationship . " (
    ID int(11) NOT NULL auto_increment,
    from int(11) NOT NULL,
    fromType enum('blog', 'user') NOT NULL,
    to int(11) NOT NULL,
    toType enum('blog', 'user') NOT NULL,
    type int(11) NOT NULL,
    PRIMARY KEY (ID),
    KEY blogID (blogID,URL),
    KEY URL (URL)
    );
    CREATE TABLE " . $wpdb->wpmu_relationship_types . " (
    ID int(11) NOT NULL auto_increment,
    short CHAR(32) NOT NULL,
    description TEXT NOT NULL DEFAULT '',
    language CHAR(6) NOT NULL DEFAULT '',
    PRIMARY KEY (ID),
    KEY blogID (blogID,URL),
    KEY URL (URL));

  3. donncha
    Key Master
    Posted 18 years ago #

    Surely the only relationship between blogs and users is either:
    user "is a member of" blog
    blog "contains" user.

    It's already possible for multiple users to be members of one blog but we want there to be always a user<->blog relationship. A user *always* has to be a member of a blog and a blog always has to have users.

  4. TomK32
    Member
    Posted 18 years ago #

    ah, I forgot to add the esential thing.
    With relation I mean something like 'friend', 'neighbour', 'employee' or anything else which a community would need. It is not of fundamental importance for WPMU as you thought.

  5. andrewbillits
    Member
    Posted 18 years ago #

    would people actually take the time to use this feature?

  6. donncha
    Key Master
    Posted 18 years ago #

    I think so, but it has to be simple. Flickr has a "Add USERNAME as a contact" which subscribes you to their photos. That's a simple relationship.
    You can also join groups, so you have a relationship that way too. Both users are members of group X. This will take a lot of planning methinks.

  7. andrewbillits
    Member
    Posted 18 years ago #

    well, livejournal has the whole "friends" thing and it seems to work well. You're right though, it would have to be simple as "click here to add" in order for it to prove useful.

    Since we're on the subject. Why don't we just do away with adding additional users to a blog. That way instead of keeping up with user info and blog info seperatly it could just be kept all together. sort of a "one blog per every user ratio". People who want multiple users on their blog can always just add the user from the community. Is any of this making sense?

  8. TomK32
    Member
    Posted 18 years ago #

    @donncha: groups would be another step, but I think they'd be redundant to the blogs. A weblog is still about writing and I'd keep it that way, so a group should create it's own blog. It has nothing to do with my relationship plugin anyways.
    But, on the other hand there's possibility to follow the graphs building in the relationship table. I'm really looking forward for the first graphical results of a 100 user network.

    @andrew: the users are already in a common table, so is the usermeta which contains the information which blog the user blongs to. There are also users who have no blog at all but only comment. donncha's current solution is sufficient to me, though the usermeta looks kind of chaotic to me...

  9. Farms
    Member
    Posted 18 years ago #

    Again, I think that the add user thing floats an awful lot of peoples boats (even though I would argue that group blogging is a bit of a waste of time anyway).

    I see the sense in what yopu;re saying but I think that it takes away an important aspect of MU functionality.

    Moving onto something I know very little about wouldn't FOAF http://en.wikipedia.org/wiki/FOAF have a role to play here.

    I think that the capacity to develop a network could be a good one, especially in terms of blogrolling (which I think has some value).

    Now if that was incorporated into a backend river of news aggregator... oooooooooooo....

    (that's something Winer got right with Radio, the aggregator shoudl run with the blog engine... the first web based blog engine that gets that right... i.e. WPMU will be laughing!)

  10. TomK32
    Member
    Posted 18 years ago #

    @Farms: Would it be enough for you if users could post comments without the need to register or being added?
    I don't want to fill up my user-list with commenters only.

  11. donncha
    Key Master
    Posted 18 years ago #

    Before anything else is done on this, has anyone looked at XFN yet?

    Here's a good introduction to it:
    http://blogs.zdnet.com/Berlind/index.php?p=30
    via http://www.wilddog.com/mt/archives/000604.html which has a neat one paragraph explanation:

    Without going into too many technical details, XFN makes it possible for me to describe the nature of my relationship to someone else when I point to their virtual presence on Internet Web sites, blogs, etc.

  12. TomK32
    Member
    Posted 18 years ago #

    I know XFN but it think it's not optimal after it's meant for output, just adding a rel="" to weblinks. I'd like to go a bit deeper and also hav more possibilites for displaying complex relationship graphs.
    But XFN is definitly something to include when displaying links.

  13. mspecht
    Member
    Posted 18 years ago #

    I would like to have a relationship environment that is able to generate XFN compliant links that can then be used on a blogroll. As Farms said a river of news based on your relationship would be great, this begins to move into the whole Attention.XML world.

    Tom by deeper what do you mean?

About this Topic