Jump to content

Group domain extensions (TLDs) in domain checker


onliner

Recommended Posts

Hello,

 

I have searching the net extensively, but can't find a way to make and label groups of domain extensions in WHMCS to be shown in domain checker and data feed domain search drop down area with domain extensions.

 

For example:

 

GENERIC

.com

.net

.biz

NEW

.guru

.photography

 

and so on. Please check attached image.

 

grouptld.PNG

 

Any idea?

 

Regards.

Link to comment
Share on other sites

one way to do this might be to manually code, in domainchecker.tpl, the "Generic" domains, and then add an {if} statement in the foreach loop that displays the other tlds which will check if the ltd has been included in the "Generic" list...

 

the actual code may vary depending on your theme, but using "default" as an example, the tld checkboxes are created in a foreach loop..

 

<div class="domcheckertldselect hide" id="tlds">
{foreach from=$tldslist key=num item=listtld}
<div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
{/foreach}
<div class="clear"></div>
</div>

now, we separate the domains we want to call "Generic", in this case .co.uk & .com, and then add the {if} statement check to ensure they aren't duplicated in the foreach loop to display the other tlds.

 

<div class="domcheckertldselect hide" id="tlds">
<div><b>Most Popular Domain Extensions</b></div>
<div class="clear"></div>
<div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value=".co.uk"> .co.uk</label></div>
<div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value=".com"> .com</label></div>
<div class="clear"></div>
<div><b>Other Domain Extensions</b></div>
<div class="clear"></div>    
{foreach from=$tldslist key=num item=listtld}
{if ($listtld neq ".co.uk") and ($listtld neq ".com")}
<div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
{/if}
{/foreach}
<div class="clear"></div>
</div>

If we do that, then we end up with the Generic tlds shown separately, with the remaining tlds listed underneath... as shown below:

 

domainchecker.png

 

it's important to note that the checkboxes still work correctly too! :)

 

so now we know that the idea works, we can tidy the code up a little and use an array to store the "Generic" tlds.

 

{php}
 $this->assign("generictld", array('.co.uk','.com','.eu'));
{/php}

   <div class="domcheckertldselect hide" id="tlds">
   <div><b>Most Popular Domain Extensions</b></div>
   <div class="clear"></div>
       {foreach from=$generictld key=num item=listtld}
           <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"> {$listtld}</label></div>
       {/foreach}
   <div class="clear"></div>
   <div><b>Other Domain Extensions</b></div>
   <div class="clear"></div>    
       {foreach from=$tldslist key=num item=listtld}
       {if !$listtld|in_array:$generictld}
           <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
       {/if}
       {/foreach}
       <div class="clear"></div>
   </div>

in this second example, i've moved '.eu' into the generic tld array and therefore it is automatically not displayed in the other tlds section.

 

domainchecker2.png

 

if you wanted to modify the "Generic" tld code so they were all ticked, you would simply replace with this:

 

<div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}" checked> {$listtld}</label></div>

 

when you add any new tlds to your setup, they will be shown in the "Other Domain" section - unless you add them to the "Generic" tld array.

 

I don't think there's any reason why you couldn't use multiple arrays and split them into more sections (e.g Generic, Others and New) - it might make the {if} statements a little more involved, but it should still work. :idea:

Link to comment
Share on other sites

 

Yes, I saw that addon. I will check it out. Thanks.

 

- - - Updated - - -

 

Wow! You are really sharp :) Thanks in advance.

 

OK 2 things:

 

1) If I need 4 value label sections, as 'Latest domains', 'Generic', 'Popular' and 'Other extensions' - shall I use the same 'IF' statements? Or do you have another suggestion?

 

2) I guess if I want data feed domain checker form

 

<script language="javascript" src="feeds/domainchecker.php"></script>

 

to to return this results, then it will take a bit heavier customization & coding?

 

Cheers.

Link to comment
Share on other sites

Wow! You are really sharp :) Thanks in advance.

 

OK 2 things:

 

