-
Notifications
You must be signed in to change notification settings - Fork 74
Currently it is not possible to use custom social sharing icons #290
Comments
Actually thinking out load, maybe my use of I will try that out. |
ACSF also allows sites to be cloned to be used in a site collection also which means you can't rely on the theme paths as the net1234 part will likely change. As you suggest, |
I got my workaround theme override to work after I realised that Drupal will return the path to the theme on the Acquia environment, which I was then checking against the path in the UI, which didn't match. This code works but is not ideal due to the hard coding.
|
So I think the best solution is that the service links module add the ability to use tokens when entering that path, which are then replaced using drupal_get_path(). I have opened an issue for this, which I will write a patch for soon: https://www.drupal.org/node/2760649 |
Thanks @rooby - I agree with this approach too. The tokens you mentioned in the ticket look arbitrary while the Drupal community do prefer use of the token module. So expect the maintainer to want something slightly different (just a heads up). |
Yeah I expect discussion around the tokens, although that format is surprisingly common in this particular context. |
Closing off as there isn't anything further to discuss but please file a new ticket should upstream modules require updating to support this functionality. |
GovCMS includes the Service Links module to provide social media sharing.
On the admin settings form for the service links module (admin/config/services/service-links) there is a configuration option for "Service Links icons > Standard folder", where you can tell the module to get its icons from a different directory.
If you set this to sites/all/themes/THEMENAME/images or similar then you end up with broken images on the Acquia platform.
This is because when the page renders it is still looking for sites/all/themes/THEMENAME/images/facebook.png but the image has been moved to somewhere like this: sites/g/files/net1234/themes/site/images/twitter.png.
Previous discussions with Acquia have informed me that URLs have to run through drupal_get_path() for them to be correctly rewritten (I'm assuming this information is correct) so I thought maybe I could override the themeing of these icons to use that to generate paths but that hasn't worked either (the code I used to test is below).
I will ask Acquia to see if they can help but I'm also opening this issue in case someone here can help and also because whatever the solution, something needs to be rolled in here so that if you use that setting it works.
Theme override (my change is the code involving $icon_path).
It's hard, not being able to do debugging on the Acquia platform but in local tests my code runs and correctly generates the path
The text was updated successfully, but these errors were encountered: