Jump to content

Tidy up the whois? Multiple whois searches?


Recommended Posts

Hi All,

 

I'm trying to edit my whois search page to try and make it similar to http://www.123-reg.co.uk (https://www.123-reg.co.uk/order/domain?X-CSRF-Token=64d2803b596b11afcd119e953e6131851d6533a4&domain=jmnplumbing)

 

I just want my clients to type in the search term e.g. jmnplumbing and it shows the "popular" tlds, then you can select other options, but it shows all of them as available or registered etc...

 

Are there any plugins or anything available already that people use?

Link to comment
Share on other sites

I'm trying to edit my whois search page to try and make it similar to www.123-reg.co.uk (https://www.123-reg.co.uk/order/domain?X-CSRF-Token=64d2803b596b11afcd119e953e6131851d6533a4&domain=jmnplumbing)

 

I just want my clients to type in the search term e.g. jmnplumbing and it shows the "popular" tlds, then you can select other options, but it shows all of them as available or registered etc...

 

Are there any plugins or anything available already that people use?

it's a little too late at night to be giving a long reply(!), but let me give you three options...

 

the first is internal to whmcs and is accessed via general settings -> domains -> Bulk Check TLDs

 

http://docs.whmcs.com/Domains_Tab#Bulk_Domain_Search

 

Select additional TLDs to be automatically checked when a customer looks up a domain’s availability on the shopping cart. For example, they search for example.com, you can also show them the results for example.net, example.org and example.co.uk. This is a great way to upsell your customers. Hold Ctrl and left-click to select multiple TLDs.

how the results are displayed is determined by the order-form selected... they don't all give the same output. :roll:

 

I can't seem to test register a domain through your cart, so I can't see what the output currently is.

 

the second might depend on the registrars you use - some have tools that you can use to enhance your domain searching options...

 

e.g., if you use Hexonet as your registrar (as it seems your domain was reg'd through them), you could use their Domain Checker module...

 

http://forum.whmcs.com/showthread.php?87994-High-Performance-DomainChecker-nTLDs-PremiumDomains-Categories

 

the third option was a quick modification I wrote which allows you to put your tlds into groups rather than one long list...

 

http://forum.whmcs.com/showthread.php?87250-Group-domain-extensions-(TLDs)-in-domain-checker

 

the version in that thread is quite basic compared to the latest beta i'm testing locally, but gives you a rough idea of the concept...

 

hope that helps.

Link to comment
Share on other sites

I've looked at what you've been doing! Very Very impressed, but its more so the output than the selection I'm interested in....

 

Possibly I could change the code to autocheck all tdls - its just a case of working out how the results are outputted....

thanks for the kind words. :)

 

autochecking all tlds is easy - a previous beta version could do it with one checkbox, but for practical reasons, it's a potentially bad idea.

 

z1jUJIp.png

 

if you had a site that were only offering 10-20 tlds, then it would probably work fine... get beyond that and a) it will get slower and b) you'll start running into the risk of whois lookup limits (donuts being the obvious problem registrar for this)... if that happens, then their results might not be accurate.

 

it's fairly certain that 123 don't use whois lookups, but API calls instead - my technique just puts a bit of polish on the existing code and tidies up the layout, it doesn't change the mechanics underneath.

 

to reproduce something like the 123 system, with premium domains etc, would require an API solution - so something like the Hexonet module might be able to do that... possibly a few other registrar addons too.

 

take fight.club - search for it on whmcs and the domain is seemingly available; search for it at 123 (or many other sites) and it's not... this is because whois doesn't always give an accurate result for .club; API does.

 

tweaking the output would be relatively easy as it will mainly be css - so far, i've concentrated on selection and making that as simple as possible... output is the next stage!

Link to comment
Share on other sites

Ah, I'm using resellerclub as my main registrar and enom and a fall-back, so I can bounce my whois via their API's :)

 

Do you think there is a way to specify the tld's to check when you select a tab.... I've sorted the way 123 are displaying the various tlds but thinking I'll need to have some kind of onclick statement ie...

 

onClick="check:com,co.uk,net,org".... etc?

Link to comment
Share on other sites

Ah, I'm using resellerclub as my main registrar and enom and a fall-back, so I can bounce my whois via their API's :)

take a look at the Resellerclub Mods free addon - that can check via API...

 

http://www.resellerclub-mods.com/en/products/free-mods/free-resellerclub-tools.html

 

