Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Christian Heilmann
file 62 lines (60 sloc) 2.444 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<?php
/*
Yahoo Firehose research interface
Homepage: http://github.com/codepo8/firehose-research
Copyright (c)2010 Christian Heilmann
Code licensed under the BSD License:
http://wait-till-i.com/license.txt
*/
  include_once('filter.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Yahoo! Firehose research interface</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0/build/reset-fonts-grids/reset-fonts-grids.css&2.8.0/build/base/base-min.css">
<link rel="stylesheet" type="text/css" href="firehosesearch.css">
</head>
<body class="yui-skin-sam">
<div id="doc" class="yui-t7">
<div id="hd" role="banner">
<h1>Yahoo Firehose search</h1>
</div>
<div id="bd" role="main">
<form method="post" id="mainform" action="index.php">
<h2><span>1</span> Select the sources you want to get information from (default is all)</h2>
<ul id="sources">
<?php include('options.php');?>
</ul>
<h2><span>2</span> Tell us what you want to find</h2>
<div class="bar"><label for="search">Search for:</label><input type="text" id="search" name="s" value="<?php echo $_POST['s'];?>"><input type="submit" value="search the social web" name="sent"></div>
<?php include('lookup.php');?>
</form>
</div>
<div id="ft" role="contentinfo">
<p>Written by Christian Heilmann, powered by YQL and YUI. State retention using HTML5 local storage.</p>
</div>
</div>
<script src="http://yui.yahooapis.com/combo?3.2.0pr1/build/yui/yui-min.js"></script>
<script>
YUI().use('node', function(Y) {
if(('localStorage' in window) && window['localStorage'] !== null){
var key = 'lastyahoofirehose';
<?php if(isset($_POST['sent']) || isset($_POST['moar'])){?>
localStorage.setItem(key,Y.one('form').get('innerHTML'));
<?php }else{ ?>
if(key in localStorage){
Y.one('#mainform').set('innerHTML',localStorage.getItem(key));
Y.one('#hd').append('<p class="message"><strong>Notice:</strong> We restored your last search for you - not live data</span>');
}
<?php } ?>
}
Y.all('#sources li').set('tabIndex','-1');
Y.one('#sources').delegate('click',function(event){
Y.one(this).ancestor().toggleClass('on');
},'label');
});
</script>
</body>
</html>

Something went wrong with that request. Please try again.