1) If I need 4 value label sections, as 'Latest domains', 'Generic', 'Popular' and 'Other extensions' - shall I use the same 'IF' statements? Or do you have another suggestion?

logically, I think the way to do four sections would be to first create the three arrays for latest, generic and popular...

 

{php}
 $this->assign("generictld", array('.co.uk','.com','.eu'));
 $this->assign("populartld", array('.org.uk'));
 $this->assign("latesttld", array('.guru'));
{/php}

then for each section, copy the code block I used previously for generic, but replace $generictld with the name of your array (e.g $latesttld or $populartld etc)

 

    <div class="domcheckertldselect hide" id="tlds">
   <div><b>Generic Domain Extensions</b></div>
   <div class="clear"></div>
       {foreach from=$generictld key=num item=listtld}
           <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"> {$listtld}</label></div>
       {/foreach}
   <div class="clear"></div>
   <div><b>Popular Domain Extensions</b></div>
   <div class="clear"></div>
       {foreach from=$populartld key=num item=listtld}
           <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
       {/foreach}
   <div class="clear"></div>
   <div><b>Latest Domain Extensions</b></div>
   <div class="clear"></div>
       {foreach from=$latesttld key=num item=listtld}
           <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
       {/foreach}
   <div class="clear"></div>
   <div><b>Other Domain Extensions</b></div>
   <div class="clear"></div>    
       {foreach from=$tldslist key=num item=listtld}
       {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$populartld) and (!$listtld|in_array:$latesttld)}
           <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
       {/if}
       {/foreach}
       <div class="clear"></div>
   </div>

as you can see, the {if} statement within the "Other Domains" section now checks if the tld is in any of the other arrays - if so, it skips it... if it isn't, it will display it.

 

domainchecker3.png

 

 

2) I guess if I want data feed domain checker form to return this results, then it will take a bit heavier customization & coding?

the domainchecker data feed form is just a quick way of passing a domain/tld to the domainchecker whmcs page - and these changes won't prevent it from returning results as it currently does now.

 

if you mean you want to have a form similar to this modified one on another page/site, then yes you would need to customise the domainchecker.php data feed code - you'd probably also need to specify stylesheets and jquery links as well.

Link to comment
Share on other sites

 

the domainchecker data feed form is just a quick way of passing a domain/tld to the domainchecker whmcs page - and these changes won't prevent it from returning results as it currently does now.

 

if you mean you want to have a form similar to this modified one on another page/site, then yes you would need to customise the domainchecker.php data feed code - you'd probably also need to specify stylesheets and jquery links as well.

 

What meant, is to get following result from domain search drop down:

 

 

drop_down.jpg

 

 

if using domain search data feed:

 

<script language="javascript" src="feeds/domainchecker.php"></script> 

 

Note: I know how to achieve the result from attached image by customizing the standalone Domain Availability Lookup integration code, but it is not connected to database. so it is not the same.

 

Thanks.

Link to comment
Share on other sites

What meant, is to get following result from domain search drop down:

 

 

[ATTACH=CONFIG]6266[/ATTACH]

 

oh, you just want to modify the dropdown to split it into similar sections... :idea:

 

the solution is similar to my previous answer, but using PHP instead of Smarty... so you'll need to edit the feeds/domainchecker.php file and replace it with the following...

 

<?php

require("../init.php");
require("../includes/domainfunctions.php");

/*
*** USAGE SAMPLE ***

<script language="javascript" src="feeds/domainchecker.php"></script>

*/

$systemurl = (!empty($CONFIG["SystemSSLURL"])) ? $CONFIG["SystemSSLURL"] : $CONFIG["SystemURL"];

$currency = getCurrency();
$tlds = getTLDList();

$commontlds = array(".co.uk",".com",".eu");
$newexttlds = array(".guru");

$code = '<form action="%s/domainchecker.php" method="post"><input type="hidden" name="direct" value="true">www. <input type="text" name="domain" size="30"> <select name="ext">';
$code = sprintf($code, htmlspecialchars($systemurl, ENT_QUOTES, 'UTF-8'));