Do you think there is a way to specify the tld's to check when you select a tab.... I've sorted the way 123 are displaying the various tlds but thinking I'll need to have some kind of onclick statement ie...

 

onClick="check:com,co.uk,net,org".... etc?

well you can't tell, but that (Check All) button next to "Generic Domain Extensions" in the image above, ticks (and unticks) both the .com and .biz when pressed... as would the checkbox before "Other Domain Extensions" - I was just playing with ideas about where to put the (Check All) checkboxes in the layout! :idea:

 

with regards to the onclick question, it's an old thread but there is some similar code to yours here...

 

http://forum.whmcs.com/showthread.php?24619-Check-all-domains

 

in my code, there is no need to specify any tlds in the javascript for the checkboxes, it uses another technique... :twisted:

Link to comment
Share on other sites

hmmm, the current code for displaying the output is:

<table style="border:none; width:700px">
   <tbody>
{foreach from=$availabilityresults key=num item=result}
       <tr>
           <td class="textcenter">{if $result.status eq "available"}<div style="color: #339933; font-size:14px;"><img src="/templates/dj/yes.jpg" style="float:left" />{$tld}<br />Available</div>
           <form method="post" action="{$systemsslurl}cart.php?a=add&domain=register">
           <input type="image" src="https://secure.totallytech.it/templates/dj/add.jpg" name="domains[]" value="{$result.domain}" {if $num eq "0" && $available}checked {/if}/>
           <input type="hidden" name="domainsregperiod[{$result.domain}]" value="{$result.period}" />{else}<div style="color: #cc0000; font-size:14px;"><img src="/templates/dj/no.jpg" style="float:left" />{$tld}<br />Taken{/if}</td>
           <td>{$result.domain}</td>
           <td class="textcenter {if $result.status eq "available"}domcheckersuccess{else}domcheckererror{/if}">{if $result.status eq "available"}{$domainname}<div style="color: #339933;">{$tld}</div>{else}{$domain}<div style="color: #cc0000;">{$tld}</div>{/if}</td>
           <td class="textcenter">{if $result.status eq "unavailable"}<a href="http://{$result.domain}" target="_blank">WWW</a> <a href="#" onclick="popupWindow('whois.php?domain={$result.domain}','whois',650,420);return false">WHOIS</a>{else}<select name="domainsregperiod[{$result.domain}]">{foreach key=period item=regoption from=$result.regoptions}<option value="{$period}">{$period} {$LANG.orderyears} @ {$regoption.register}</option>{/foreach}</select>{/if}</form></td>
       </tr>
{/foreach}
</table>

 

but I actually want the code to be available and unavailable... so I'm thinking I'll need to change it to:

 

{foreach from=$availabilityresults key=num item=result}

{if $result.status eq "available"}

<form method="post" action="{$systemsslurl}cart.php?a=add&domain=register">
<input type="hidden" name="domainsregperiod[{$result.domain}]" value="{$result.period}" />
<div style="color: #339933; font-size:14px;"><img src="/templates/dj/yes.jpg" style="float:left" />{$tld}<br />Available</div>
<div>{$domainname}<div style="color: #339933;">{$tld}</div>
<select name="domainsregperiod[{$result.domain}]">{foreach key=period item=regoption from=$result.regoptions}<option value="{$period}">{$period} {$LANG.orderyears} @ {$regoption.register}</option>{/foreach}</select>
<input type="image" src="https://secure.totallytech.it/templates/dj/add.jpg" name="domains[]" value="{$result.domain}" />
</form>

{if $result.status eq "unavailable"}

<div style="color: #cc0000; font-size:14px;"><img src="/templates/dj/no.jpg" style="float:left" />{$tld}<br />Taken</div>
<div>{$domain}<div style="color: #cc0000;">{$tld}</div><a href="http://{$result.domain}" target="_blank">WWW</a> <a href="#" onclick="popupWindow('whois.php?domain={$result.domain}','whois',650,420);return false">WHOIS</a>

{else} {/if}

 

Does this look like it would work?

Do you know how I can display the domain name searched without the tld?

Link to comment
Share on other sites

i'm off in a minute - no more 3am posts again tonight. :)

 

have a play with some of the other order forms - you can change them by adding them in a link, e.g

 

cart.php?carttpl=boxes&a=add&domain=register

 

there are some that only show available domains... others that show both available and unavailable - if you find one that has an output you like, you could modify your form to output in a similar way...

 

