Closed (fixed)
Project:
AddThis
Version:
6.x-2.9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Jan 2010 at 19:52 UTC
Updated:
28 Jan 2012 at 11:10 UTC
I want to show the addthis button just after the heading at the top (along with the default placement in the link area near add comment). I see no option for such placement. What should I do to achieve this result? Usually on most professional website addthis is shown on top only. Please help!
Comments
Comment #1
babbage commentedYou could easily do it in a custom node.tpl.php in your theme, as AddThis is output in the $links variable. See #691032-4: AddThis button does not appear if links are excluded in node.tpl.php through theme
Comment #2
vesapalmu commentedYou could also use the addthis block and place it in your page heading if your theme has any regions in the heading.
Hope one of these answers helps you.
Comment #4
SDM-MINK commentedI am a drupal & php novice. I am using an override theme_addthis_button function and the button is appearing at the bottom of each node (full & teaser). I would like to move the button so that it appears at the top of each node (full & teaser). I understand that I can modify the node.tpl.php in my theme to move the AddThis button. But how do I access only the AddThis Button in the $links variable ($links['addthis_button'])?
Can I use this code?
if ($links['addthis_button']):print $links['addthis_button'];endif;May I place this code after
if ($page == 0):and before
print $node_url; ">
print $title;endif;in the node.tpl.php file?
Also, will this code modification stop the button from also appearing at the bottom of each node (full & teaser)?
Please note that I want an alternative to controlling the placement of the button using the AddThis Block since I want the button to appear at the top of several node teasers placed on a single page.
Thanks a bunch!
Comment #5
ManuAdam commentedIt could not be really clear how to place the button on top after heading. Should the code: print $links['addthis_button']; be put before print $content in node.tpl.. bu then it won't show after title. besides if one needs to create custom node.tpl then what is the use of this module if it cant even provide this option of placement - one can as well use the simple one line code provided by addthis site to show the button without any need of this additional module.
Comment #6
iantresman commentedIf you're going to position the Addthis button using a custom node.tpl.php, then you don't need the module, as you can paste the Addthis HTML code into the template.
Not all themes have a block directly above a node. So it would be useful to have an option to display the Addthis button, either at the top, or bottom of a node.
Comment #7
guruslot commentedI have edited node.tpl.php and print $links['addthis_button'] above the content but:
Now I'd like to remove addthis' links from the $links below the content.
Does someone could recommend the best way to perform this?
Thanks in advance!
Comment #8
zil0484 commentedI have the same problem. pls help
Comment #9
rastarr commentedJeez, just when I thought I'd found the perfect all-in-one sharing module, along comes a snag.
I'm currently using 3 different sharing modules which all allow themselves to be placed at the top of the content. Opinion looks like it's divided on where the best place should be BUT for me and a lot of other site owners, including the majority of websites I visit, it seems to be at the top of content, under the title.
Can I ask why this option isn't available for a major sharing platform? I know I can start hacking tpl files and all that but I was originally attracted to Drupal by it's built in flexibility.
I wonder whether a CCK field can include the AddThis buttons? (but then we get the duplication issue of them also appearing in the links area as well.
Such a minor config addition which prevents better configuration, if you ask me.