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.

screenshot

Comments

mmilano’s picture

StatusFileSize
new2.22 KB

A 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.

mmilano’s picture

Status: Active » Needs review

Also 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

mmilano’s picture

StatusFileSize
new2.29 KB

updated since it only has to account for a full node view.

mmilano’s picture

The 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.

mmilano’s picture

The 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.

mmilano’s picture

StatusFileSize
new440 bytes

This 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.

mmilano’s picture

StatusFileSize
new7.01 KB
new20.65 KB

I 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:

unthemed

The like button itself needs to look like this.

themed

ezra-g’s picture

Status: Needs review » Fixed

Thanks, 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

ezra-g’s picture

Assigned: Unassigned » ezra-g
Status: Fixed » Needs work

We're no longer seeing the Commons like widget in the node links as of the currently nightly dev snapshot. I'm investigating.

ezra-g’s picture

Status: Needs work » Fixed

I 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.

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