$code .= '<optgroup label="Common Extensions">';

foreach ($commontlds AS $tld) {
   $code .= '<option>'. htmlspecialchars($tld, ENT_QUOTES, 'UTF-8') . '</option>';
}

$code .= '</optgroup"><optgroup label="New Extensions">';

foreach ($newexttlds AS $tld) {
   $code .= '<option>'. htmlspecialchars($tld, ENT_QUOTES, 'UTF-8') . '</option>';
}

$code .= '</optgroup"><optgroup label="Other Extensions">';

foreach ($tlds AS $tld) {

   if(!in_array($tld, $commontlds) && !in_array($tld, $newexttlds)) 
   {
       $code .= '<option>'. htmlspecialchars($tld, ENT_QUOTES, 'UTF-8') . '</option>';
   }
}
$code .= '</optgroup></select> <input type="submit" value="Go"></form>';

echo "document.write('".$code."');";

?>

i've created two new arrays to store the tld values of "Common Extensions" and "New Extensions" and then we just follow the previous procedure - display the common tlds, the new tlds and then the others... i've used the "optgroup" tag to create your headings in the dropdown.

 

then you just call this modified feed as you previously have...

 

<script language="javascript" src="feeds/domainchecker.php"></script>

 

domainchecker4.png

 

it might be a good idea to rename this modified domainchecker.php feed file to something else so that you don't overwrite it when upgrading WHMCS.

Link to comment
Share on other sites

oh, you just want to modify the dropdown to split it into similar sections... :idea:

 

I will actually use it both in domain checker AND domain check drop down feed. :-P

 

Just a question though. Is it possible to also apply this to domain checker in cart that appear on:

 

whmcs/cart.php?a=add&domain=register

 

?

 

In that way I would have grouped TLDs through ALL WHMCS:

 

In domainchecker.php

In domain search drop down list

In order form/cart domain search (whmcs/cart.php?a=add&domain=register)

 

ALTERNATIVELY

 

I want to replace the 'whmcs/cart.php?a=add&domain=register' with domainchecker.php

 

Not sure if it is possible though?

 

Thank you for this wonderful mod and guidance.

 

Cheers.

Link to comment
Share on other sites

Just a question though. Is it possible to also apply this to domain checker in cart that appear on: whmcs/cart.php?a=add&domain=register

yes it's possible to do this by following a similar method to the one used with domainchecker...

 

in your selected order form template folder, there will be a file called adddomain.tpl and inside that there will be a foreach loop that generates the tlds in the dropdown...

 

{foreach key=num item=listtld from=$tlds}
<option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
{/foreach}

this code is the same in all the order form templates - so this one solution will work in all of them ! :)

 

replace the above foreach code with...

 

{php}
 $this->assign("generictld", array('.co.uk','.com','.eu'));
 $this->assign("populartld", array('.org.uk'));
 $this->assign("latesttld", array('.guru'));
{/php}

   <optgroup label="Generic Extensions">
       {foreach from=$generictld key=num item=listtld}
           <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
       {/foreach}
   </optgroup>

   <optgroup label="Popular Extensions">
       {foreach from=$populartld key=num item=listtld}
           <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
       {/foreach}
   </optgroup>

   <optgroup label="New Extensions">
       {foreach from=$latesttld key=num item=listtld}
           <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
       {/foreach}
   </optgroup>

   <optgroup label="Other Extensions">
       {foreach key=num item=listtld from=$tlds}
       {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$populartld) and (!$listtld|in_array:$latesttld)}
           <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
       {/if}
       {/foreach}
   </optgroup>

as an example, if we make these modifications and look at it using the "Comparison" order form template, we will see the following...

 

domainchecker5.png

 

 

i'm not going to add preview images for the other order form templates, but I have tested the above code in each of them and they all work! :)

 

although if you're using ajaxcart, you may need to edit style.css because the modified dropdown is now wider, the dashed box around the form is to narrow to fit the form on the same line - but the simple solution is to just increase the value of "width" in .domainreginput from 340px to something larger.

 

