Schema.org for a social network

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

Hi,
I would like to create a social network of people and use the schema.org module/vocabulary.
According to the drupal tutorial http://drupal.org/node/1351214 it says to create a new content type for people.
"Go to Structure -> Content Types -> Add content-type and create a content type with the following name and description:
Person
Person that uses schema.org Person Type and Properties"

But how a content type can log in?
Am i missing something?I would be very thankful for any reply.

Comments

Create fields on a user profile instead

scor's picture

With the latest version of the schema.org module 7.x-1.x-dev you can achieve the same with the regular user profiles: create the same fields as per the documentation at Administration » Configuration » People » Account settings » Manage fields. I've updated the documentation page, thanks for catching this.

@scor: Thanks for updating,I

user654's picture

@scor: Thanks for updating,I will use the dev version of schema.org module.

So, Does schemaorg assign each Person

brucewhealtonjr's picture

Is each Person assigned the schema.org Class of Thing>Person?
In essence is would be wrapped in a div like this:

Is that right?
I wasn't sure and would have instead created a content type of Person when it was not needed.
Thanks,
Bruce

Yes, each user profile is

scor's picture

Yes, each user profile is mapped to the schema.org Person type automatically by the schemaorg.module (saves one step). So if you use user profiles, you can skip the content type creation step, all you need to do is adding the fields and their mapping at Administration » Configuration » People » Account settings » Manage fields. I've clarified this on the documentation page for the person type, thanks for spotting this, Bruce!

For social network...linking people

brucewhealtonjr's picture

How would we link people using schema.org? We need a content type that links to another Person's profile. For schema.org properties, we have colleagues, knows, relatedTo (that's family which will work well with my genealogy site), follows and others. Drupal core doesn't have a content type that can be used to represent a relationship of one person to another. This was further complicated by the fact that a person might know another person by name but not recognize their username. On one site, I just had their username be their real name, or pen name, as it was a poetry community. We still need a content type that will link either one node to another or one person to another, which is the same in Drupal 7 because the People content type is the same a node.
Bruce

So far the Drupal way of

scor's picture

So far the Drupal way of linking nodes or content to each other has been via fields (typically node references or user references). Relation is introducing a new concept of representing links with entities, but this approach is still very new and very few modules are integrating with it (the RDF modules don't integrate with yet for example). Have you tried to simply use regular node references between the nodes of type Person? I'm a bit confused: are you trying to link nodes to user profiles? If so you can use user reference (part of the references project). you can then map these fields to whatever schema.org property you want. You can even create a field for each schema.org person relation type: colleagues, knows, relatedTo.

This was further complicated by the fact that a person might know another person by name but not recognize their username.

I'd recommend you to take a look at RealName which allows to display a friendly name for user profiles (provided they have filled in their first name and last name). With realname you can use tokens to define how names are built, so the user names appearing on the site can be tweaked to include other things present in their profiles.

Entity reference

colan's picture

Let's not forget about Entity reference!

Colan, would you mind

alexmc's picture

Colan, would you mind explaining the difference between Entity References and Node References? I'm trying to get my head around Entities.

Entities are more general

colan's picture

A node is an entity, but there are other types of entities, such as users, taxonomy terms, etc. Basically, an entity is anything that's fieldable (i.e. can have fields attached to it). In D7, there are many things that are fieldable, and many more can be added with the API.

The References module can only refer to nodes and users. It was meant to fill in for the CCK functionality that did this in D6, but it hasn't been generalized, and won't be. The more general solution is the Entity reference module, because it can refer to any type of entity (even as-yet undefined ones), not just nodes and users. Going forward, References will be deprecated in favour of Entity reference.

Cheers, I think I understand.

alexmc's picture

Cheers, I think I understand.

Relation module or Reference node

brucewhealtonjr's picture

So, I spent 47 minutes watching the presentation from last Sept. on the Relation module. It is a complex module. I'm not certain how schemaorg would handle this. It does allow fields on the relation nodes, but those are unique and separate nodes not part of the fields associated with a Person. I think you would know better than I, @scor whether or not the relation module would be appropriate for linking two people with the various schema.org values. It definitely seems appropriate for creating the schema.org family type relationships. You would just define the relationship separately and apply the schema.org properties to the relationship. The thing is that the schema.org properties are properties of a Person not a relationship. And the relation module wants to work with and define relationships. See: http://drupal.org/project/Relation
Thoughts? The first post in this thread did seem to ask about relating people in a social network type of way, so I thought this was an important module to consider with the schemaorg module.
Thanks,
Bruce

I haven't checked the

linclark's picture

I haven't checked the relation module lately, but it used to not output correct RDFa and I'm not sure whether they've integrated with Entity API in the way that's needed to expose RDF in other serializations. You'll want to check that.

Semantic Web

Group organizers

Group notifications

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