11 Jun 2007, 4:57am
Projects:
by Cliffano Subagio

leave a comment
  • SCode Image Reload

    Sometimes the numbers on SCodePlugin-generated CAPTCHA image are not easy to read. And rather than refreshing the whole page, it would be nice to reload only the image and generate a new / more readable code.

    In order to give this a go, I modified the comment form on Melbourne photoblog and added a short Javascript code to refresh the image source. You can try it yourself on this form, just click the text “Generate another code” and wait shortly for the image to be reloaded with a new code.

    I have updated the Usage sample code on SCode Plugin wiki page with this improvement.

    As a side note, I found a problem where modifying img.src value via anchor tag’s onclick attribute does not work on IE 6 and the image will just disappear, while it works just fine on Firefox 2 and Opera 8.5 .

    function reloadSCode() {
      var scodeImage = document.getElementById("scodeImage");
      scodeImage.src="$BLOJSOM_BLOG.getBlogBaseURL()/captcha?flavor=kink&t=" + (new Date()).getMilliseconds();
    }
    
    <a href="javascript: void(0);" onclick="reloadSCode();">Generate another code</a>.
    

    After some mucking around, I found out that the function call must be made from the href attribute. This works on the browsers mentioned above.

    <a href="javascript: reloadSCode();">Generate another code</a>.
    

    Them browsers better implement proper Javascript standard before doomsday comes.

    9 Jun 2007, 2:31am
    Projects:
    by Cliffano Subagio

    leave a comment
  • GateKeeper Plugin v0.1 And IMNotification Plugin v0.1

    GateKeeper Plugin v0.1 and IMNotification Plugin v0.1 have been released.

    I implemented GateKeeper Plugin for Blojsom following the earlier discussion on a simple anti-bot solution to fight comment spams. This blog has been using GateKeeper Plugin (with very simple challenges for now) and it has worked like a charm with 100% success rate, though I think that the success is actually contributed from the fact that the spammers have been focusing their effort on breaking more mainstream anti-spam solutions like CAPTCHAs.

    I’ve also been using IMNotification Plugin with Jabber server and Pandion client. This plugin provides an alternative to email notifications, and it’s handy for those with IM windows.

     

    Recent Posts

    Recent Comments

    • Chess Strategizer: This just got bookmarked! “That’s why I always think of Simon Bolivar and remember that...
    • David from getcheaptrainfares.co.uk: Thank you very much for sharing your wonderful tips! That would definitely be a...
    • Natasha: The quote “Find the best in everybody. Just keep waiting no matter how long it takes. No one is all...
    • Alfonzo Donkin: Stumbled upon your website via bing the other day and absolutely think its great. Carry on the great...
    • Cliffano Subagio: Sure thing.

    Most Commented Posts

    Linkroll