Skip to content

Commit

Permalink
Simple plugin to draw a big green button to start a playlist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Materdaddy committed Oct 22, 2014
1 parent 3c6a647 commit ba31143
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
32 changes: 32 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.button{
width:400px; /*same as the height*/
height:400px; /*same as the width*/
display: block;
/*
background-color:#ff0000;
*/
background-color: #58aa00;
border:1px solid #58aa00; /*same colour as the background*/
color:#fff;

font-size:500%;
text-align: center;
text-shadow: 2px 2px #555;

/*set the border-radius at half the size of the width and height*/
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
/*give the button a small drop shadow*/
-webkit-box-shadow: 0 0 10px rgba(0,0,0, .75);
-moz-box-shadow: 0 0 10px rgba(0,0,0, .75);
box-shadow: 2px 2px 15px rgba(0,0,0, .75);
}
.button:hover{
background:#490;
border:1px solid #490;
/*reduce the size of the shadow to give a pushed effect*/
-webkit-box-shadow: 0px 0px 5px rgba(0,0,0, .75);
-moz-box-shadow: 0px 0px 5px rgba(0,0,0, .75);
box-shadow: 0px 0px 5px rgba(0,0,0, .75);
}
32 changes: 32 additions & 0 deletions plugin_setup.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
$playlists = Array();
foreach(scandir($playlistDirectory) as $pFile)
if ($pFile != "." && $pFile != "..")
$playlists[$pFile] = $pFile;
?>

<script>
function StartPlaylist()
{
var Playlist = $("#PlaylistSelect").val();
var Repeat = $("#Repeat").is(':checked')?'checked':'unchecked';
var xmlhttp=new XMLHttpRequest();
var url = "fppxml.php?command=startPlaylist&playList=" + Playlist + "&repeat=" + Repeat ;
xmlhttp.open("GET",url,true);
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send();
}
</script>

<div id="start" class="settings">
<fieldset>
<legend>Big Green Button</legend>

<p>Playlist: <?php PrintSettingSelect("Playlist", "PlaylistSelect", "disabled", $playlists, "big-green-button"); ?> Repeat: <?php PrintSettingCheckbox("Repeat", "Repeat", "1", "0", "big-green-button"); ?></p>

<p><input class="button" onClick="StartPlaylist();" type="submit" value="Start" /></p>

</fieldset>
</div>

<br />
11 changes: 11 additions & 0 deletions status_menu.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

$pages = Array(
'name' => "Big Green Button",
'type' => "status",
'page' => "plugin_setup.php",
);

?>

<li><a href="<?php echo preg_replace('/.*\/plugins\/(.*)/', 'plugin.php?plugin=$1&page=plugin_setup.php', dirname(__FILE__)); ?>">Big Green Button</a></li>

0 comments on commit ba31143

Please sign in to comment.