Add XFN rel-me to external links on profile page

Created on 23 May 2011, over 13 years ago
Updated 1 March 2023, almost 2 years ago

Would be nice of the links to LinkedIn, Facebook and Twitter/Identi.ca could have the rel=me relationship. This would enable identity consolidation as mentioned in #197327: Research Microformats and recommend ways they could be used in Drupal β†’ by Chris Messina and which is elaborated on at: http://microformats.org/wiki/identity-consolidation

Adding rel=me would make users on Drupal.org part of users social graphs - something that other sites can make use of through the means of mechanisms like: http://code.google.com/apis/socialgraph/

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden voxpelli

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    GitHub recently rolled out support for this very thing. I'd love to see it on Drupal.org!

  • Status changed to Needs review almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    This patch should add rel=me to any link rendered from the field_social_links field.

  • Status changed to Needs work almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States drumm NY, US

    Thanks for the start on this!

    We do not add any new code to .module files of features. Having so many places for custom PHP code to live leads to unnecessary complexity. Please add this to drupalorg.module

    This looks like it would apply to all URL fields on the site. I think the way forward is to add the formatter to drupalorg_field_formatter_info(), and then we can configure it for the one field. It would also be okay to hard-code something for field_social_links if there is a convenient place to do that on output.

  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    We do not add any new code to .module files of features. Having so many places for custom PHP code to live leads to unnecessary complexity. Please add this to drupalorg.module

    @drumm Thanks for the tip. I can make this change!

    It would also be okay to hard-code something for field_social_links if there is a convenient place to do that on output.

    I did include a conditional limiting the change to field_social_links. Is this what you had in mind or is it not sufficient?

    +  if ($field['field_name'] == 'field_social_links') {
    +    foreach ($items as $delta => &$item) {
    +      $item['options']['attributes']['rel'][] = 'me';
    +    }
    +  }
  • Status changed to Needs review almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    Moved logic to drupalorg.module per #9.

    • drumm β†’ committed e88f78a5 on 7.x-3.x
      Issue #1166476 by markdorison, drumm: Add XFN rel-me to social links
      
  • πŸ‡ΊπŸ‡ΈUnited States drumm NY, US

    Ah, I missed the if statement, since this is overriding the field formatter for all URL fields.

    I did move this to drupalorg_user_view() since this is custom code just for one field.

  • Status changed to Fixed almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States drumm NY, US
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024