#order-ajaxcart .domainreginput {
   border: 1px dashed #ccc;
   width: 340px;
   margin: 10px auto 20px auto;
   font-size: 14px;
   text-align: center;
   padding: 10px;
}

another option for those that use multiple languages in WHMCS would be to modify the code to use language overrides so that your customers can see the dropdown headings in their native language...

 

http://docs.whmcs.com/Language_Overrides

 

add your language variables to your override file(s), for example...

 

$_LANG['genericext'] = "Generic Extensions";

and then modify the code to use it...

 

<optgroup label="{$LANG.genericext}">

one other modification that you could make to this would be to do some further validation when outputting the arrays - e.g., check for any duplicates and ensure that the tld is valid (pricing has been added for the tld in whmcs) - there's no point adding a tld to the cart for which you haven't setup its pricing yet.

 

    <optgroup label="Generic Extensions">
       {foreach from=$generictld key=num item=listtld}
           {if ($listtld|in_array:$tlds)}
               <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
           {/if}
       {/foreach}        
   </optgroup>
   <optgroup label="Popular Extensions">
       {foreach from=$populartld key=num item=listtld}
           {if ($listtld|in_array:$tlds)}
               {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$latesttld)}
                   <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
               {/if}
           {/if}
       {/foreach}    
   </optgroup>
   <optgroup label="New Extensions">
       {foreach from=$latesttld key=num item=listtld}
           {if ($listtld|in_array:$tlds)}
               {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$populartld)}
                   <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
               {/if}
           {/if}
       {/foreach}
   </optgroup>
   <optgroup label="Other Extensions">
       {foreach from=$tlds key=num item=listtld}
           {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$populartld) and (!$listtld|in_array:$latesttld)}
               <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
           {/if}
       {/foreach}
   </optgroup>

if we now edit our arrays to include duplicate and invalid tlds, these won't be added to the dropdown.

 

{php}
 $this->assign("generictld", array('.co.uk','.com','.eu'));
 $this->assign("populartld", array('.co.uk','.org.uk'));
 $this->assign("latesttld", array('.eu','.guru','.brian'));
{/php}

these validation {if} statements can also be added to the previous domainchecker.tpl code for increased validation on that form too...

 

    <div class="domcheckertldselect hide" id="tlds">
   <div><b>Generic Domain Extensions</b></div>
   <div class="clear"></div>
       {foreach from=$generictld key=num item=listtld}
           {if ($listtld|in_array:$tldslist)}
               <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"> {$listtld}</label></div>
           {/if}
       {/foreach}
   <div class="clear"></div>
   <div><b>Popular Domain Extensions</b></div>
   <div class="clear"></div>
       {foreach from=$populartld key=num item=listtld}
           {if ($listtld|in_array:$tldslist)}
               {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$latesttld)}
                   <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
               {/if}
           {/if}                
       {/foreach}
   <div class="clear"></div>
   <div><b>Latest Domain Extensions</b></div>
   <div class="clear"></div>
       {foreach from=$latesttld key=num item=listtld}
           {if ($listtld|in_array:$tldslist)}
               {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$populartld)}
                   <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
               {/if}
           {/if}                
       {/foreach}
   <div class="clear"></div>
   <div><b>Other Domain Extensions</b></div>
   <div class="clear"></div>    
       {foreach from=$tldslist key=num item=listtld}
           {if (!$listtld|in_array:$generictld) and (!$listtld|in_array:$populartld) and (!$listtld|in_array:$latesttld)}
               <div class="col4 textcenter"><label class="full"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds) || !$tlds && $num==1} checked{/if}> {$listtld}</label></div>
           {/if}
       {/foreach}
       <div class="clear"></div>
   </div>

it might be unnecessary to use this validation if you maintain the arrays correctly, but it's an additional insurance policy in case errors are made.

 

for completeness, here's the domainchecker feed page with similar added validation...

 

<?php

