mcdoolz_social
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
The mcdoolz_social module was built because I needed a reuseable client useable solution.
This is my first draft at a super simple solution that I aim to expand on as time permits.
To use the module, enable it then go to the configuration page.
Copy and paste the url of your social network page into the field. Add a field if you need a field.
The system matches network name to font awesome icon and generates an anchor wrapped icon and label.
You can see in the screenshots and the code that I intend to support other iconpacks.
Patches are always welcome!
TODO: Replace the constant with an array of icon packs loaded from a folder for icon packs.
Maybe implement libraries api at some point to look for relevant icon packs.
How does it look for the network name?
I literally take all the classes for an icon pack as a string, explode them to an array, then cross reference the input network urls, looking for matching strings. Is facebook in this url? Great! Here's a facebook icon, a label and some nice css classes.
There is no actual icon selection.
If the network isn't found in the class list, nothing is displayed. The link isn't wiped out though; maybe you just misspelled something.
Other modules that do similar things and why this one is different.
- https://www.drupal.org/project/follow
- https://www.drupal.org/project/socialmedia
- https://www.drupal.org/project/service_links
- https://www.drupal.org/project/social_buttons
Each of these modules provides similar functionality.
This module has no code for any specific network or special API links.
You could use this module to link to anything that is referenced in FontAwesome and every link is generated to open a new window.
