CVS edit link for willsteinmetz
The module that I created enables Drupal site administrators to add a Facebook Share button to selected nodes in their website(s). The motivation behind creating this module was the TweetMeme module that allowed users to retweet about a given website node. After searching through the modules directory on Drupal.org, I was unable to find a module that offered similar functionality as the TweetMeme module but for Facebook share.The Facebook Share module gives Drupal site administrators the ability to choose settings for which nodes to display the button on, whether to display on the teaser, full view, or both, what button type to be displayed, and what share text to be displayed on the button.
I currently have a working version of the module in use on my project website http://hot4headers.com.
I intend to keep up with this module and apply bug fixes and updates as necessary. I will also keep on top of changes in the Facebook API that cause the underlying code for the Facebook Share button to need to be changed.
It is my hope that in the future I will also be able to contribute other modules to the Drupal community as well as the Facebook Share module.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | facebookshare.tar_.gz | 2.42 KB | willsteinmetz |
| #10 | facebookshare.tar_.gz | 2.45 KB | willsteinmetz |
| #8 | facebookshare.tar_.gz | 2.38 KB | willsteinmetz |
| #1 | facebookshare.tar_.gz | 2.18 KB | willsteinmetz |
Comments
Comment #1
willsteinmetz commentedComment #2
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
As per http://drupal.org/cvs-application/requirements, the motivation message should be expanded to contain more details about the features of the proposed module, and it should include also a comparison with the existing solutions.
Comment #3
willsteinmetz commentedThe Facebook Share module enables Drupal site administrators to add a Facebook Share button to selected content type nodes in their website(s). The motivation behind this module was the TweetMeme module which allows users to retweet about a given website node.
The Facebook Share module gives Drupal site administrators the ability to choose the following settings:
When the Facebook Share module is enabled for a content type, website viewers can click the Facebook Share button to share a link to that node in their Facebook stream.
Benefits of using the Facebook Share module instead of modules that allow users to select from a variety of social networks (ex: Add to Any Share/Bookmark Button and Service links):
A working version of the module can be seen at http://hot4headers.com.
Comment #4
zzolo commentedI don't necessarily think you should be using the FB Drupal module, but you have not mentioned this at all. Can you describe the difference between your module and the FB module. http://drupal.org/project/fb
Comment #5
willsteinmetz commentedUpdated motivation message per zzolo's comment about the FB Drupal module:
The Facebook Share module enables Drupal site administrators to add a Facebook Share button to selected content type nodes in their website(s). The motivation behind this module was the TweetMeme module which allows users to retweet about a given website node.
The Facebook Share module gives Drupal site administrators the ability to choose the following settings:
When the Facebook Share module is enabled for a content type, website viewers can click the Facebook Share button to share a link to that node in their Facebook stream.
Benefits of using the Facebook Share module instead of modules that allow users to select from a variety of social networks (ex: Add to Any Share/Bookmark Button, Service links, and FB Drupal):
A working version of the module can be seen at http://hot4headers.com.
Comment #6
zzolo commentedSome thoughts:
:)
You should figure out a way to utilize your theme function to display these as someone could override the theme and this would no longer be representative of the buttons. Also, having all that output not in a theme is just kind of icky.
You should be using CSS for this. This is very difficult, if not impossible to override.
Could be better written as:
Overall, pretty minor changes. This is real close. Good work.
Comment #7
zzolo commentedComment #8
willsteinmetz commentedCode has been updated/fixed per zzolo's comment above.
Thanks, zzolo!
Comment #9
zzolo commentedGetting there:
You should not be putting CSS in an init hook unless it really needs to be on every page. You should add your CSS before you call your theme function in the nodeapi hook.
You are not using the t() when needed. Also, I was hoping you would use a loop or something here. You could define a short array then loop through it and save lots of code and effort (not a huge deal). To really be up to standard, you should create a theme function for this, and all you would have to do is send it your array of types.
You don't have a title. Not necessary, but a suggestion would be to actually display each example next to the selection (this would require using a radio list).
So close!
Comment #10
willsteinmetz commentedCode has been updated/fixed based on zzolo's last comment.
The display of the button sizes on the configuration has been changed to radio buttons instead of a display followed by a drop-down which helps the flow of the page and looks a lot better than it did before.
The CSS file call has also been moved to the hook_node_api() function implementation so that it's not included on pages that the Facebook Share button will be displayed on.
Also, are there any other suggested changes to the last update I made to the motivation message above? (comment #5 above)
P.S. Thanks for all of the great suggestions, zzolo
Comment #11
zzolo commentedYour updated manifesto for the module is much better and totally acceptable.
This CSS declaration will alter how all radios will look. You should use the element ID that gets put on the wrapper of the rendered element; using Firebug will make it really easy to see the HTML. Technically you should have a separate CSS file for your admin page since it is only needed on one page, but I don't think thats necessary here.
You should be able to target just that element and use the clear you need. You could also (though not suggested) use a "clear-block" class on the "facebookshare_size" element with attributes which should clear it out.
So close. The first one is important while the second two are not as necessary. I bet next one around will be it.
Comment #12
willsteinmetz commentedI have made the updates to the code per zzolo's comment above.
The CSS for the admin settings form has been added to its own CSS file that is only attached when the admin settings form is loaded. The spacer <div /> has also been removed from the form. Also, not sure how the tabs got in there so they've been replaced by spaces like they should be.
Hopefully this round did it.
Comment #13
zzolo commentedThat's one good looking module! I would say this is ready to go. Good work.
Comment #14
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #17
avpaderno