Yahoo! Developer Network ydn

View yui-2in3-modal-panel-example.html
1 2 3 4 5 6 7 8 9 10
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>YUI 2in3 Modal Overlay Example</title>
</head>
View gist:389725
1 2 3 4 5 6 7 8 9 10
 
 
//
// This block of code creates the YDN Rack module that supports searching within
// a set of docs. Previously, the only search functionality would scour the entire
// site for the terms entered. This module aims to provide contextual search
// within documentation so a user can more easily find something related to the
// docs currently being presented. We use a bunch of y! technology to do the heavy
// lifting and that's awesome that we just have to manufacture the glue.
//
View simplePhpOpenid.php
1 2 3 4 5 6 7 8 9 10
<?php // simple code to require OpenID authentication on a page
 
/*
Requirements:
* PHP 5
* OpenID Enabled PHP library (http://openidenabled.com/php-openid/)
 
Usage:
1) Put this code in a file on your server
2) Edit the "$realm" variable to be your domain
View gist:361071
1 2 3 4 5 6 7 8 9 10
<?php // simple example code for doing the OAuth dance w/ netflix in php
 
//http://oauth.net/code/
//http://oauth.googlecode.com/svn/code/php/OAuth.php
require 'oauth.php';
 
//key/secret from http://developer.netflix.com
$key = 'slkdjf298374';
$secret = 'lskdjf0298374';
$consumer = new OAuthConsumer($key, $secret);
View gist:360872
1 2 3 4 5 6 7 8 9 10
<?php // a super-stripped down 2-leg oauth server/client example
 
//http://oauth.net/code/
//http://oauth.googlecode.com/svn/code/php/OAuth.php
require 'oauth.php';
 
$key = 'key';
$secret = 'secret';
$consumer = new OAuthConsumer($key, $secret);
$sig_method = new OAuthSignatureMethod_HMAC_SHA1;
View gist:359646
1 2 3 4 5 6 7 8 9 10
<!-- fetch flickr photos in javascript & put them on a page. Based on Jon LeBlanc's PHP code: http://developer.yahoo.net/blog/archives/2010/04/building_flickr_urls_from_yql_flickrphotossearch_results.html -->
 
<body>
<script>
function cbfunc(obj){
for(var i = 0; i < obj.query.results.photo.length; i++){
var farm = obj.query.results.photo[i].farm;
var server = obj.query.results.photo[i].server;
var id = obj.query.results.photo[i].id;
var secret = obj.query.results.photo[i].secret;
View gist:352518
1 2 3 4 5 6 7 8 9 10
<?php // sample code for making an oauth request using YAP OAuth credentials
 
// http://oauth.googlecode.com/svn/code/php/OAuth.php
require 'OAuth.php';
 
// get key/secret from your app dashboard http://developer.apps.yahoo.com/projects
$key="exampleGWklXQ3FTSk1iJmQ9WVdrOVYyOVlhMjR4TnpnbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD0yNQ--";
$secret="examplec1a002564a746354ff159380b9d689";
 
$consumer = new OAuthConsumer($key, $secret);
View index.php
1 2 3 4 5 6 7 8 9 10
<!-- Sample YAP code for consistent font formatting between small and large views -->
<!-- Usage and licensing info in http://gist.github.com/330606#file_readme.txt -->
 
<style>
#wrapper {
font-family: sans-serif;
font-size: 16pt;
}
</style>
<div id="wrapper">
View code.php
1 2 3 4 5 6 7 8 9 10
<?php // Tabbed navigation for YAP small view
 
// See usage and license details in http://gist.github.com/327012/#file_readme.txt
?>
 
<? if('1' == $_GET['item']): ?>
this is item 1 content
<? elseif('2' == $_GET['item']): ?>
this is item 2 content
<? elseif('3' == $_GET['item']): ?>
View gist:320165
1 2 3 4 5 6 7 8 9 10
<!-- Use YQL to convert XML to JSON in your sleep -->
<!-- Introduced in YDN blog post: http://developer.yahoo.net/blog/archives/2010/03/yql_code_samples_yql_is_easy_to_use.html -->
 
<script src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js"></script>
<ul>UN Headlines:</ul>
<script>
var Y = new YUI();
function handleResponse ( json ) {
var items = json.query.results.item;
for ( var i = 0; i < items.length; i++ ) {
Something went wrong with that request. Please try again.