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.
Add support for Font-Awesome icons rather than using the image.
Add support to replace icons with glyphicons CSS classes.
Comment | File | Size | Author |
---|---|---|---|
#32 | AddFontAwesomeSupport-2153201-32.patch | 6.21 KB | elachlan |
| |||
#30 | AddFontAwesomeSupport-2153201-30.patch | 6.21 KB | elachlan |
#28 | AddFontAwesomeSupport-2153201-28.patch | 4.29 KB | elachlan |
#26 | AddFontAwesomeSupport-2153201-26.patch | 4.31 KB | elachlan |
#24 | AddFontAwesomeSupport-2153201-24.patch | 4.28 KB | elachlan |
Comments
Comment #1
Dave Bagler CreditAttribution: Dave Bagler commentedHere's a patch. It adds a checkbox to the settings form (Add font awesome classes instead of an image.) If the checkbox is checked, rather than displaying the image icon an tag is added with the appropriate font awesome classes. Less flexible than using the extras module and the icon API but a much simpler solution if you just want to replace those two images.
Comment #2
shortspoken CreditAttribution: shortspoken commentedAwesome! Works as expected. Thanks a lot!
Comment #3
Dave Bagler CreditAttribution: Dave Bagler commentedComment #4
nhck CreditAttribution: nhck commentedImho this option should check firtst whether the module fontawesome is enabled via module_exists('fontawesome')
Comment #5
Dave Bagler CreditAttribution: Dave Bagler commentedWouldn't that force people to use the font awesome module though? This just adds CSS classes so regardless of how font awesome is integrated the classes will be there.
Comment #6
Dave Bagler CreditAttribution: Dave Bagler commentedComment #7
nhck CreditAttribution: nhck commentedThat is correct - I just thought it might be confusing.
On the other hand maybe we can add some other classes in the same manner - e.g. glyphicons and make it a more generic approach - what do you think?
Comment #8
Dave Bagler CreditAttribution: Dave Bagler commentedYeah I think adding glyphicons might be a benefit for some Devs. I'll make a separate (but related) issue for it so it can have a more accurate, descriptive title.
Comment #9
Dave Bagler CreditAttribution: Dave Bagler commentedComment #10
elachlan CreditAttribution: elachlan commentedMerging the issues.
Comment #11
elachlan CreditAttribution: elachlan commentedComment #12
duckydan CreditAttribution: duckydan commentedHi,
Just in case anyone wants this, I added some CSS myself to do this. This is not the "right" way, but it is a CSS solution if you already use Glyphicons elsewhere.
Comment #13
elachlan CreditAttribution: elachlan commentedThere are some conflicts, can you please re-roll the patch?
Edit: Also I realize that we don't have Glyphicon support in the patch. I think maybe we can just live with Font-Awesome for now.
Comment #14
PieterDCRerolled patch with Font Awesome support against Extlink 7.x-1.18
See attached.
Didn't add Glyphicon support because I don't need it yet.
Comment #15
PieterDCRetry patch.
Comment #17
PieterDCRerolled patch against dev branch because tests run on that branch.
Comment #19
elachlan CreditAttribution: elachlan commentedI re-rolled the patch.
Comment #21
elachlan CreditAttribution: elachlan commented7.x done needs 8.x
Comment #22
elachlan CreditAttribution: elachlan commentedComment #24
elachlan CreditAttribution: elachlan commentedComment #26
elachlan CreditAttribution: elachlan commentedComment #28
elachlan CreditAttribution: elachlan commentedComment #30
elachlan CreditAttribution: elachlan commentedComment #32
elachlan CreditAttribution: elachlan commentedComment #34
elachlan CreditAttribution: elachlan commented