SocialMediaBar is a static/floating sharing bar for sites that is very lightweight on the front-end and uses the native sharing portals of different social networks. It is lightweight as a plugin, only exposing a small admin interface and a few routes, and light on the front-end as it removes the need for lots of service-specific Javascript code to be loaded. It also provides user-configurable caching for the counting.
It is designed for theme developers, and therefore doesn't expose a lot of configuration via the back-end other than caching, what networks to provide, and a single API key entry (if needed). The module is meant to be overridden via CSS and and the included theme file so that the user has the most flexibility in how it is displayed on their site.
The code is already in a production-ready state, having been cleaned up from our internal use to make it ready for public release, but I am looking forward to any suggestions/modifications from the project reviewers.
A D8 version is also being looked at, so that it is available as soon as possible for Drupal 8.
It does share many similarities with ShareBar, but ShareBar is meant as a more user-configurable setup and uses much of the native Javascript, needing to inject it into the site, whereas SocialMediaBar does the counting and sharing via routes exposed in Drupal. Since ShareBar uses the client-side sharing tools, it also provides much less configuration over the actual output of the final product, and the branding in the final output would turn some potential users off (as was the case with our needs, being used on commercial sites needing tight branding of their own).
The project itself is at https://drupal.org/sandbox/dragonmantank/2279295 and the repo is at git.drupal.org:sandbox/dragonmantank/2279295.git
It is dependent upon https://drupal.org/sandbox/dragonmantank/2279761, which I'll also need to promote. It is just a small wrapper module around one of the jQuery libraries needed for the SocialMediaBar library, since jQuery Visible is MIT licensed.
Reviews of other projects
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | coder-results.txt | 3.16 KB | klausi |
| #21 | pareview.sh-errors.png | 67.27 KB | sanat.panda |
| #19 | SocialMediaBar.png | 118.36 KB | irfworld |
| #13 | coder-results.txt | 12.43 KB | klausi |
| #12 | autoreview.txt | 3.05 KB | ruslan piskarov |
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxdragonmantank2279295git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
dragonmantank commentedFixed CS and PAReview issues
Comment #3
dragonmantank commentedComment #4
dragonmantank commentedAdded 2nd reviewed module
Comment #5
dragonmantank commentedCleaned up reviewed projects area in the summary
Comment #6
kvnm commentedHi dragonmantank,
This seems like a useful module. I noticed a couple things off the bat:
Comment #7
kvnm commentedalso, forgot to mention in last comment, but the ShareThis API variable isn't uninstalled along with the other two in hook_uninstall()
Comment #8
dragonmantank commentedThanks kvnm. I took care of the issues you posted about except the ShareThis hover UI. That's the way that ShareThis does the e-mail sharing so I have no direct control over that. If there was a better sharer that did e-mail I'd much rather use that, but haven't found one as good as ShareThis.
Comment #9
vtkachenko commentedHi dragonmantank,
I have some suggestions, about your module.
* Use drupal_get_query_parameters instead of $_GET;
* Use drupal_goto instead of header('Location:' ...
* Use drupal_exit() instead of die()
* Add watchdog_exception('socialmediabar', $e) in catch block;
* Missed t() for titles of some elements.
* Wrong variable name:
* Place description to fieldset description instead of separate element:
* Use url() function:
* Specify module-related wrapper in selector:
* It sould be more fast and looks better if front-end send single request for all counters to path (/socialmediabar/countproxy);
* Make feature with .visible() optional. Some time it`s not looks good. Also it requires extra module from sandbox.
I hope it will help you to make module better.
Thank you.
Comment #10
dragonmantank commentedThanks vtkachenko!
I implemented most of your suggestions except a few. I didn't switch to using url() because in the src/ directory that code is being handled by many different backends (for example, a Wordpress version is also being worked on), so I'm trying to keep that code as platform agnostic as possible. I've experimented with using one single call to get the counts, but overall it didn't seem to impact live sites and allows us to return some of the counts as opposed to throwing errors and not getting anything at all.
It's also dependent upon the jquery Visible plugin (which I'll move out of Sandbox once I have the ability), as one of the main features of the module is it always being visible. Down the line if it turns out there is a demand for turning it on and off I may add that functionality.
Comment #11
dragonmantank commentedSince I ended up having a need for it, I added the ability to turn the jQuery Visible stuff on and off. It is no longer dependent upon the extra module, and will function even if it's not installed but the option is enabled. It will show an error stating to install jQuery Visible.
Comment #12
ruslan piskarovHello dragonmantank.
I still see a lot of warnings. Pls look attacment. It is very difficult to review.
Also i found one error in css file:
.socialmediabar .container:hover { background: }
About Network.
Not all PHP installations come with cURL.
Perhaps this should be indicated in the readme.txt?
Thanks.
Comment #13
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
The licensing issue is a blocker right now. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #14
dragonmantank commentedRuslan,
I cleaned up the issues form the autoreview, and added a note about requiring cURL.
klausi,
I fixed the issues that you identified and updated the project page description. The licensing issue was an oversight of mine, I thought I had added the headers for v2, not v3. The EFF and GPL site recommended putting the header blocks on each file so that if someone takes a single file there would be no confusion over the licensing, but I went ahead and just removed them all.
Comment #15
ordasoft commentedHello dragonmantank!
Thanks for your work, your module is pretty good,
I have few remarks:
you don't register file of admin panel in .info
and there is no admin permission for your module
Comment #16
dragonmantank commentedHi Orda!
Can you please explain? The configure option should be on line 13 of the .info file, and the permissions should be registered in the .module file (socialmediabar_permission(), starting line 275) and used in socialmediabar_menu() on line 23.
Comment #17
joris_luciusThings that got my attention right away;
Functional testing:
echo socialmediabar_render();to page.tpl.phpPAReview: (results)
Coder review (using the minor (most) option to see everything.
Comment #18
dragonmantank commentedThanks for the review Joris.
In the order presented:
Comment #19
irfworld commentedPaReview Result:
Review of the 7.x-1.x branch (commit 0a03e7b):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Source: http://pareview.sh/ - PAReview.sh online service
Manual Review:
Also i was just going through your code & the admin form, and found that the following message coming TWICE whenever some one submits the module admin setting form:
"SocialMediaBar requires cURL to be enabled in your PHP setup. Please enable cURL to activate SocialMediaBar."
"You have enabled "Always Visible" but have a broken installation of jQuery Visible. Please download and install the jQuery Visible module. Until this is corrected, Always Visible will not function."
(Please refer the attached screenshot("SocialMediaBar.png") for the same.)
Comment #20
samir_mankar commentedThank you for the contribution @dragonmantank!
Automated reviews
PAReview didn't throw any errors.
Manual review
The variables which are set using the system_settings_form should be deleted in hook_uninstall() in a install file of the module. Naming conventions of the variables follow the standards.
Comment #21
sanat.panda commentedHi,
This seems to be a very useful module.
Please do fix the Pareview issues. It's still showing some issues.
Please have a look on the attached file and fix those as quick as possible.
Thanks
Comment #22
dragonmantank commentedCleaned up all the Drupal CS whitespace errors.
I also changed the check for cURL and jQuery Visible. Now the module will not enable if cURL is not installed, and the options for Always Visible are not available unless the library is properly installed.
Comment #23
klausiLooks like you forgot the review bonus tag. Assigning to myself for the next review.
Comment #24
klausiReview of the 7.x-1.x branch (commit d866e98):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
'#markup' => '<strong>Always Visible</strong> - Please download and install the jQuery Visible module to enable "Always Visible" options.',: all user facing text must run through t() for translation. Same for "$errors[] = 'Please provide a URL to share.';". Please check all your strings.But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to heddn as he might have time to take a final look at this.
Comment #25
heddnThis gets repeated several times, maybe move to a common error function?
buildShareURL(). This could lead to parameter tampering when used with a specially crafted URL. Not much can be done about this, so it isn't a blocker.However, none of this is blocking. So...
Thanks for your contribution, dragonmantank !
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, 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.
Thanks to the dedicated reviewer(s) as well.
Comment #26
vanyamtv commentedWell, generally would be nice to have a block which will just render the social media bar.
The second point is about centering the popup window, when you're trying to share smth:
js/socialmediabar.js, line: 24
window.open(proxy_url, '_blank', 'menubar=no,width=500,height=500');
could be changed to:
var width = 500;
var height = 500;
var left = ($(window).width() - width) / 2;
var top = ($(window).height() - height) / 2;
window.open(proxy_url, '_blank', 'menubar=no,width='+width+',height='+height+',left='+left+',top='+top);
And btw, is it possible to make a shares counter for LinkedIn as well?
Thanks.
Comment #27
heddnre #26: This issue is focused on vetting the user's ability to use the Drupal API and understand how to securely code. Your feedback is great but doesn't affect the decision to grant the ability to promote this to a full project. At this point, your feedback should move into an issue in the project's issue queue.