Problem/Motivation

First of all, apologies for posting this here, which is probably not the right place to post questions. I spent an ungodly amount of hours trying to change the icons via tokens but nothing seems to work (I can change them via css or html, but I need to change them via tokens in this case).

So, I got a button set and need to replace the icons. If I understand correctly (I probably don't) tokens get the image either from a node field ([node:field_image:url] default value, or the default directory of the site's logo [rrssbsite:logo-url]. I don't know what I am doing wrong, but I can't seem to get my custom SVGs (or PNGs) that way. I would really appreciate a few pointers or a couple of image token examples.

Also, is it possible to get an SVG/PNG from a custom directory within the project through these tokens?
PS: I am on Drupal 9.0.6.

Comments

drupaluser42 created an issue. See original summary.

drupaluser42’s picture

Issue summary: View changes
adamps’s picture

Title: Changing the icons » Fix documentation on hook_rrssb_buttons()
Category: Support request » Bug report

The purpose of the tokens is to work out what image to use for a node when share_url/follow_url contains [rrssb:image]. This is only used for pinterest in the default config. So it's not what you want, I think.

For the icons, the module does not support PNG - it must be SVG. These are generated in code from hook_rrssb_buttons() in the following priority order:

  1. Config 'svg' = Inline definition as an
    tag .
  2. Config 'svgfile' = Path to an SVG file
  3. Look for matching name icon in the RRSSB library icons directory
The current comment on the hook is wrong so it would be useful to fix it.
adamps’s picture

Status: Active » Needs review
StatusFileSize
new2.85 KB

  • AdamPS committed 97ba5287 on 8.x-2.x
    Issue #3177996 by AdamPS: Fix documentation on hook_rrssb_buttons()
    
adamps’s picture

Status: Needs review » Fixed
adamps’s picture

StatusFileSize
new2.85 KB

Patch failed to apply in #4 because I had already committed it too soon.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.