Needs review
Project:
Facebook Share
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2010 at 18:46 UTC
Updated:
14 Jun 2012 at 16:34 UTC
Jump to comment: Most recent file
Comments
Comment #1
SandStorm commentedYou can use Content Templates (Contemplate) to place the button wherever you like.
http://drupal.org/project/contemplate
Comment #2
willsteinmetz commentedIf you're not willing to use CSS in a theme, your best bet is probably the link in SandStorm's comment above
Comment #3
apanag commentedIs it possible to give user a choice, to select between node content and hook_links?
Comment #4
willsteinmetz commentedI will keep the positioning in mind for the next version of this. Facebook recently redesigned their "Like/Fan" system so I'm waiting to see if they also muck up the Share system as well or pull it in under "Like" before I do too much.
For now your best bets are using CSS or jQuery in a theme or the module that SandStorm suggested above.
Sorry for the short response both times, things have been hectic this way the past few weeks.
Comment #5
CinemaSaville commentedI appreciate it. Thank you.
Comment #6
dcomfort commentedIt would be great if you could make this available as a block. Do you have any plans to do so?
Comment #7
nyleve101 commentedHi,
what is the required code to print the button in a node template please?
Comment #8
willsteinmetz commentedThis module was created to avoid having to work with code. At some point an update will be made to give the module a weight for where to display it.
If you want to put code directly into a template, you're best off using the Facebook Share base code. The code can be found here: http://www.facebook.com/facebook-widgets/share.php
Comment #9
DrupalKing commentedI was able to place the FB share anywhere I wanted in my node.tpl.php by using this code....
print $node->content['facebookshare']['#value']Comment #10
nyleve101 commentedThank you so much Hochmania that's exactly what i was looking for!!
I hope you're well and taking care of yourself!
Evelyn
Comment #11
copeasetic commentedThe above code does not seem to work for some reason. The php snippet breaks.. Not sure why. It looks like correct syntax to me.
Comment #12
robloachThis allows you to move the placement around via the weight.
Comment #13
rv0 commentedthe php snippet is missing the ;
when you add it it works fine.
patch didnt work for me though
Comment #14
joachim desarmenien commentedI was about to hack line 76 of the module
'#weight' => -10,This snippet works very nice for me, but it duplicates the facebookshare button, so i have two of them ...
Comment #15
Josephnewyork commentedI had a problem too with needing weight, but came up with an even better solution. Adding it to the node's links!
Here's what I did in my template.php file:
Worked great. Just change $variables['teaser'] to !$variables['teaser'] to perform on full nodes, or remove it all together to show on both.
Comment #16
physiotek commentedhI! adding it to the node's link would be perfect for me... but i have an error with the previous code.
Erreur HTTP 500 (Internal Server Error) : An unexpected condition was encountered while the server was attempting to fulfill the request.of course i changed for my theme name...
i have the latest drupal 6 version with the latest facebook share version too.
and the problem if i use
is like someone mentionned that there is 2 instances.
Comment #17
yaworsk commentedHi All,
here are patches that allow you to place the button in the node links and also give the button a weight. I have two patches because one is for the admin.inc file and the other is for the .module file.
This is my first patch so let me know if it doesn't work (I also wasn't sure if you could combine patches for two different files into one single patch...)
Thanks,
pete
Comment #18
willsteinmetz commentedWeight option was added in version 6.x-1.1
Comment #19
krisrobinson commentedHas anyone tried the patches in #17?
Comment #20
revol commentedHello, here's a patch over 6.x-1.1 which adds the option to move the button on the 'links' section of a node. I used #17 yaworsk patch plus some fine tunings.
Hope this helps.
Comment #21
mvcI didn't test the links section patch, but I used it as a basis for an equivalent patch for the 7.x branch: #1635292: Option to place button in node links
Meanwhile, it looks like this 6.x patch is still awaiting review. I've re-opened the issue and clarified the title to help with that.