Closed (fixed)
Project:
Social Media Links Block and Field
Version:
7.x-1.4
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2015 at 17:36 UTC
Updated:
20 Apr 2017 at 21:00 UTC
Jump to comment: Most recent
Comments
Comment #1
Eudaimonstro commentedWould love some help here too.
Comment #2
alvgalrus commentedIMHO, this should be addressed as soon as possible.
Comment #3
Mike Dodd commentedHas anyone made any progress with this. I'm looking at this now but love some pointers if anyone has added a custom icon set
Comment #4
Mike Dodd commentedHopefully this will help, its quite simple really:
add a custom callback for the iconset
add SOCIAL_ICON_SET_NAME to libraries with each icon inside and then add a function for the custom callback for any icon whos name is not simple like twitter.png
Thats it flush the cache and then select your new icon set. Really quite simple :)
Comment #5
cbeier commented@mike: Yes, that should work. But please note that the icon files must then also be places inside a valid library folder.
Example: If you new iconset is named "SOCIAL_ICON_SET_NAME", the icon file shoud be placed inside:
/sites/all/libraries/SOCIAL_ICON_SET_NAME/twitter.pngComment #6
alvgalrus commentedBut that approach won't solve the updating issue, as social_media_links.iconsets.inc will be overwritten with each update... Wouldn't be more straightforward to add a feature for scanning the folders inside "library"?
Comment #7
j0hnrigler commentedI was able to add links. All I did was edit the file $DRUPAL_HOME/sites/all/modules/social_media_links/social_media_links.platforms.inc and add some extra lines:
I added them into the part of the code where other similar array entries were being made, then I added a 16x16 icon into the library section with the other images and re-edited the block. I could see my new entries and when I filled out something for them, they showed up. At one point, I typed a name wrong and got some nasty errors cached somewhere, but I simply disabled and re-enabled the module and these went away.
Comment #8
cbeier commented@EmuAGR and @j0hnrigler: You must create a custom module. Inside your custom module then implement the documented hooks (e.g.
MODULE_NAME_social_media_links_iconset_info()). Please see: Creating Drupal 7.x modulesComment #9
cbeier commentedI think we can close this support issue.
Should the problem not be resolved, please reopen.
Comment #11
Anonymous (not verified) commented@mike-dodd Many thanks for the code snippet. It worked perfectly!