github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ryandoherty / ClouserW-Soundboard

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 3
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: 11ef31f

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

That's what she said! — Read more

  cancel

http://www.ryandoherty.net/clouserwsoundboard

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

removed extraneous button class 
Ryan Doherty (author)
Thu Aug 06 23:10:15 -0700 2009
commit  11ef31f087fb47f5e04c3534c4f0f0ee749aabe4
tree    05358afece9088ad5fe61b4078a12233796737d6
parent  b952dc01223ca87f6e6027ba3d2ab523eecc0cb1
ClouserW-Soundboard / index.php index.php
100644 57 lines (51 sloc) 1.887 kb
edit raw blame history
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
<?php
    $files = glob("clips/*.ogg")
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ClouserW Soundboard</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/base/base-min.css">
<style type="text/css" media="screen">
button {
-moz-border-radius: 5px;
background: red;
border: 3px solid black;
display: inline-block;
cursor: pointer;
padding: 3px 5px;
margin: 5px;
}
html {
background: url(http://farm4.static.flickr.com/3112/2721341322_e73bca6a9e_b.jpg);
}
h1 {
color: white;
}
</style>
</head>
<body>
<div id="doc">
<h1>ClouserW Soundboard</h1>
<!-- JS here to prevent 'flash' of all the default audio players -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("audio").removeAttr("controls").each(function(i, audioElement) {
var audio = $(this);
var that = this; //closure to keep reference to current audio tag
$("#doc").append($('<button>'+audio.attr("title")+'</button>').click(function() {
that.play();
}));
});
});
</script>
<?php foreach($files as $file) { ?>
<?php $title = str_replace(".ogg", "", str_replace("clips/", "", $file)); ?>
<audio src="<?php echo $file; ?>" controls autobuffer="true" title="<?php echo $title ?>"></audio>
<?php } ?>
</div>
</body>
</html>
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server