Domain finder module creates a new block to search for domain names and generate results showing whether they are free or unavailable.It also provides the configuration page which list down the domain extensions and allow user to choose from the list for the extensions they want to find.

Requirements

Requires GPL licensed phpWhois library for whois servers list, and querying.

Project Page - http://drupal.org/sandbox/dj1999/1576590
Git Repository - git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/dj1999/1576590.git domain_finder
Drupal Version - Drupal 7

CommentFileSizeAuthor
#16 regrinfo.jpeg313.57 KBjake1000
#2 df001.png20.16 KBdj1999
#1 no-results.png13.66 KB2pha

Comments

2pha’s picture

StatusFileSize
new13.66 KB

Hi,

There is already a module that makes use of phpWhois: http://drupal.org/project/whois
How does your module differ?

After installing and trying to use the module, I don't seem to get any results. Image attached. This was running from my localhost and I'm not sure if this makes any difference.

domain_finder.info
Consider adding configure = admin/config/search/domain-finder to the .info file so it is easy to find the configuration page.

domain_finder.domains.inc
Is there a better way of getting the domains that phpwhois supports so when phpwhois adds more support this file does not have to be updated?

domain_finder.admin.inc
Do you really need a submit function for your settings form? Can you not just return the results from the system_settings_form function in your domain_finder_generate_admin_form function ?

domain_finder.module
Maybe consider using the libraries module: http://drupal.org/project/libraries instead of:

$file = DRUPAL_ROOT . '/sites/all/libraries/phpwhois/whois.main.php';

You might consider implementing a hook_uninstall function in a .install file to remove the variables that your module sets.

Other than the things pointed out above, the code and comments look pretty good to me.

dj1999’s picture

StatusFileSize
new20.16 KB

Hi 2pha,

thanks for reviewed our module.

This module has other goal as whois. This module just check that domain is available or unavailable in admin form preset domain extensions.

No results.
Repaired that if not just name given find probably what name want to checking. Before first use must set the domain extensions what you want to checking in admin form.

domain_finder.info -> OK

domain_finder.domains.inc
I don't know. If I created this project this was enough me, but if this project will be public maybe need other support about this.

domain_finder.admin.inc
Did not found a way to create needed variables with system_settings_form.

domain_finder.module
Yes are you right, must learn the libraries api that change this function to libraries handling.

Thanks again!
Regards,
Joe

2pha’s picture

when you return the results from system_settings_form in your admin function the saving of your variables is handled automatically as outlined at: http://drupal.org/node/1111260
So there is usually no need for a submit function for your settings form.
But you will still need to remove those variables in a hook_uninstall.

dj1999’s picture

Yes, thanks!
Some change and works fine with system_settings_form :) On this variant must using "checkboxes" and not "checkbox".

Yes variables removing was implemented in last change, forgot to write here.

dj1999’s picture

Now use libraries to check phpwhois library.

suhani.jain’s picture

Issue tags: +PAreview: review bonus

Reviewed 3 projects

Keyword Highlighter: http://drupal.org/node/1773526#comment-6436688
Views JQFX Supersized: http://drupal.org/node/1765872#comment-6437310
Send Coupons to best Customers: http://drupal.org/node/1753688#comment-6437652

Applying for PAReview: review bonus

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus

Please add all reviews that you did to the issue summary, as outlined in http://drupal.org/node/1410826

who is the applicant that will get the git vetted user role in this application? The sandbox belongs to dj1999 but the application was created by suhani.jain?

manual review:

  1. domain_finder_domains_ext(): use arry_filter() instead of the foreach loop.
  2. "if (function_exists("libraries_get_path")) {": since your are depending on the libraries module anyway this function will always be available. Remove that check.
  3. "$error = t('No phpWhois library found in !path folder.', array('!path' => $path));": you should use the "@" or "%" placeholder per default if you do not want to use HTML tags in the replacement anyway.
  4. "drupal_set_message(check_plain($error), 'error');": no user supplied text is involved here, so the check_plain() is not necessary. Please read http://drupal.org/node/28984 again.
  5. "watchdog('domain_finder', $error, NULL, WATCHDOG_ERROR);": do not pass already translated variables to watchdog(), as the translation system will be invoked when the log messages are read.
  6. domain_finder_preprocess_domain_finder_result(): $result['regrinfo']['domain']['name'] is provided by a third party service and is therefore considered untrusted user supplied input. You should sanitize that before providing it in theme variables.
  7. domain_finder_get_base_url(): that function is never used, or am I missing something?
  8. "module_load_include('inc', 'domain_finder', 'includes/domain_finder.domains');": no need to use module_load_include as you are including files from your own module which you already know where they are. Use something like require_once 'mymodule.inc';

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

dj1999’s picture

Hi klausi,

tanks for review!

Who is? I wrote basic code suhani.jain is co-maintainer and in this case help me properly project creating.

Reviews all was changed. I do not know why easier the include_once + helper function instead module_load_include, but if it is easier than changed :)

Thanks again for reviewing! It was very useful.

Regards,
Joe

suhani.jain’s picture

Status: Needs work » Needs review

As we have made all the changes mentioned by Klausi so changing its status to needs review

Thanks,
Suhani

suhani.jain’s picture

Issue tags: +PAreview: review bonus

Hi Klausi,

It would be great if you will give 'git vetted user role' to both :)

Reviewed 3 Modules

http://drupal.org/node/1784562#comment-6495342
http://drupal.org/node/1777996#comment-6495328
http://drupal.org/node/1772594#comment-6495586

Applying for PAReview: review bonus

Regards,
Suhani Jain

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

manual review:
"t($error, array('%path' => $path)": do not pass variables to t() where possible as that cannot be detected by translation string extraction tools.

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.

I guess it is ok to give you both the git vetted user role once this gets approved.

suhani.jain’s picture

@klausi - Thanks for RTBC!!

1) Fixed issue mentioned above.

Regards,
Suhani Jain

klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, suhani.jain and dj1999!

I updated your account to let you 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 get 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.

dj1999’s picture

Thanks for reviews and help klausi!

Regards,
Joe

suhani.jain’s picture

Thanks @klausi for granting git vetted user role.

Thanks everyone who reviewed my module.

Regards,
Suhani Jain

jake1000’s picture

Status: Fixed » Needs work
StatusFileSize
new313.57 KB

moved to issues

klausi’s picture

This application is closed. Please report all issues about the module to its issue queue.

Status: Needs work » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.