Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
IDK, Is this reasonable ..?
I think that Site-Wide and User Profile social media links is great, but how about for a Node itself?
For example, A node detailing an organisation's contact points, upcoming events etc. could reasonably expect to list links to a facebook page, twitter profile, linkedIn organisation, youtube channel, etc.
So what's my question? What's the best way to do this in Drupal 7 currently and it this a reasonable feature request for this module?
Comments
Comment #1
BarwonHack CreditAttribution: BarwonHack commentedHmmm, I just did this using Custom Formatters module: Text field for the Facebook Page ID and wrapped it (as a field token) in some basic link HTML. Field validation sealed the deal nicely.
Comment #2
TomDude48 CreditAttribution: TomDude48 commentedCool, I will have to check out your recipe.
Comment #3
vjorden CreditAttribution: vjorden commentedThis might not be the prettiest way (and still pretty green when it comes to Drupal), but I figured out a way to do this. I needed the same functionality...to add social medial links to nodes (business listings of our site members).
I created a content type for these business listings and along with a bunch of other fields, added a link field for each of the social media outlets I wanted to add.Next, I uploaded the image icons I wanted to use into a public folder.
Then, I created a view with the social media links field. I rewrote the results of each field, checking the rewrite output and output as a link box. In the rewrite field I entered html with the link to the image I wanted to use. In the output as a link field I used the replacement pattern for original field link, and checked the external link box.
I am probably not explaining this very well, and again I have no idea if this is the best way to do this, but after searching for a better solution, this was the only thing I could figure out.
The only issue I have found with this solution is that the grids format doesn't seem to want to work with these images.
Hope this helps!
Comment #4
kristianb21 CreditAttribution: kristianb21 commentedhey I've ran into this issue as well and I agree its something that i feel is needed. I love the follow module but it's restricted to only users, i'm not to great with the programming just yet to rework the module.
I'm going to try the way vjorden suggested, i just have one question. Did you create separate fields for each social network?
I tried doing this with the field collection but it wouldn't give me tokens for each value within my field collection. I had a select list(w/ various social media names) and a link field(the url to the social media).
I'll let you know if I get it to work the way you suggested.
Comment #5
vjorden CreditAttribution: vjorden commentedYes, I created a new field for each social media link. Again, may not be the most elegant way of handling it, but it works! :D
Comment #6
lsolesen CreditAttribution: lsolesen commentedAnother way to accomplish this using the link field is to create a custom formatter. I've started some work on: https://github.com/soc-odder/socialmedia_link_formatter
Comment #7
miromarchi CreditAttribution: miromarchi commentedI think a good use case for this is to have "follow us on [social media]" links per organic group page.
I've opened a discussion in organic group drupal group at Integrating og_group with group's social networks accounts.
The proposed solutions in this thred (#1 and #3) are a bit out of my current drupal skill level. Anybody managed to do it differently?
Thanks
Comment #8
miromarchi CreditAttribution: miromarchi commentedI've finally found a module that seems perfect for the task of creating social media links per node (my usecase is per organic group): Social profile field.
It is super simple, just a link field with autorecognition of social media from the url, which autoselect the right icon.
At the moment I see these networks are auto-recognized:
facebook
linkedin
youtube
blogger
blog.billsbills
ncbankruptcyexpert
but I believe it is easy to add others.
Comment #9
The Webmaster Centre Ltd CreditAttribution: The Webmaster Centre Ltd commentedThere's this module too: Social Field. Just about to try it out.
Comment #10
gausarts CreditAttribution: gausarts commentedIf you have Link (D8 at core) module installed, your best bet will be Linkicon.
Disclaimer: I am the author of Linkicon, but the essence of the OP sounds what Linkicon does. Hope you find it useful.