Closed (outdated)
Project:
Follow
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 May 2012 at 16:08 UTC
Updated:
31 Jul 2016 at 15:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
midmood commentedsubscribe
Comment #2
BrockBoland commentedFirst swing attached. This adds a "Custom" option to the icon style dropdown, that exposes a CSS file path field when it's chosen. Screenshot attached to demonstrate.
Comment #3
BrockBoland commentedMinor tweak from #2: added the new variable to those deleted on uninstall.
Comment #4
q0rban commentedAfter reviewing this patch, I found a bunch of stuff I wasn't crazy about in the 1.x branch that this relies on. I've pushed a new branch that diverges from the 6.x branch, implementing some of the d7 APIs. It's a pretty extensive change, but will make this work pretty trivial, I believe, as there are now bona fide icon styles that can declare icon paths. A theme can implement hook_follow_icon_styles_alter to alter an icon path for any of these styles, or declare it's own style. All that is necessary is that the icon paths match up.
I'm going to mark this as 'needs more info' as I'm not sure if this suffices for your use case or not. In theory, if we wanted to make this easier for themers, we could allow a setting in the theme's info to specify the icon path, but I worry this might be overkill. Alternately, we could create an admin page that you could go to to specify the icon path. This would allow us to throw up warnings if there are missing icons, but I'm less crazy about the idea of this as it would mean more variables to save. Anyone can add their own follow.css to their theme and override the icon urls themselves there as well.
I encourage you to check out the 7.x-2.x branch (when it becomes available, currently waiting on d.o to create the file) to see what you think.
Comment #5
BrockBoland commentedThis is pretty close.
The one complaint I have is that themes cannot define new icon styles. The theme can implement
hook_follow_icon_styles(), and you can add a new style to the$stylesarray…but that new style won't be available when configuring the block, so it can't be chosen. Since the admin theme is the active one when configuring the block,hook_follow_icon_styles()is invoked on the admin theme and not your site theme. You can override one of the existing styles, but not define new ones.Note that the
hook_follow_icon_stylesfunction in follow.api.php should have an_alteron the end of it.Comment #6
truls1502I am going to close this ticket. Please re-open the ticket if you still want this feature.