Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi. Thanks for the awesome module, exactly what I wanted. However, since I'm also using the Tweet Meme, I was wondering if there's a way to be able to place it below that? And more specifically if you could add that to the module itself, since I'm not that great at theming.
Comment | File | Size | Author |
---|---|---|---|
#20 | add_links_option.patch | 3.8 KB | revol |
#17 | facebookshare_admininc_links_weight.patch | 1.04 KB | yaworsk |
#17 | facebookshare_module_links_weight.patch | 2.83 KB | yaworsk |
#12 | facebookweight.patch | 1.85 KB | RobLoach |
Comments
Comment #1
SandStorm CreditAttribution: SandStorm commentedYou can use Content Templates (Contemplate) to place the button wherever you like.
http://drupal.org/project/contemplate
Comment #2
willsteinmetz CreditAttribution: 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 CreditAttribution: apanag commentedIs it possible to give user a choice, to select between node content and hook_links?
Comment #4
willsteinmetz CreditAttribution: 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 CreditAttribution: CinemaSaville commentedI appreciate it. Thank you.
Comment #6
dcomfort CreditAttribution: 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 CreditAttribution: nyleve101 commentedHi,
what is the required code to print the button in a node template please?
Comment #8
willsteinmetz CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: rv0 commentedthe php snippet is missing the ;
when you add it it works fine.
patch didnt work for me though
Comment #14
joachim desarmenien CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: willsteinmetz commentedWeight option was added in version 6.x-1.1
Comment #19
krisrobinson CreditAttribution: krisrobinson commentedHas anyone tried the patches in #17?
Comment #20
revol CreditAttribution: 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.