[dev] NIV: DNS Lookup feature patch

Florian Clever fc at clever-soft.net
Sun Dec 8 08:30:10 2002


Hi,

attached is an attempt to produce a patch adding DNS Lookup support for the
NIC module to add DNS support. Please give me feedback on the patch format
or just a simple "Your code sucks" would work just as well.
There are two new files added: nic/dns.php and nic/templates/dns/dns.inc.
Those are simply attached as I do not know how to include them in the patch.

Following are some open issues that I see with the current NIC module. I
would love to address these myself tomorrow or in the weeks to come, but
wanted to give you all the oportunity to give me some feedback first.

- Error Handling
- Solaris compatibility (Does "dig" exist on Solaris, MacOS X etc.?)
- friendlier UI (not sure how to do this quite yet).
- Localization: Could somebody please point me to a document or give me a
brief explanation on how localization works in horde? (Is it this _
function?).
- Icon for DNS (I am not that good with images, but I will make unless
somebody volunteers)

Also I have a few more general questions:
- Coding Conventions: I would propose adding conventions about variable and
function naming. Also a strict convention on how Class and library names
translate to file names and path.
- I am assuming bugzilla will at some point be replaced with WHUPS. Once
WHUPS is mature enough.
- dead code policy. This might not be necessary as there are probably no FDA
reviews of Horde coming up.
- Which OS are "supposed" to be supported? Linux, Win32, Solaris only? Or
also MacOS X, HP-UX, AIX?
- Licenses: The coding conventions state either LGPL or GPL. But the code in
the NIC module states BSD?

This project rocks! (Of course).

PS: I have access to some Solaris, Linux and windows servers. I might be
able to check a few things for portability.

thanks,
Flo

Florian Clever
http://fc.clever-soft.com/

Clever Software Solutions
http://www.clever-soft.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dns.patch
Type: application/octet-stream
Size: 2456 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20021208/fca53c79/dns.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dns.php
Type: application/octet-stream
Size: 1461 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20021208/fca53c79/dns-0001.obj
-------------- next part --------------
<?php if (!empty($results)): ?>
<table class="menu" border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
    <td class="text">
        <?php echo sprintf(_("Results for the DNS lookup on %s"), $addr) ?>
        <br />
        <div class="fixed"><?php echo $results ?></div>
    </td>
</tr>
</table>
<br />
<?php endif; ?>

<form action="<?php echo Horde::selfUrl() ?>" method="get">
<?php echo Horde::formInput() ?>
<table class="menu" border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
    <td class="header" align="left">
        &nbsp;<?php echo _("Type the domain, servername or IP and select the type of DNS records you want to lookup:") ?>
    </td>
</tr>
<tr>
    <td>
        <input type="text" size="60" name="addr" value="<?php print $addr; ?>">
        <select name="type">
            <option value="A">A</option>
            <option value="MX">MX (Mail X-change)</option>
            <option value="NS">NS (Nameserver)</option>
            <option value="CNAME">CNAME</option>
            <option value="TXT">Text</option>
            <option value="SAO">SAO</option>
            <option value="HINFO">Hinfo</option>
        </select>
        <input class="button" type="submit" value="<?php echo _("Lookup!") ?>">
    </td>
</tr>
</table>
</form>


More information about the dev mailing list