Even though the module supports ajax whois lookups in /whois page, it does not support the feature when using the whois block. Coming is the patch which provides this feature and also implements the ajax lookup via Drupal's AHAH API instead.

CommentFileSizeAuthor
#1 1142974-1-whois_ahah.patch9.05 KBsepla

Comments

sepla’s picture

Title: Ajax lookup in whois block, also make use of Drupal AHAH API » Support for whois block live loockups, also make use of Drupal AHAH API
Status: Active » Needs review
StatusFileSize
new9.05 KB
helmo’s picture

Looks interesting.
How much of this would be different for D7?

Unfortunately I don't have time to review it this week, but I'll be sure to look it over next week.

sepla’s picture

AFAIK in D7 the AHAH has been replaced with Ajax Framework, the implementation is almost the same (in the patch) but namely changed.

helmo’s picture

Status: Needs review » Fixed

One thing I ran into was that the behaviour changes.
A user that has ajax enabled and uses the block will be surprised that the results show up in the block.... For status-only this would be nice, but for the full results a block is often too small.
Something for the release notes ...

One further:

+++ b/whois.module
@@ -129,7 +146,7 @@ function whois_ajax() {
-    drupal_json(array('html' => $output));
+    return drupal_json(array('status' => TRUE, 'data' => $output));

You add a 'return' here but drupal_json echos instead of using return. I'll fix the comment instead.

I've split the patch in three commits, and cherry-picked the two trivial ones into the 7.x-1.x branch. Which has been pushed.

Would you be willing to port the rest of this to 7.x?

helmo’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Fixed » Patch (to be ported)
sepla’s picture

Thanks helmo,
I'll take a look into the 7.x branch and I'll provide a patch ASAP.

helmo’s picture

@Sepehr Lajevardi: Any progress on this?

I would like to release a 7.x-1.1 version in the near future, with this patch included.

sepla’s picture

helmo,
Unfortunately I couldn't find the time in my busy schedule but I'll provide that patch this weekend, I promise :)

helmo’s picture

Status: Patch (to be ported) » Fixed

So mush for your promise :(

I've now ported your patch and pushed some extra updates into 7.x-1.x.

sepla’s picture

Happy that you made it happen. I'm sorry for being a promise breaker, fa* *** lazy patcher! ;)

Status: Fixed » Closed (fixed)

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