Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

'New Applicants' OS X Dashboard Widget for Vanilla (Now available!)

dan39dan39 New
edited January 2007 in Vanilla 1.0 Help
Edit: Jan 18 2007: The New Applicants Dashboard Widget for Mac OS X 1.0 is now available.

Not sure if anyone out there has experience designing OS X Dashboard widgets, but if so, it would be great to have a Dashboard Widget that kept track of your New Applicants in Vanilla. That way, you wouldn't have to keep logging in everytime you wanted to see if new applicants had applied. I mocked something up as an example of what it might look like:

New Applicants Widget for Vanilla

I think the best model for this widget would be the Mail Checker widget. You'd configure your admin login/password (and Vanilla URL) on the back, and when you click on the front of the widget, it automatically logs you in instantly and brings you right to the new applicants results page.

Anyone think they could pull this off?


  • What a great idea dan39,
    If I knew more about MySQL I would give this a go.

    I have hacked a few Widgets to extract info from a static web page, however this one would be out of my depth.
  • As a temporary solution, I bet you could find an RSS widget, then tie that into an RSS feed of "waiting applicants"
  • dan39dan39 New
    edited December 2006
    I thought of that, but the RSS feed on waiting applicants has been disabled. I would assume that Mark did that on purpose so that waiting applicants (and you) could maintain some privacy.

    I opened up the source of the Mail Checker Widget. It looks like it's able to figure out the number of unread messages based on the number of items in the individual's RSS/ATOM feed from their Gmail account.

    The problem for Vanilla is that: (A) it looks like we'd need a new Add-On to activate the New Applicants feed, and (B) the feed would have to list every New Applicant — not a reduced feed of only 1 page of results like the RSS/ATOM feeds do in Vanilla.

    To tell you the truth it would be helpful to all of us (even those without OS X) if we could have an RSS feed of New Applicants. I think I'll suggest that as a new Add-On.
  • Dang, well there goes my really good idea :)
  • MarkMark Vanilla Staff
    Why couldn't you just create an extension that delivers a page with the number of applicants - just a number that gets spitted out. Then write a widget to poll that page at regular intervals to see what the number is?

    I've never written a dashboard widget, but that seems like an acceptable solution - just package the widget and the extension together...
  • ...and then people who don't have OSX/Vista can use it as well :D I like it more :)
  • dan39dan39 New
    edited December 2006
    Of course.. Much better idea. I should have thought of that.

    In fact, the new Leopard Widgets will allow you to just have that live snippet of the web page right in your dashboard. Instant widget for everyone with no extra coding...

    Anyone know how to actually make a page like that. I tried it on my own and only came up with errors.
  • dan39dan39 New
    edited January 2007
    I was able to take the Vanillazilla add-on and the New Applicants 1 add-on and combine them so that the URL below just spits out the New Applicant Count when queried:

    <?php /* Extension Name: Applicantcount Extension Url: Description: Provides Applicant count. Version: 1.0 Author: Vanilla Users Author Url: */ if (!defined('IN_VANILLA')) exit(); $Context->Dictionary['Applicantcount'] = 'Applicantcount'; if ($Context->SelfUrl == 'extension.php' && ForceIncomingString('PostBackAction', '') == 'Applicantcount') { $UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager'); echo $UserManager->GetApplicantCount(); $Context->Unload(); die(); } ?>
    Here's the URL to check the number of New Applicants:

    Can anyone help me create a local HTML file with some JavaScript that can query the output from the URL above and display it in some HTML in the browser? I'm sure this is easy to do, but it's not my forte. And, that's pretty much all we need to create the basics of the widget. I should be able to do the rest from there.

    And, it "should" be pretty easy to convert it to a Vista or Google widget once we're done.

    BTW, Apple just released DashCode Beta today for Mac OS X Tiger 10.4. You can download it here after you sign up for a free developers account:
  • I figured out how to do it. I was able to take the Google PageRank widget and modify it to pick up the output of the extension code from above. Give me some time and hopefully I can pull off something that looks like the concept image at the top of this post.
  • i tried your code and was going to help you out but it broke my forum. does it require Vanillazilla and New Applicants 1? or did you just base the code off that?
  • dan39dan39 New
    edited January 2007
    Hmm.. It still works for me. Be sure you put the code into a folder, and call it "ApplicantCount" before placing that folder in your extensions folder. (And, if you don't have friendly URLs installed, the URL to check the results should be different). Other than that, I'm not sure what it might be, unless you can give an error code. Anyone else see what might be wrong? I don't have Vanillazilla nor do I have New Applicants 1 installed in my system. I just based the code off of those two add-ons. BTW, I haven't tested the above code with "zero" new applicants yet. I wonder if that has something to do with it. I already have the basic widget working, so it's just figuring out your issue, and a few minor details on the widget. Should be all done shortly.
  • i thought it was a permissions deal but that didn't work either. is 755 right? when i enable it in the exentions panel, and go to "discussions" it's just a blank white screen. maybe it's because i have no new applicants.
  • dan39dan39 New
    edited January 2007
    I have the permissions set to 644, but that's probably not the issue. And, I've tested it with zero new applicants, and it works fine for me. Please try re-copying the code from above. I re-wrote it without any Tabs in the source this time. (Sometimes the Tabs can add messy characters to your source depending on which browser you copy/paste from or which text-editor you paste into). And, can you try placing the entire code above into the following path: /extensions/ApplicantCount/default.php (You should also be using Vanilla 1.0.3, and you may want to try disabling your other add-ons to make sure there isn't a conflict)
  • working! i was still on 1.0.1 - thanks
  • dan39dan39 New
    edited January 2007
    The widget is done and now available for download! Here's how to set it up:

    1) Download and install the New Applicants Count XHR 1.0 add-on so that your widget has information to grab.

    2) Go here to get the New Applicants Dashboard Widget for Mac OS X 1.0
  • Sorry dan39 it does not work.

    Clicking on the widget comes up with an error 404 "page not found"...;sort:Date;&Type=Users

    Also, in the widget, now I can't click the i to spin it around and change the URL.

    Posted: Saturday, 20 January 2007 at 8:59AM (AEDT)

  • dan39dan39 New
    edited January 2007
    Good catch... I had programmed the widget for friendly URLs only.

    I've just uploaded a new widget that works with regular URLs and friendly URLs. Download the widget again and give it a go.
  • That did the trick dan39, it works as advertised now. pic

    Posted: Sunday, 21 January 2007 at 2:08PM (AEDT)

This discussion has been closed.