Change the message used when the domain is available, and make it translatable

xyber - June 21, 2009 - 06:34
Project:Whois lookup
Version:6.x-1.1
Component:Miscellaneous
Category:feature request
Priority:critical
Assigned:Unassigned
Status:needs review
Description

Hi guys,

Need you help, is there a way to tell customers that a domain is available when they do a whois search. As in it will just reply domain available instead of

No match for domain "GHKJSHKFHEKFHKS.COM".
>>> Last update of whois database: Sun, 21 Jun 2009 06:30:27 UTC <<<

-Xyber.

#1

KiamLaLuno - June 21, 2009 - 06:40

Isn't that enough? If the module doesn't find any match, it means the domain name has not been registered.

#2

xyber - June 21, 2009 - 06:42

Yes i know but its not very friendly to be showing that message to users esp since the screen will be cluttered with text and all. Is there a way for me to customize what is returned in case it returns the above-mentioned code? Is it possible to replace it?

-Xyber.

#3

KiamLaLuno - June 21, 2009 - 07:01
Title:Domain Availability» Change the message used when the domain is available, and make it translatable

The module simply output what the Whois library reports to it; as consequence, the output is not even translated into the current language set for Drupal (nor it's translatable). It would be better to change the way the message is generated, and make possible for the administrator user to change the message shown to the user.

I agree that this feature would be useful.

#4

xyber - June 21, 2009 - 07:05

Yup, anyone has any clue on how to make this work then?

-Xyber.

#5

KiamLaLuno - June 21, 2009 - 07:14

Without to change the code of the Whois library, there is not a way of doing what you are asking for. If the module would check a value returned from the library, and print its own message, it would be easier.

#6

xyber - June 21, 2009 - 07:15

Yup, i thought as much, but i'm a php noob and am clueless on how to make the changes...

-Xyber.

#7

helmo - June 22, 2009 - 12:43

I disagree that a change in the whois library would be needed, the $result['regrinfo']['registered'] contains the info we would need for this.

I have been working on this last week and have been experimenting with the addition of a template file.

I was thinking of passing the domainname and a boolean (registered or not) to the theme function and place translatable strings for both cases in the template.

In order to be even more informative to the user I would like to indicate about a registered domain if it is already registered via our company or somewhere else.

I could do this by easily by overriding the default template but am reluctant to add such logic to the theme layer.
If more people are interested in such a feature though.... a setting on the admin/settings/whois page might be in order.

#8

helmo - June 23, 2009 - 12:37
Status:active» needs review

The attached patch introduces the 'HTMLized status only' output method. Which in turn uses whois_domain_status.tpl.php to output results.

Before applying the patch be sure to first apply refactor_whois_get_whois-1.patch from issue #409552: Refactor whois_get_whois()

As a bonus this patch includes an additional block definition to show a mini lookup form (e.g. in a sidebar)

#9

helmo - June 23, 2009 - 12:40
AttachmentSize
drupal_497686_whois_themable.patch 5.46 KB

#10

xyber - June 23, 2009 - 14:33

Hey man, thanks fer the neat work but i had some problems patching the refactor patch. Here it is http://drupal.org/node/409552#comment-1733782 Please advice...

-Xyber.

 
 

Drupal is a registered trademark of Dries Buytaert.