Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2012 at 09:11 UTC
Updated:
19 Jul 2013 at 17:12 UTC
Add Hupso Social Share Buttons to your articles and help visitors share your content on the most popular social networks: Twitter, Facebook, Google+, Linkedin, StumbleUpon, Digg, Reddit, Bebo and Delicous.
Share buttons are very easy to configure. Just select button size, button type and configure which services do you want to offer to your visitors.
Supported version: Drupal 7
Project page: http://drupal.org/sandbox/penga/1806244
Git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/penga/1806244.git hupso_social_share_buttons
| Comment | File | Size | Author |
|---|---|---|---|
| sharebuttons_screenshot2.png | 6.71 KB | penga | |
| screenshot-menu.png | 20.71 KB | penga |
Comments
Comment #1
d2ev commentedHi @penga
You need to check module duplication issue as there are many other module present in Drupal contirbution list which are giving the same feature.
Comment #2
penga commentedHi, D2ev!
Thank you for your suggestion.
I checked that already. There are some similar projects that also support social sharing (ShareThis, AddThis), but this is the only project that is using Hupso Share Buttons service, which provides different features for social sharing that other services (different share buttons, minimalistic menus, floating toolbars, etc.)
Comment #3
iwhitcomb commentedhttp://ventral.org/pareview/httpgitdrupalorgsandboxpenga1806244git-7x-1x
Comment #4
iwhitcomb commentedSome other suggestions:
Line 155: hupso_node_view()
You're doing a strpos() to look for {hupso_hide} in order to hide the share buttons on specific nodes which is successfully hiding the buttons, but the {hupso_hide} string is still showing up in the content. Also, the proper way of doing this would be to add something like a checkbox on the node edit/create form rather than looking for a string in the content of the node.
Line 180: _hupso_get_button_code()
Rather than outputting a hard-coded string for the buttons please utilize hook_theme() and Drupals theme layer to render your button code otherwise it makes it very difficult to properly theme the buttons.
-Ian
Comment #5
d2ev commentedManual Review:
1. You really need to define your own admin rights, so that users can more fine-grained control.
2. .info file : Give your module a package name, now you haven't mention any package and it goes to other module list.
3. You need to change you implementation. In your admin setting form add setting for content type for which this Hupso Social Share Buttons should apply.
4. Line no 159 :
$menu = menu_get_object();variable is defined but not used anywhere.5. Code :
is not a good idea to put your code directly after the body field. Try to put it node links like other social sharing modules do.
it will be great if you have explore "hook_content_extra_fields()". It seems that there not much documentation available for this hook but it is being user for drupal 7 module EVA: Entity Views Attachment (http://drupal.org/project/eva) and http://www.lullabot.com/articles/great-pretender-making-your-data-act-field.
hope it helps :)
Comment #6
penga commentedThank you all for your reviews.
I have fixed all the reported issues:
1. Defined admin rights.
2. Defined package inside .info file.
3. Added settings for content type to admin settings form. It is now possible to show share buttons in articles, basic pages and teasers. "{hupso_hide}" method is no longer used.
4. I have aslo checked the code with Coder and PAReview.sh and they report no errors.
Comment #7
varunmishra2006 commented@penga
Manual Code Review
I have found two problems in code.
1) You are setting many variables in module configuration page. But you didn't create any .install file for module. You need to create .install file for this module and delete those variable in hook_uninstall .
2) Why such code
Comment #8
penga commentedThank you for your suggestions, varunmishra2006.
1) I have created .install file so all variables are now deleted on hook_uninstall().
2) I managed to separate code from display without hook_theme. I created hupso.css file, so share buttons can now be easily styled by editing this file.
Comment #9
devin carlson commented/**
* @file
* Ininstall and uninstall for Hupso Social Share Buttons Module.
*/
Spelling mistake; "Ininstall" should be "Install".
This should read "Implements hook_uninstall()."
Just writing
Implements hook_help().should be enough.You don't need to declare
'cache' => DRUPAL_CACHE_PER_ROLE,as it's the default setting.You don't need to declare
'type' => MENU_NORMAL_ITEM,as it's the default setting. Also, the access argument should use the permission that you previously defined inhook_permission(administer hupso).I don't think you need
$base_pathhere (similar code is found throughout the module and should also be updated).Both
and
should probably have the array values run through t() in order for them to be made translatable.
I'd suggest removing
_hupso_get_button_code()in favor of providing a theme function and an associated template file which would allow the contents of the block to be more easily customized by themers.I would also suggest building the block content as a render array and using #attached to add any required CSS or JS. There are a number of benefits to doing so including better caching and easier customization by other developers.
Also, I honestly don't see
serving enough of a function (it only has one style rule to remove left padding from the buttons) and is highly theme dependent. I think you're better off just leaving any required styling to the site builder.Comment #10
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #11
bearstar commentedWould it be possible to post the latest files in a zip file? I don't know how to get hold of the files using GIT.