Hi, I'm looking to move away from AddToAny and just show Facebook Like and Twitter (which are what people actually use nowadays).

AddToAny displays its thing in the node links area (where "Add new comment" and "Printer friendly version" and so on appear, in a horizontal row).

This makes for minimal clutter, which I like. Any possibility that Facebook Like Button could have an option to do the same?

Comments

plousia’s picture

I came here because I'm looking for the same thing...would be great to display this in the node links area.

beyond67’s picture

Looking for the same feature.

steeph’s picture

I would also like to see have this in the node links. It's really the only thing I'm missing from the module.

SewFresh’s picture

You can place it in that area by using the float: left; in the additional css box. Also, you'll need to decrease the width to lke 60-70 or so. Make sure the weight is like -50 as well so it shows up in the right place.

steeph’s picture

Thank you for the tip. But it didn't work for me (using the Sky theme). Also, the link would not be actually placed in the node links this way, but just in the place/area where the node links are (e.g. it will not be inside

or whatever you have in your theme. But if this will not be implemented, I'll try to do it CSS :)

dmsmidt’s picture

I think it is important to give enough placement freedom. I'm working on placement by block next to the option of rendering the button below the node content. http://drupal.org/node/1167194

If this could be pushed I can work on adding the link region as an option.

hwasem’s picture

I put the FBLike button in my Links section are using the information found in this article...http://drupal.org/node/1205254. Basically I added the mentioned code just before my links section of my node.tpl.php. Maybe that will work for you?

Anonymous’s picture

@SewFresh #4: I think that works only by accident, in your particular theme.

In a Drupal Book page, the book navigation stuff comes between the end of the content (which is as far down as we can currently get the Like button) and the node links line.

Anonymous’s picture