require("../init.php");
require("../includes/domainfunctions.php");

/*
*** USAGE SAMPLE ***

<script language="javascript" src="feeds/domainchecker.php"></script>

*/

$systemurl = (!empty($CONFIG["SystemSSLURL"])) ? $CONFIG["SystemSSLURL"] : $CONFIG["SystemURL"];

$currency = getCurrency();
$tlds = getTLDList();

$commontlds = array(".co.uk",".com",".eu");
$newexttlds = array(".guru");

$code = '<form action="%s/domainchecker.php" method="post"><input type="hidden" name="direct" value="true">www. <input type="text" name="domain" size="30"> <select name="ext">';
$code = sprintf($code, htmlspecialchars($systemurl, ENT_QUOTES, 'UTF-8'));

$code .= '<optgroup label="Common Extensions">';

foreach ($commontlds AS $tld) {

   if(in_array($tld, $tlds)) 
   {
       $code .= '<option>'. htmlspecialchars($tld, ENT_QUOTES, 'UTF-8') . '</option>';
   }
}

$code .= '</optgroup"><optgroup label="New Extensions">';

foreach ($newexttlds AS $tld) {

   if(in_array($tld, $tlds) && !in_array($tld, $commontlds)) 
   {
       $code .= '<option>'. htmlspecialchars($tld, ENT_QUOTES, 'UTF-8') . '</option>';
   }
}

$code .= '</optgroup"><optgroup label="Other Extensions">';

foreach ($tlds AS $tld) {

   if(!in_array($tld, $commontlds) && !in_array($tld, $newexttlds)) 
   {
       $code .= '<option>'. htmlspecialchars($tld, ENT_QUOTES, 'UTF-8') . '</option>';
   }
}
$code .= '</optgroup></select> <input type="submit" value="Go"></form>';

echo "document.write('".$code."');";

?>

I guess these array values could be stored in a database table and pulled from the db when required... I think there's little to be gained other than having the values stored in one place rather than in the templates... I might look into that one day, but for now, I think this solution will work fine in most circumstances.

 

Thank you for this wonderful mod and guidance.

no problem - your question coincided with working on our own tld setup and pricing! :idea:

Link to comment
Share on other sites

 

the solution is similar to my previous answer, but using PHP instead of Smarty... so you'll need to edit the feeds/domainchecker.php file and replace it with the following...

 

As this is working for domain checker feed - can this mod also help us to add labels in Domain Pricing Table feed:


<style type="text/css">
table.domainpricing {
   width: 600px;
   background-color: #ccc;
}
table.domainpricing th {
   padding: 3px;
   background-color: #efefef;
   font-weight: bold;
}
table.domainpricing td {
   padding: 3px;
   background-color: #fff;
   text-align: center;
}
</style>
<script language="javascript" src="feeds/domainpricing.php"></script>

 

As we almost have pricing for hundreds of domain extensions showing in our Domain Pricing Feed, it would help tremendous.

 

Just asking...

 

Thanks.

Link to comment
Share on other sites

I guess these array values could be stored in a database table and pulled from the db when required... I think there's little to be gained other than having the values stored in one place rather than in the templates... I might look into that one day, but for now, I think this solution will work fine in most circumstances.

 

You should definitely release that as a commercial addon - I'm the first in the line who would pay for it :)

Link to comment
Share on other sites

it would be similar, but not using optgroup to create the labels... as this is table-based, you could either do them as x number of tables divided into your sections... or one large table with the section headings as 3-column row...

 

all the tld arrays should be the same, so should the {if} statements - it will just be the table content code that you will need to duplicate.

Link to comment
Share on other sites

it would be similar, but not using optgroup to create the labels... as this is table-based, you could either do them as x number of tables divided into your sections... or one large table with the section headings as 3-column row...

 

all the tld arrays should be the same, so should the {if} statements - it will just be the table content code that you will need to duplicate.

 

OK, you mean directly change stuff in

feeds/domainpricing.php

 

?

Link to comment
Share on other sites

