From a7e563679bc110e9bb3ac626abbf59633947296d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Mon, 12 Jan 2015 21:15:18 +0100 Subject: [PATCH] Added support for hiding or showing channel on frontpage in settings --- js/iscroll-min.js | 0 js/main-min.js | 0 js/playercontrols.js | 0 php/footer-old.php | 0 php/nochan.php | 7 ++++++- static/GitHub_Logo.png | Bin static/ajax-loader.gif | Bin static/bg1.jpg | Bin static/bg2.jpg | Bin static/bg3.jpg | Bin static/bg4.jpg | Bin static/bg5.jpg | Bin static/controlstyle.css | 0 static/open_sans.woff | Bin static/player.webp | Bin 15 files changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 js/iscroll-min.js mode change 100644 => 100755 js/main-min.js mode change 100644 => 100755 js/playercontrols.js mode change 100644 => 100755 php/footer-old.php mode change 100644 => 100755 static/GitHub_Logo.png mode change 100644 => 100755 static/ajax-loader.gif mode change 100644 => 100755 static/bg1.jpg mode change 100644 => 100755 static/bg2.jpg mode change 100644 => 100755 static/bg3.jpg mode change 100644 => 100755 static/bg4.jpg mode change 100644 => 100755 static/bg5.jpg mode change 100644 => 100755 static/controlstyle.css mode change 100644 => 100755 static/open_sans.woff mode change 100644 => 100755 static/player.webp diff --git a/js/iscroll-min.js b/js/iscroll-min.js old mode 100644 new mode 100755 diff --git a/js/main-min.js b/js/main-min.js old mode 100644 new mode 100755 diff --git a/js/playercontrols.js b/js/playercontrols.js old mode 100644 new mode 100755 diff --git a/php/footer-old.php b/php/footer-old.php old mode 100644 new mode 100755 diff --git a/php/nochan.php b/php/nochan.php index ab4ddcde..8d1b958e 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -23,7 +23,12 @@ foreach($dir as $files){ } } if($time_lasted < $time){ - array_push($channels, ucfirst(str_replace(".json", "", $files))); + $file = file_get_contents('./lists/'.$files); //Checking if the channel has the setting for showing on the frontpage set to true. + $data = json_decode($file, TRUE); + $conf = $data['conf']['frontpage']; + if($conf == "true"){ //If it is true, the channelname will be shown on the frontpage + array_push($channels, ucfirst(str_replace(".json", "", $files))); + } } array_push($all_channels, ucfirst(str_replace(".json", "", $files))); } diff --git a/static/GitHub_Logo.png b/static/GitHub_Logo.png old mode 100644 new mode 100755 diff --git a/static/ajax-loader.gif b/static/ajax-loader.gif old mode 100644 new mode 100755 diff --git a/static/bg1.jpg b/static/bg1.jpg old mode 100644 new mode 100755 diff --git a/static/bg2.jpg b/static/bg2.jpg old mode 100644 new mode 100755 diff --git a/static/bg3.jpg b/static/bg3.jpg old mode 100644 new mode 100755 diff --git a/static/bg4.jpg b/static/bg4.jpg old mode 100644 new mode 100755 diff --git a/static/bg5.jpg b/static/bg5.jpg old mode 100644 new mode 100755 diff --git a/static/controlstyle.css b/static/controlstyle.css old mode 100644 new mode 100755 diff --git a/static/open_sans.woff b/static/open_sans.woff old mode 100644 new mode 100755 diff --git a/static/player.webp b/static/player.webp old mode 100644 new mode 100755