The "Tweet" module (http://drupal.org/project/tweet) puts its button in the node links area. Unfortunately it does not have an option to put it at the end of the content. This means that there is no way to have the Facebook Like Button and Tweet button in the same place.

That would seem to be a very common use case.

Anonymous’s picture

Cross-reference: I've filed a similar issue for Tweet. #1222818: Positioning option(s) for Tweet button

mhedstrom’s picture

I'd really like this as well. Currently I've got the Tweet button and the Google +1 button next to each other, and FB is off on its own. I really want to get them to line up.

Anonymous’s picture

The Tweet Button maintainer rejected the request, saying that the buttons really belong in the node links area.

I agree.... The FB Like button is the one that should move...

steeph’s picture

I think the node links are just the right place for the FB button. In some themes it's not possible to re-place it there with CSS.

dmsmidt’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Needs review

Hi people,

I've added the option to place the FB like button in the link area. For now it's D7 only.

See the patch over here http://drupal.org/node/1167194#comment-5002116.

Anonymous’s picture

Yay, thank you!

I'm stuck in 6.x for now, waiting for some critical missing contrib modules, but I look forward to making use of this in 7.x (or when you do a backport).

dmsmidt’s picture

StatusFileSize
new39.75 KB

And good news for our D6 users. I made a complete fresh backport of my D7 version (http://drupal.org/node/1167194). It seems to work, but bear with me. My first time ^_^
Patch against the latest git version of 6.x-1.x.

//Views is not tested and supported, for D7 it does work with panels.

Zayed Al-Saidi’s picture

@ MrDamasajaga,
I want to test the patch for D6, however I can not apply the patch because of errors applying to 6.x-1.x-dev and stable version:
patch -p0 --dry-run < fblikebuttondisplays-D6-1171922-16.patch
patching file b/fblikebutton.admin.inc
Hunk #1 FAILED at 7.
Hunk #2 FAILED at 86.
2 out of 2 hunks FAILED -- saving rejects to file b/fblikebutton.admin.inc.rej
patching file b/fblikebutton.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file b/fblikebutton.info.rej
patching file b/fblikebutton.install
Hunk #1 FAILED at 12.
Hunk #2 FAILED at 19.
2 out of 2 hunks FAILED -- saving rejects to file b/fblikebutton.install.rej
patching file b/fblikebutton.module
Hunk #1 FAILED at 8.
1 out of 1 hunk FAILED -- saving rejects to file b/fblikebutton.module.rej

Could you upload the final version with applied patch for testing?

dmsmidt’s picture

Hi Zayed Al-Saidi,
please try the patch against the git version of d6, if that doesn't work: report back.
See: http://drupal.org/node/1095532/git-instructions/6.x-1.x
Cheers!

Zayed Al-Saidi’s picture

Ok MrDamasajaga now I can apply it but I get 3 warnings:
fblikebuttondisplays-D6-1171922-16.patch:149: trailing whitespace.
'#options' => array('-50' => '-50', '-49' => '-49', '-48' => '-48', '-47' => '-47', '-46' => '-46', '-45' => '-45', '-44' => '-44', '-43' => '-43', '-42' => '-42', '-41' => '-41', '-40' => '-40', '-39' => '-39', '-38' => '-38', '-37' => '-37', '-36' => '-36', '-35' => '-35', '-34' => '-34', '-33' => '-33', '-32' => '-32', '-31' => '-31', '-30' => '-30', '-29' => '-29', '-28' => '-28', '-27' => '-27', '-26' => '-26', '-25' => '-25', '-24' => '-24', '-23' => '-23', '-22' => '-22', '-21' => '-21', '-20' => '-20', '-19' => '-19', '-18' => '-18', '-17' => '-17', '-16' => '-16', '-15' => '-15', '-14' => '-14', '-13' => '-13', '-12' => '-12', '-11' => '-11', '-10' => '-10', '-9' => '-9', '-8' => '-8', '-7' => '-7', '-6' => '-6', '-5' => '-5', '-4' => '-4', '-3' => '-3', '-2' => '-2', '-1' => '-1', '0' => '0', '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18', '19' => '19', '20' => '20', '21' => '21', '22' => '22', '23' => '23', '24' => '24', '25' => '25', '26' => '26', '27' => '27', '28' => '28', '29' => '29', '30' => '30', '31' => '31', '32' => '32', '33' => '33', '34' => '34', '35' => '35', '36' => '36', '37' => '37', '38' => '38', '39' => '39', '40' => '40', '41' => '41', '42' => '42', '43' => '43', '44' => '44', '45' => '45', '46' => '46', '47' => '47', '48' => '48', '49' => '49', '50' => '50'),
fblikebuttondisplays-D6-1171922-16.patch:618: trailing whitespace.

fblikebuttondisplays-D6-1171922-16.patch:678: trailing whitespace.
$block['content'] = _fblikebutton_field($addr, $conf);
Checking patch fblikebutton.admin.inc...
Checking patch fblikebutton.info...
Checking patch fblikebutton.install...
Checking patch fblikebutton.module...
Applied patch fblikebutton.admin.inc cleanly.
Applied patch fblikebutton.info cleanly.
Applied patch fblikebutton.install cleanly.
Applied patch fblikebutton.module cleanly.
warning: 3 lines add whitespace errors.

But It does not work, I get this error massage when I want to configure the module:
warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'fblikebutton_admin_settings' not found or invalid function name in /includes/form.inc on line 377.

dmsmidt’s picture

Whitespace is not neat, but shouldn't concern a problem with the code.
Did you clear all your caches? Did you uninstall the previous version via Drupal first?
Do you see the two menu's under config: Static and Dynamic?

Zayed Al-Saidi’s picture

@ MrDamasajaga, Yes now it works. Thanks.

dmsmidt’s picture

Status: Needs review » Reviewed & tested by the community

Good to know! Have fun.

khan2ims’s picture

dmsmidt’s picture

Version: 7.x-1.x-dev » 7.x-2.0
Assigned: Unassigned » dmsmidt
Status: Reviewed & tested by the community » Fixed

Today I released a new version of the module, incorporating all the new functions. D7 and D6 as well.

Marking this issue Fixed.

ChrisLaFrancis’s picture

Status: Fixed » Needs work

With 6.x-2.0, when "Display on teasers" is enabled, the "like" button is placed in the node's content div, not in the node's links ul...

Even in the full node, the "like" button is placed in the content div, not in the links.

dmsmidt’s picture

Hi,

Thanks for your feedback. In my test setup it works flawless.
Note that you will have to set both the settings of the teaser and the full body manually to the Link area.
Furthermore, did you try to clear your cache. And in the end you may trie to uninstall the previous version and install the updated version again.

ChrisLaFrancis’s picture

Thanks for replying so quickly. I tried clearing the cache, then disabling, uninstalling, re-installing the module, and clearing the cache again, and the "like" iframe is still appearing the the content div rather than the links ul.

Under "Site configuration" -> "FB Like Button", I don't see any options for changing the settings of the teaser or the full node body so that the "like" button is placed in the links area... is there somewhere else I should be looking?

Thanks again.

ChrisLaFrancis’s picture

I think I see the problem... it looks to me like some old files (missing the new configuration options) are included in the 6.x-2.0 release... going to try 6.x-2.x-dev.

ChrisLaFrancis’s picture

Yep, working fine with 6.x-2.x-dev.

ChrisLaFrancis’s picture

Status: Needs work » Closed (fixed)

Marking this issue as closed. Created a new issue for the problem with the 6.x-2.0 release.