if not, i'll look at the above code tomorrow with fresh eyes.

Link to comment
Share on other sites

haha, ah excellent!

 

Do you know how to show the domain name searched and the tld as seperate fields?

 

eg, If I search for sellmyhouse.asia how do I display sellmyhouse as one output and .asia as another?

 

I cannot find a list of domainchecker outputs anywhere :(

Link to comment
Share on other sites

haha, ah excellent!

Do you know how to show the domain name searched and the tld as seperate fields?

eg, If I search for sellmyhouse.asia how do I display sellmyhouse as one output and .asia as another?

sellmyhouse should be {$sld}

.asia should be {$ext}

 

I cannot find a list of domainchecker outputs anywhere :(

you can always add {debug} to the template code and that will open a popup window showing a list of available smarty variables and arrays.

Link to comment
Share on other sites

Excellent, the debug is really handy but I'm still struggling :(

 

this is my code

<table width="750" border="0" cellspacing="5" cellpadding="0">
 {foreach from=$availabilityresults key=num item=result}
   <tr>
   <td rowspan="2">{if $result.status eq "available"}<img src="templates/dj/yes.jpg" />{else}<img src="templates/dj/no.jpg" />{/if}</td>
   {if $result.status eq "available"}<td style="color:#339933;" />{$ext}</td>{else}<td style="color:#cc0000;" />{$ext}</td>{/if}
   <td rowspan="2">{$result.domain}</td>
   <td rowspan="2">{if $result.status eq "unavailable"}<a href="http://{$result.domain}" target="_blank"><img src="templates/dj/transfer.jpg" /></a>{else}<select name="domainsregperiod[{$result.domain}]">{foreach key=period item=regoption from=$result.regoptions}<option value="{$period}">{$period} {$LANG.orderyears} @ {$regoption.register}</option>{/foreach}</select>{/if}</td>
   <td rowspan="2">{if $result.status eq "available"}<input type="checkbox" name="domains[]" value="{$result.domain}" {if $num eq "0" && $available}checked {/if}/><input type="hidden" name="domainsregperiod[{$result.domain}]" value="{$result.period}" />{else}X{/if}</td>
 </tr>
 <tr>
   <td>{if $result.status eq "available"}Available{else}Taken{/if}</td>
 </tr>
 {/foreach}
</table>

 

however the output is showing the $ext as the first tld searched, not the actual one being searched... I'm searching multiple tlds, and my output shows:

 

.uk drewjohnstone.uk - drewjohnstone

Available

.uk drewjohnstone.co.uk - drewjohnstone

Available

.uk drewjohnstone.com - drewjohnstone

Available

.uk drewjohnstone.net - drewjohnstone

 

So sld is working, but ext shows the data outside the loop :(

 

- - - Updated - - -

 

{$tlds}

 

Array (15)

0 => ".uk"

1 => ".co.uk"

2 => ".com"

3 => ".xyz"

4 => ".co"

5 => ".uk.com"

6 => ".eu"

7 => ".net"

8 => ".org"

9 => ".org.uk"

10 => ".co.com"

11 => ".email"

12 => ".today"

13 => ".photography"

14 => ".agency"

 

The array above is all the tlds that have been checked, so how can I get it to count, so when it checks .org it outputs 8 which I can then say something like $tlds[8]?

Link to comment
Share on other sites

yeah sorry I'm confusing myself lol.

 

I'm used to php - I've never looked at smarty so I'm googling and learning on the fly!

 

I was kind of assuming that if there was a foreach loop I could get it to display the domain searched and then the tld searched separately!

Edited by totallytech
Link to comment
Share on other sites

Hi Drew,

 

Ah Ha!

Found the code

{$result.domain|replace:$domain:''}

Ugh lol....

take care when using that code though - in most cases, it will be fine and work... but if $domain equals the tld, then you'll end up with just '.' - e.g, london.london, management.management etc

 

even if the tld contains the $domain value, you'll get an issue - cloth.clothing would show '.ing'; venture.ventures would show '.s'

 

welcome to Smarty! :)

 

to answer your previous question about php - if you can, try to avoid using {php} in the templates... treat doing so as a "break glass in case of emergency" button.

 

currently, whmcs uses Smarty v2 and that allows {php} in templates, but ultimately they'll switch to using v3 which doesn't allow it - so best to get into the habit of trying to use Smarty where possible - though in the short-term, this won't matter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated