Closed (fixed)
Project:
Drupal Commons
Component:
Posts
Priority:
Major
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
15 Jan 2013 at 17:44 UTC
Updated:
4 Jan 2014 at 02:42 UTC
Jump to comment: Most recent, Most recent file
in order to ge the buttons to line up correctly they need to all be siblings, currently the like is in a separate container. i tried re-ordering things in the node preprocess function but cant get it to render out correctly. hoping someone can tackle this issue.
thanks.

| Comment | File | Size | Author |
|---|---|---|---|
| #7 | like-unthemed.png | 20.65 KB | mmilano |
| #7 | like-themed.png | 7.01 KB | mmilano |
| #6 | rate_widget_display_config-1889420-6.patch | 440 bytes | mmilano |
| #3 | follow_to_content-1889420-2.patch | 2.29 KB | mmilano |
| #1 | follow_to_content-1889420.patch | 2.22 KB | mmilano |
Comments
Comment #1
mmilano commentedA problem is that the follow button is a node link, while the other elements are node content. I think there would be more control in moving the follow button up into the content rather than the like button down. This should allow for control over re-ordering at the node content level.
Attached is a patch for the commons_follow_node module that uses hook_node_view() to add the follow button to the node content, and hook_preprocess_node() to remove follow from the node links.
Comment #2
mmilano commentedAlso posted a patch to the flag module which would negate the need for this patch. It would give you control at the flag module level on where the link displays on a full page node view. http://drupal.org/node/1892930
Comment #3
mmilano commentedupdated since it only has to account for a full node view.
Comment #4
mmilano commentedThe patch I submitted to the flag module, linked in #2, prompted a discussion over there that shows this need is on their radar.
My patch here is more of a bandaid. If a fix is very urgent, then this patch might be a good idea. If not, it may be a better idea to postpone the issue till it's resolved in the flag module.
Comment #5
mmilano commentedThe new approach is to move the rate button down into the links. I submitted a patch to the rate module here. in comment #13 here: #947516: Add widget to node/comment $links
I'll create a patch soon for config changes.
Next step will require some CSS work. Currently the target for the like button contains: .page-node .node-content . The scope of node links are outside and below .node-content.
Comment #6
mmilano commentedThis is a patch for the config change for the widget node display. It shouldn't affect how the widget gets displayed now, but it will only be relevant when the patch to the rate module in #5 is accepted.
Comment #7
mmilano commentedI tested the patch in #6 on a fresh install, with the rate patch referenced in #5. The widget successfully displays in the links by default.
Attached are 2 screenshots for the theming that needs to be done mentioned in #5.
Currently it looks like this:
The like button itself needs to look like this.
Comment #8
ezra-g commentedThanks, mmilano!
Adding the patch to Rate module to the Commons make file:
http://drupalcode.org/project/commons.git/commit/600b05c
Adding the patch to Commons_Like
http://drupalcode.org/project/commons_like.git/commit/ecbc06a
Comment #9
ezra-g commentedWe're no longer seeing the Commons like widget in the node links as of the currently nightly dev snapshot. I'm investigating.
Comment #10
ezra-g commentedI hadn't updated the make file with the latest patch on the Rate module issue: http://drupalcode.org/project/commons.git/commit/9179fc8.
This is now resolved, pending themeing at #1886338: Theme Group homepages.