Hello. I think it's Facebook's default but is it possible to display the count number, even if it is a zero? So it will match the twitter button as displayed in the picture attached. Many thanks and regards.
Never mind. I search over the internet and found an answer in a wordpress plugin site:
Currently there is no way to force the button to display a zero by default. Facebook's Share script controls the count display and they've set it to only appear after an item has been shared. I am exploring ways around this, as numerous users have requested this feature, but so far it appears Facebook would rather only display the count if an item has been shared.
Yet if there's some workaround for this, it'll be great :)
Edit:
I found the answer to my question on a drupal site, it is using JQuery.
Hi CS02, I tried to use this module but it didn't work, so I reverted to adding the share button code directly in my template. I've used your link to display the 0. It works fine when there is only one button, but in the case of multiple buttons such as on tag lists or on the homepage, only the first one shows 0, the others below are normal (no above ballon)
Do you have an idea about what to change in the script?
Hello alliax. I had been in a long holiday and unable to visit d.o for awhile. I am sorry I do not have the basic knowledge of jquery nor theming, etc. In the meantime, I hope you already find a solution for that problem or probably somebody else can shed some lights on it. Yet, looking at the codes (taken from the very module, even if I do not understand them), you could probably put these lines into your template.php on your theme directory. Bear with me that I'm not a coder myself and if it doesn't work I will have no clue what to do next. Regards.
Comments
Comment #1
th.sigit commentedNever mind. I search over the internet and found an answer in a wordpress plugin site:
Currently there is no way to force the button to display a zero by default. Facebook's Share script controls the count display and they've set it to only appear after an item has been shared. I am exploring ways around this, as numerous users have requested this feature, but so far it appears Facebook would rather only display the count if an item has been shared.Yet if there's some workaround for this, it'll be great :)
Edit:
I found the answer to my question on a drupal site, it is using JQuery.
Here's the link: http://www.flevour.net/blog/facebook-share-button-and-little-annoying-be....
Here's what I do:
I created a file called custom.js in my theme folder. Simply copy-and-paste the code from the above link within the file. And finally insert this line
scripts[] = custom.jswithin the theme's .info file. After clearing the cache, the '0' number appears on the count button!
Yet, it is a great idea if this could be applied to the current module (I do not know how to do that).
Thanks for providing this module, and regards.
Comment #2
alliax commentedHi CS02, I tried to use this module but it didn't work, so I reverted to adding the share button code directly in my template. I've used your link to display the 0. It works fine when there is only one button, but in the case of multiple buttons such as on tag lists or on the homepage, only the first one shows 0, the others below are normal (no above ballon)
Do you have an idea about what to change in the script?
Comment #3
th.sigit commentedHello alliax. I had been in a long holiday and unable to visit d.o for awhile. I am sorry I do not have the basic knowledge of jquery nor theming, etc. In the meantime, I hope you already find a solution for that problem or probably somebody else can shed some lights on it. Yet, looking at the codes (taken from the very module, even if I do not understand them), you could probably put these lines into your template.php on your theme directory. Bear with me that I'm not a coder myself and if it doesn't work I will have no clue what to do next. Regards.
Comment #4
saveyou commentedYou can change into this, that's it