yes - as with the domain checker feed, setup the arrays, setup the foreach loops for each section, use my if statements and then copy the variables inside the foreach loop.

 

having had a quick look at it, I think the only variable you're going have to change in the loops is $tldslist - the rest could be used as is... then you just need to figure out if you want multiple tables or one table with category headings and adjust the table code accordingly.

Link to comment
Share on other sites

just to let you know that i've refined this solution even further... :)

 

1. the tld lists arrays are now stored in just *one* external file that is called by both the smarty templates (adddomain.tpl) and the data feeds... this means that there is only one tld file to edit rather than having copies of (hopefully) the same lists in multiple files.

 

2. there is increased validation in both the template and feed files, e.g to prevent empty headings etc.

 

3. as both the templates and feeds now use the same variables, i'll rewrite them to use them - currently the feed is using different variables... this way, everything across the site will match.

 

it's a little late to post this tonight, so i'll post the new code tomorrow. :idea:

Link to comment
Share on other sites

just to let you know that i've refined this solution even further... :)

 

1. the tld lists arrays are now stored in just *one* external file that is called by both the smarty templates (adddomain.tpl) and the data feeds... this means that there is only one tld file to edit rather than having copies of (hopefully) the same lists in multiple files.

 

2. there is increased validation in both the template and feed files, e.g to prevent empty headings etc.

 

3. as both the templates and feeds now use the same variables, i'll rewrite them to use them - currently the feed is using different variables... this way, everything across the site will match.

 

it's a little late to post this tonight, so i'll post the new code tomorrow. :idea:

 

:) :) :) :) :) :) :)

 

That is a wonderful news. Just as it should be. Just show me the link for PayPal donation :)

 

Regards.

Link to comment
Share on other sites

I assume also by domainchecker.php (tpl), right?

yes, domainchecker.tpl and adddomain.tpl now both use the same tld file; i've just finished coding the domainchecker data feed to use this same tld file.. and i'm now trying to break the validation on it by messing with the tld lists - but everything is working correctly! :)

 

i'm going to take a look at the pricing table data feed too later... but i'm going to fix a WP site for a client this afternoon, so hopefully I can post this tonight.

Link to comment
Share on other sites

No problem, as we had been waiting 8 years for something like this, one more day is nothing :)

well if it's not today, it'll be tomorrow morning - it certainly won't take me 8 years! :)

 

the domain pricing data feed now uses four separate tables with section headings - each table is only printed if there is a valid tld in there...

 

<script language="javascript" src="feeds/domainpricing2.php"></script>

but because they are separate tables, i've coded it so that any individual table can be called directly, i.e to just display the "Generic" tld table, you would use...

 

<script language="javascript" src="feeds/domainpricing2.php?dptable=generic"></script>

in domainchecker, you can even do trivial cosmetic things like add icons to the section headings... :roll:

 

domainchecker6.png

 

so in theory you could separate some tlds into regions (Europe, UK, Asia etc) if you wanted to - it's coded in a way where there is no limit to how many sections you can have (within reason!).

 

you can even specify some tlds not to be shown in the templates and/or feeds (they can still be ordered via domainchecker but only by typing the domain) - there was a reason why I added that originally, but I can't remember now - anyway, i've left it in as it might be useful for someone!

Link to comment
Share on other sites

Looking forward to this very much - just want to make sure I haven't missed it!

it's OK - you haven't missed it! :)

 

i've been having it beta-tested just to iron out any potential problems - and i'm pleased to report that this works perfectly as designed! :)

 

it was liked so much, that i've received Paypal donations for it - and i'm always happy to receive them! :idea:

 

since I last posted, it now uses some beautifully clever array validation to ensure that only valid tlds are shown... also, i've recoded the domainchecker.tpl table to display the pricing for the different sections correctly...

 

the one niggly issue that I want to resolve are file paths - i'm trying to find a simpler way to link to the file... if I can find a better solution, that would be great - but it will work now as it is (as long as you get the file path correct!).

 

bear with me!

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.

×
×
  • 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