Blog Posts by Erik Eldridge

  • YUI 2in3 Modal Panel Example

    Suppose you're using YUI 3.2 and you'd like a modal dialog.  YUI 3 Overlay provides an easy way to position an element above the others, but it doesn't provide modality.  The Overlay Extras gallery module sounds perfect, but it seems to work best with YUI 3.1.0.

    YUI 2 has exactly what we're looking for in its Panel widget.  Fortunately, the YUI 2in3 project makes the Panel available in YUI 3.2.  

    YDN's gist account contains sample code demonstrating usage, and you can run the code on

    Please comment on this post if you have any questions or see any issues.

    Read More »from YUI 2in3 Modal Panel Example
  • 2010 Carnegie Mellon Hack U

    Fellow Hack-enthusiasts,

    We just wrapped up the third Hack U at Carnegie Mellon University (CMU), and it was a good one. CMU hackers are talented, motivated, and friendly. We had 33 hacks submitted. You can find the full list of hacks on the YDN Hack U site.

    A Hack U team preparing
    Photo credit: Reid Burke (uberlife)

    The winners

    1st place: Shazel

    This web app allowed everyone in the room to compose music together by clicking on a canvas. A great example of user-generated content appropriate for all ages. Tech used: HTML5 canvas), Node.js, and an ActionScript sound library.

    2nd place: Radio Stalin

    Don’t call it “social”. Radio Stalin enables a community of users to watch the same video (Stalin-era Soviet propaganda) at the same time. Tech used: websockets and Node.js to coordinate YouTube video playback and a chat client. Produced by creators of Creepy Chat, which was a winner last year.

    3rd place: Random Encounters

    This app presented a slick interface for the CMU calendaring system, and used the CMU’s

    Read More »from 2010 Carnegie Mellon Hack U
  • San Diego BarCamp 7

    More than 200 people attended the 7th San Diego BarCamp last July 10-11 at Intuit's San Diego campus. Phelan Riessen, Dan Tentler, and the other members of the BarCamp SD crew did a great job organizing the event and helping everyone feel at home. To make things even better, we had beautiful weather all weekend and the World Cup final on Sunday.

    The following photo shows BarCampers eating the Yahoo! Developer Network-sponsored lunch on a gorgeous Saturday.

    BarCampers eating lunch on a beautiful Saturday
    Photo credit: Bruce Mohler

    This BarCamp featured an exceptionally broad range of talks, including:

    • "Redefining Human", a two-part series of talks (briefly) covering the origins of the human biology and techonology's influence on what it means to be human.
    • A two-part introduction to Git version control
    • An entertaining talk by the NerdKits guys describing how to make a feedback-controlled ping pong ball levitation thing
    • An introduction to composting
    • A crash course in how to brew beer
    • How to survive Defcon
    • How to repair drywall
    Read More »from San Diego BarCamp 7
  • Three ways to control social data access

    If we log into a site using OpenID+OAuth "Hybrid Auth", then authorize an OAuth app or install a Yahoo! Application Platform (YAP) app, and grant access to our protected Yahoo! data, how can we revoke or control access later?

    Screenshot showing an OAuth app requesting access

    It is important for users and developers to understand how to do this. Users may change their minds about allowing an app to access their data. Developers need to build apps that can handle such changes.

    Yahoo! provides three levels of control: general OAuth, Updates API-specific, and YAP application.

    General OAuth

    You can see and manage all the apps you have granted access to via OAuth and Hybrid Auth here:

    To get there, follow these steps:

    1. Go to
    2. Click View Account Info under the Account Info tab on the Profiles page.
    3. Click Manage Apps and Website Connections under Sign-In and Security.
    4. Click an app name to see scopes provided.
    5. Click Remove to revoke accesss.

    Updates API-specific

    At a

    Read More »from Three ways to control social data access
  • 2010 UCSD HackU wrap-up

    The Hack U season concluded with a great week at the University of California, San Diego UCSD. Special thanks to Cody Noghera, Deputy Director of Corporate Affiliates Program (CAP), and Erica Kosa, for helping organize the hack. Also to Gert Lanckreit, of "herd it" fame, Professor Rick Ord, and Gary Gillespie for being guest judges.

    Hackers slap the "hack like a champion" sign in the CSE building at the start of the 24 challenge.

    Credit: Eric Wu (YDN)

    During the week, the HackU team — Douglas Crockford, Jamie Lockwood, Aaron Wheeler, Eric Wu, and I — presented talks on how to hack, general web technology, rapid prototyping, YQL, and the good parts of JavaScript.

    The 24-hour hack session ran Thursday and Friday. Here are the results from the competition, with descriptions of the hacks submitted.

    The winners

    Read More »from 2010 UCSD HackU wrap-up
  • Two-legged OAuth client/server example

    Want to use two-legged OAuth to sign a request? Here’s a super-stripped-down example of how to do it.



    1. Put this file on a server (this could just be localhost, e.g., http://localhost/myfile.php, if you have a web server installed).
    2. Browse to the file.


    When called without a parameter, this script will make an OAuth signed request to itself, with a GET parameter server set to true. When the script is called with the server parameter set, it will check the signature of the request. If the signature is valid, it will return orale!. If the signature is invalid, it will terminate and return invalid signature.


    For those reading this in an RSS reader, you can see the code on github.

    Erik Eldridge
    Erik Eldridge (@ydn)
    Yahoo! Developer Network

    Read More »from Two-legged OAuth client/server example
  • Breakfast in the Clouds: a day in the Omaha tech scene

    I presented a talk on cloud computing at an event organized by the AIM Institute at Gallup University in Omaha, Nebraska, on March 26. The phrase "cloud computing" is a bit vague, so I focused on describing a few different types of cloud-like services (e.g., app hosting, virtual private servers, file & data storage, grid computing, etc.) and Yahoo!'s role in the cloud computing community.

    Breakfast in the Clouds
    View more presentations from Yahoo Developer Network.

    Omaha has a thriving tech scene. My host, Jeff Slobotski — Director of Innovation & New Media at the AIM Institute, co-organizer of the Big Omaha conference, and cofounder of Silicon Prairie News — is in the middle of it. Yahoo! opened its newest data center there in February, and there are numerous other tech and Fortune 500 companies in residence. Micah Laaker, Director, Yahoo! Open Strategy UED, described his experience at Big Omaha last year in his YDN blog post "Big Lights, Big Omaha".

    If you're in Omaha, or are

    Read More »from Breakfast in the Clouds: a day in the Omaha tech scene
  • YAP code sample: Cross-view font styling

    Would you like to set consistent font styles for different YAP views, e.g., small and canvas? The code below demonstrates one way to do this.


    • Create a YAP app in the YDN dashboard:
    • Copy/paste this code into the base file of your app, eg if your app’s base url is, put this code in index.php
    • Set the following as your default small view code: loading...


    • PHP w/ short tags enabled
    • A server accessible via a domain name and capable of receiving POST requests (YAP sends user data via POST with the request for content)


    For those using a feed reader, you can see the code on Github

    This code has a BSD license detailed, along with usage instructions and other information, in the code’s readme file.

    Erik Eldridge

    Yahoo! Developer Network (@ydn)

    Read More »from YAP code sample: Cross-view font styling
  • YAP code sample: tabbed small view navigation

    Want to use tab navigation in the small view of your Yahoo! Application Platform (YAP) app? Here’s one way to approach it:

    For those using feed readers, you can see the code on Github.

    The script’s operation flows like this:

    1. The small view will first load the default content (see below), which will callback to this code to fetch the output defined in the else clause of this code.
    2. That content will then use a yml:include tag to call back to itself with the parameter “item=1”.
    3. The script will then execute the if statement and return the default body content for the app.

    To use the script, do the following:

    1. Copy/paste this code into the index file at the root of your app. For example, if the base url for your app is, put this code in index.php. Be sure to remove/comment-out any code already in index.php that may interfere.
    2. Put the following code in the default small view code box in the YAP dashboard: loading…. Note that because the “params” attribute is
    Read More »from YAP code sample: tabbed small view navigation
  • YQL code samples: YQL is easy to use

    YQL is easy to use. How easy? Check out these three examples:

    1) Fetch Twitter search results using YQL + JSONP + a simple JavaScript handler function

    Feed readers, see the code on Github.

    Run this query in the YQL console:

    select * from json where url=""

    Note: You could also use YQL’s community table for Twitter search

    2) Scrape content off the World Wildlife Fund site and pass it back to a jQuery handler

    Feed readers, see the code on Github.

    Run the YQL query in the console:

    select * from html where url=”” and

    Note: instead of running all this on the page, you might consider using YQL execute to generate your HTML on Yahoo! servers and pass it back to the handler for insertion into the page. You could also create an adhoc API that leans on Yahoo!'s cache to reduce WWF's bandwidth costs.

    3) Convert XML to JSON in your

    Read More »from YQL code samples: YQL is easy to use


(33 Stories)