The Mapply module adds a shortcode to Drupal that allows a Mapply locator map to be added to any page. The admin screen also includes a form to manage a Google Map API key as well as your Mapply API key. This module makes the already simple Mapply integration even easier by not requiring any knowledge of Javascript to add to a website.
This module depends on the Shortcode module.
Mapply (http://mapply.net) is a service that allows users to setup store locations and embed a map of those locations on their website. Simple JavaScript code is provided to install onto any website. Mapply has free registration and a 30 day free trial.
Git clone command: git clone --branch 7.x-1.x-dev http://git.drupal.org/sandbox/tysonkroeker/2291965.git mapply
Project Link: https://www.drupal.org/sandbox/tysonkroeker/2291965
Comments
Comment #1
gwprod commentedThis should initially be set as Needs review
Comment #2
pushpinderchauhan commentedPlease run PAreview.sh once, reporting multiple issues in your module.
URL: http://pareview.sh/
Comment #3
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxtysonkroeker2291965git
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 #4
tysonkroeker commentedThank you for the prompt responses. After some work the online tool is no longer reporting any errors.
Comment #5
tysonkroeker commentedComment #6
daniel.moberly commentedIt is still reporting some warnings, which you may want to check.
You should add cURL as a requirement to the module README, as not all servers have cURL installed. You may also consider a cURL check in the module itself, something like:
Comment #7
Rostislav Sergeenkov commentedHello @tysonkroeker and thank you for your work!
Pareview / Coder:
There are some issues with the code.
http://git.drupal.org/sandbox/tysonkroeker/2291965.git
Coder: No Problems Found
Manual review:
1. When I access /admin/mapply I see
Strict warning: Only variables should be passed by reference in include() (line 40 \sites\all\modules\contrib\mapply\settings.tpl.php).
To fix that error assign value of drupal_get_form('mapply_settings_form') to any variable, and then call in settings.tpl.php, str 40
print drupal_render($my_variable);1. Why does the module create its own configuration page in the root level of Administration UI?
IMHO it's better to move it under existing Configuration section. It can be for instance admin/config/user-interface/mapply.
2. Page callbacks mapply_configuration() and mapply_settings() return string (Drupal 6 style) instead of renderable array (Drupal 7).
Drupal 7 uses the concept of "Renderable Arrays" - https://www.drupal.org/node/930760 . In this case the page remains alterable via hook_page_aletr(&$page).
Instead of
You can use
You should also add 'variables' or 'render element' property in the hook_theme to prevent error "Notice: Undefined index: render element in theme()"
The same relates to the declaration of mapply_settings() function.
3. I see that your module sets variables
What about cleaning them up in hook_uninstall of mapply.install file?
Code Style:
1. Check array formatting in mapply_menu() and in mapply_settings_form(). It should be one space separating each element, not multiple spaces.
Refer to https://www.drupal.org/coding-standards#array
Comment #8
MattWithoos commentedTo improve the number of responses and speed up the review process, I would recommend adding a link to the project page, obtaining a Review Bonus and adding a link to the automated PAReview.
Comment #9
MattWithoos commentedComment #10
tysonkroeker commentedAdded link to the project
Comment #11
tysonkroeker commentedFirst off, thank you @rostislav-sergeenkov and everyone else, for your detailed comments. They were just what I needed to understand a better way of doing what I was trying to do.
My code spacing habits (for a previous employer) have come back to bite me here. I've got those spacing issues corrected now.
pareview results
http://pareview.sh/pareview/httpgitdrupalorgsandboxtysonkroeker2291965gi...
0 Errors and a few warnings on line length in the README.md file.
Comment #12
MattWithoos commented@tysonkroeker, a few thoughts - one, you should really try to get the PAReview bonus. The Git admins don't even seem to be looking at PA's without one, at least not in priority.
Secondly, as the purpose of this is to demonstrate your understanding of Drupal coding standards, I would suggest applying appropriate linebreaks. However this won't be a blocker and I won't change the status.
Third - you mentioend old employer indent habits. Don't worry, this is just the Drupal community's way of indenting. It's not right or wrong, it's more about everyone doing the same thing. That's part of what is being checked for in these applications.
Comment #13
tysonkroeker commentedLine lengths fixed updated pareview results:
http://pareview.sh/pareview/httpgitdrupalorgsandboxtysonkroeker2291965gi...
Comment #14
darol100 commented@tysonkroker,
To make it more clear to the user you should change it to "Mapply requires Php cURL" instead of "Mapply requires cURL".
And example of the Hook_help been read from READ ME file.
When I use to be a site builder hook_help was one of the place I used to look for help and also this a best practice for writing a module.
Comment #15
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.