Description
The Font Icon Select module provides an interface for font file management. It then uses those libraries to provide a new field type that allows icon selection on a fieldable entity.
Fonts can be uploaded in the admin. Every font requires .eot, .svg, .ttf, and .woff file types to help with browser compatibility. Once a font file is uploaded it becomes available as an option for the new Font Icon Select field type. The font's icon options can be restricted using a global interface or on a field by field basis.
The new font icon select field type allows icon selection to be added to any fieldable entity. On field creation a previously uploaded font library is selected so that the icons from the font can be exposed as options. The field admin has local black/whitelist capabilities with default icon selection that supports different cardinalities.
Once an icon has been selected it can be shown on the front end of the site using a simple render call. When the icon is rendered it ensures that the correct font library is available on the page by including the font files and a custom generated css file that applies the font library to the wrapping classes.
Resources
The project sandbox
Directions to clone the project
Set up the repo for the first time: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/wolffereast/2319993.git font_icon_select
Similar projects, and why this project is different
Font Awesome Icons is a project that allows font awesome icons to be used on the site. This project does not allow different font libraries to be uploaded.
Fontello allows integration with the fontello service in order to combine custom webfonts for your project. This project does not support an icon selection field.
Icon API provides integration for icon bundles and icon providers throughout Drupal. One of it's sub modules provides a field to allow icon selection on any fieldable entity. It allows library management, though it requires upload instead of providing an upload interface. The module does not allow restriction of available icons using either a black or white list option.
Manual reviews of other projects:
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screen Shot 2015-06-13 at 12.29.17 AM.png | 76.58 KB | darol100 |
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxwolffereast2319993git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
wolffereast commentedComment #3
wolffereast commentedReviewed and fixed issues found by the script pointed out by the PA robot.
Comment #4
darol100 commentedAutomated Review
Pareview.sh is showing some warning - http://pareview.sh/pareview/httpgitdrupalorgsandboxwolffereast2319993git, No a blocker but it would be nice to be fix before the release.
Coder Review
font_icon_select.field.inc
font_icon_select.admin.inc
Manual Review
font_icon_select_font_library_form:font_title, I'm able to add javascript and execute once I click one of your tab UPLOADED FONT LIBRARIES. This is the same as the first complain from coder, I have manually test it.The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #5
darol100 commentedAttached picture,
Comment #6
wolffereast commentedComment #7
wolffereast commentedI fixed the issues that coder found and took care of the final elements found by the pareview.sh script.
Fixed the XSS vulnerability with the Font Title field. I also found and fixed a possible vulnerability created when the uploaded font files are parsed. I will look into this particular vector of attack more before I move this away from 'Needs work'.
Fixed the issue with the link in the message when there are no uploaded font libraries.
Fixed an issue with the names of the font file fields and added descriptions for good measure.
I will work on some content for hook_help() when I have some more time.
@darol100 Thank you for the quick review. It was extremely helpful and I appreciate the time that it took to complete!
Comment #8
ravi.khetri commentedHi,
1. Use form Api of drupal instead of input tag.
Line no. 455 of font_icon_select.admin.inc
2. use t function in line 533 of of font_icon_select.admin.inc
Comment #9
wolffereast commentedThanks for the review @ravi.khetri
Updated the input tag to use the form API.
Added the translate function to the error message on line 533.
I'm going to check out the rest of the theme work in the function near 455 to see if anything else can be moved to the form API.
Comment #10
wolffereast commentedAdded basic hook_help(), beginning check of XSS via crafted svg
Comment #11
wolffereast commentedComment #12
wolffereast commentedComment #13
wolffereast commentedAdded additional testing/sanitation to the svg parse function to avoid injected js. Also fixed an issue where icons with values outside of the valid UTF8 range where being encoded and output incorrectly.
Comment #14
wolffereast commentedComment #15
babusaheb.vikas commentedeg:--
It can override another label property.
name = Font Icon Select
description = Provides font file management, font based icon select widget, and global/local black/whitelist options for font options.
core = 7.x
configure = admin/config/content/font_icon_select_options
dependencies[] = file
Comment #16
wolffereast commentedGood catch in the css @babusaheb.vikas, thanks for the review.
added a more focused target to the mentioned css and re ordered the *.info file.
Comment #17
wolffereast commentedUpdate that integrates with Drupal behaviors had some unintended admin side affects. moving to needs work pending admin fixes
Comment #18
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.