summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2016-10-02 01:15:34 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2016-10-02 01:15:34 +0900
commitea9da7da611509fbe9c5f23867414242a443e3a8 (patch)
tree5937fa19d9df34ed4d5ae135a6af6be9d82d8f48
parenta3b9c4405c6d4cca2a70dbb400e3ba3f65e7ea04 (diff)
Make slack report notifier, donate page, irc page and radio page use configuration variables instead of hard coding values.
-rw-r--r--inc/config.php6
-rw-r--r--post.php48
-rw-r--r--stylesheets/progressbar.css159
-rw-r--r--templates/themes/donate/donate.html173
-rw-r--r--templates/themes/donate/info.php33
-rw-r--r--templates/themes/irc/info.php7
-rw-r--r--templates/themes/irc/irc.html4
-rw-r--r--templates/themes/irc/radio.html29
-rw-r--r--templates/themes/radio/info.php9
-rw-r--r--templates/themes/radio/radio.html2
10 files changed, 242 insertions, 228 deletions
diff --git a/inc/config.php b/inc/config.php
index dc65068f..0f2d40fc 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -1811,9 +1811,9 @@
'</a></div>';
// Slack Report Notification
- $config['slack'] = true;
- $config['slack_channel'] = "reports";
- $config['slack_incoming_webhook_endpoint'] = "https://hooks.slack.com/services/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";
+ $config['slack'] = false;
+ $config['slack_channel'] = "";
+ $config['slack_incoming_webhook_endpoint'] = "https://hooks.slack.com/services/";
// Password hashing function
//
diff --git a/post.php b/post.php
index 070cbd88..84858bb2 100644
--- a/post.php
+++ b/post.php
@@ -342,36 +342,38 @@ if (isset($_POST['delete'])) {
$query->bindValue(':post', $id, PDO::PARAM_INT);
$query->bindValue(':reason', $reason, PDO::PARAM_STR);
$query->execute() or error(db_error($query));
- if ($config['slack'])
- {
- function slack($message, $room = "reports", $icon = ":no_entry_sign:")
- {
- $room = ($room) ? $room : "reports";
- $data = "payload=" . json_encode(array(
- "channel" => "#{$room}",
- "text" => urlencode($message),
- "icon_emoji" => $icon
- ));
+
+ if ($config['slack'])
+ {
+
+ function slack($message, $room = "reports", $icon = ":no_entry_sign:")
+ {
+ $room = ($room) ? $room : "reports";
+ $data = "payload=" . json_encode(array(
+ "channel" => "#{$room}",
+ "text" => urlencode($message),
+ "icon_emoji" => $icon
+ ));
- // You can get your webhook endpoint from your Slack settings
- // For some reason using the configuration key doesn't work
- //$ch = curl_init($config['slack_incoming_webhook_endpoint']);
- $ch = curl_init("https://hooks.slack.com/services/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");
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $result = curl_exec($ch);
- curl_close($ch);
+ // You can get your webhook endpoint from your Slack settings
+ // For some reason using the configuration key doesn't work
+ $ch = curl_init($config['slack_incoming_webhook_endpoint']);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ $result = curl_exec($ch);
+ curl_close($ch);
- return $result;
- }
+ return $result;
+ }
$postcontent = mb_substr($thread['body_nomarkup'], 0, 120) . '... _*(POST TRIMMED)*_';
$slackmessage = '<' .$config['domain'] . "/mod.php?/" . $board['dir'] . $config['dir']['res'] . ( $thread['thread'] ? $thread['thread'] : $id ) . ".html" . ($thread['thread'] ? '#' . $id : '') . '> \n ' . $reason . '\n ' . $postcontent . '\n';
$slackresult = slack($slackmessage, $config['slack_channel']);
- }
+
+ }
}
diff --git a/stylesheets/progressbar.css b/stylesheets/progressbar.css
new file mode 100644
index 00000000..6083e72e
--- /dev/null
+++ b/stylesheets/progressbar.css
@@ -0,0 +1,159 @@
+ /*---------------------------*/
+ .container {
+ margin: auto;
+ width : 50%;
+ }
+ .progress-bar {
+ background-color: #1a1a1a;
+ height: 25px;
+ padding: 5px;
+ width: 350px;
+ position: relative;
+ margin: 70px 0 20px 0;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ -moz-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
+ -webkit-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
+ box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
+ }
+
+ .progress-bar span {
+ display: inline-block;
+ height: 100%;
+ background-color: #777;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
+ -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
+ box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
+ -webkit-transition: width .4s ease-in-out;
+ -moz-transition: width .4s ease-in-out;
+ -ms-transition: width .4s ease-in-out;
+ -o-transition: width .4s ease-in-out;
+ transition: width .4s ease-in-out;
+ }
+
+
+ .blue span {
+ background-color: #34c2e3;
+ }
+
+ .red span {
+ background-color: #f42323;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f42323), to(#ff0000));
+ background-image: -webkit-linear-gradient(top, #f42323, #ff0000);
+ background-image: -moz-linear-gradient(top, #f42323, #ff0000);
+ background-image: -ms-linear-gradient(top, #f42323, #ff0000);
+ background-image: -o-linear-gradient(top, #f42323, #ff0000);
+ background-image: linear-gradient(top, #f42323, #ff0000);
+ }
+
+ .green span {
+ background-color: #a5df41;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#a5df41), to(#4ca916));
+ background-image: -webkit-linear-gradient(top, #a5df41, #4ca916);
+ background-image: -moz-linear-gradient(top, #a5df41, #4ca916);
+ background-image: -ms-linear-gradient(top, #a5df41, #4ca916);
+ background-image: -o-linear-gradient(top, #a5df41, #4ca916);
+ background-image: linear-gradient(top, #a5df41, #4ca916);
+ }
+
+ /*---------------------------*/
+
+ .stripes span {
+ -webkit-background-size: 30px 30px;
+ -moz-background-size: 30px 30px;
+ background-size: 30px 30px;
+ background-image: -webkit-gradient(linear, left top, right bottom,
+ color-stop(.25, rgba(255, 255, 255, .15)), color-stop(.25, transparent),
+ color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .15)),
+ color-stop(.75, rgba(255, 255, 255, .15)), color-stop(.75, transparent),
+ to(transparent));
+ background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
+ transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
+ transparent 75%, transparent);
+ background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
+ transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
+ transparent 75%, transparent);
+ background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
+ transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
+ transparent 75%, transparent);
+ background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
+ transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
+ transparent 75%, transparent);
+ background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
+ transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
+ transparent 75%, transparent);
+
+ -webkit-animation: animate-stripes 3s linear infinite;
+ -moz-animation: animate-stripes 3s linear infinite;
+ }
+
+ @-webkit-keyframes animate-stripes {
+ 0% {background-position: 0 0;} 100% {background-position: 60px 0;}
+ }
+
+
+ @-moz-keyframes animate-stripes {
+ 0% {background-position: 0 0;} 100% {background-position: 60px 0;}
+ }
+
+ /*---------------------------*/
+
+ .shine span {
+ position: relative;
+ }
+
+ .shine span::after {
+ content: '';
+ opacity: 0;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background: #fff;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+
+ -webkit-animation: animate-shine 2s ease-out infinite;
+ -moz-animation: animate-shine 2s ease-out infinite;
+ }
+
+ @-webkit-keyframes animate-shine {
+ 0% {opacity: 0; width: 0;}
+ 50% {opacity: .5;}
+ 100% {opacity: 0; width: 95%;}
+ }
+
+
+ @-moz-keyframes animate-shine {
+ 0% {opacity: 0; width: 0;}
+ 50% {opacity: .5;}
+ 100% {opacity: 0; width: 95%;}
+ }
+ .glow span {
+ -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;
+ -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;
+ box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;
+
+ -webkit-animation: animate-glow 1s ease-out infinite;
+ -moz-animation: animate-glow 1s ease-out infinite;
+ }
+
+ @-webkit-keyframes animate-glow {
+ 0% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
+ 50% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;}
+ 100% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
+ }
+
+ @-moz-keyframes animate-glow {
+ 0% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
+ 50% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;}
+ 100% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
+ }
+
+
diff --git a/templates/themes/donate/donate.html b/templates/themes/donate/donate.html
index 551eea62..27f16747 100644
--- a/templates/themes/donate/donate.html
+++ b/templates/themes/donate/donate.html
@@ -7,167 +7,8 @@
<link rel="shortcut icon" href="/favicon.png">
<link rel="stylesheet" media="screen" href="/stylesheets/style.css"/>
<link rel="stylesheet" media="screen" href="/stylesheets/dark.css"/>
+ <link rel="stylesheet" media="screen" href="/stylesheets/progressbar.css"/>
{% if config.font_awesome %}<link rel="stylesheet" href="{{ config.root }}{{ config.font_awesome_css }}">{% endif %}
-<style>
- /*---------------------------*/
- .container {
- margin: auto;
- width : 50%;
- }
- .progress-bar {
- background-color: #1a1a1a;
- height: 25px;
- padding: 5px;
- width: 350px;
- position: relative;
- margin: 70px 0 20px 0;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- -moz-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
- -webkit-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
- box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
- }
-
- .progress-bar span {
- display: inline-block;
- height: 100%;
- background-color: #777;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
- -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
- box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
- -webkit-transition: width .4s ease-in-out;
- -moz-transition: width .4s ease-in-out;
- -ms-transition: width .4s ease-in-out;
- -o-transition: width .4s ease-in-out;
- transition: width .4s ease-in-out;
- }
-
-
- .blue span {
- background-color: #34c2e3;
- }
-
- .red span {
- background-color: #f42323;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f42323), to(#ff0000));
- background-image: -webkit-linear-gradient(top, #f42323, #ff0000);
- background-image: -moz-linear-gradient(top, #f42323, #ff0000);
- background-image: -ms-linear-gradient(top, #f42323, #ff0000);
- background-image: -o-linear-gradient(top, #f42323, #ff0000);
- background-image: linear-gradient(top, #f42323, #ff0000);
- }
-
- .green span {
- background-color: #a5df41;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#a5df41), to(#4ca916));
- background-image: -webkit-linear-gradient(top, #a5df41, #4ca916);
- background-image: -moz-linear-gradient(top, #a5df41, #4ca916);
- background-image: -ms-linear-gradient(top, #a5df41, #4ca916);
- background-image: -o-linear-gradient(top, #a5df41, #4ca916);
- background-image: linear-gradient(top, #a5df41, #4ca916);
- }
-
- /*---------------------------*/
-
- .stripes span {
- -webkit-background-size: 30px 30px;
- -moz-background-size: 30px 30px;
- background-size: 30px 30px;
- background-image: -webkit-gradient(linear, left top, right bottom,
- color-stop(.25, rgba(255, 255, 255, .15)), color-stop(.25, transparent),
- color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .15)),
- color-stop(.75, rgba(255, 255, 255, .15)), color-stop(.75, transparent),
- to(transparent));
- background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
- transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
- transparent 75%, transparent);
- background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
- transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
- transparent 75%, transparent);
- background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
- transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
- transparent 75%, transparent);
- background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
- transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
- transparent 75%, transparent);
- background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
- transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
- transparent 75%, transparent);
-
- -webkit-animation: animate-stripes 3s linear infinite;
- -moz-animation: animate-stripes 3s linear infinite;
- }
-
- @-webkit-keyframes animate-stripes {
- 0% {background-position: 0 0;} 100% {background-position: 60px 0;}
- }
-
-
- @-moz-keyframes animate-stripes {
- 0% {background-position: 0 0;} 100% {background-position: 60px 0;}
- }
-
- /*---------------------------*/
-
- .shine span {
- position: relative;
- }
-
- .shine span::after {
- content: '';
- opacity: 0;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- background: #fff;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-
- -webkit-animation: animate-shine 2s ease-out infinite;
- -moz-animation: animate-shine 2s ease-out infinite;
- }
-
- @-webkit-keyframes animate-shine {
- 0% {opacity: 0; width: 0;}
- 50% {opacity: .5;}
- 100% {opacity: 0; width: 95%;}
- }
-
-
- @-moz-keyframes animate-shine {
- 0% {opacity: 0; width: 0;}
- 50% {opacity: .5;}
- 100% {opacity: 0; width: 95%;}
- }
- .glow span {
- -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;
- -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;
- box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;
-
- -webkit-animation: animate-glow 1s ease-out infinite;
- -moz-animation: animate-glow 1s ease-out infinite;
- }
-
- @-webkit-keyframes animate-glow {
- 0% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
- 50% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;}
- 100% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
- }
-
- @-moz-keyframes animate-glow {
- 0% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
- 50% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;}
- 100% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;}
- }
-
- </style>
</head>
<body>
<div class="bar top">{{ boardlist.top }}</div>
@@ -181,7 +22,7 @@
</center>
<div class="ban">
<h2>Thanks for donating</h2>
- <p>The server costs $55 per month. If you buy stickers we get about 45-55% of whatever you spend. Historical donation records to the former owner are ForeverN2Dust is the top donator, giving about $3000. FOOFDOOF is #2 with $1000 and lots of cheap Chinese shit. Please specify what you'd like your money to go towards. If you don't want to buy stickers, but want to donate something else please either ask in /q/ or contact the Lainchan administration on IRC at #lainchan on Freenode.
+ <p>The server costs {{ settings.monthlyamount }} per month. If you buy stickers we get about 45-55% of whatever you spend. Historical donation records to the former owner are ForeverN2Dust is the top donator, giving about $3000. FOOFDOOF is #2 with $1000 and lots of cheap Chinese shit. Please specify what you'd like your money to go towards. If you don't want to buy stickers, but want to donate something else please either ask in /q/ or contact the Lainchan administration on IRC at #lainchan on Freenode.
</p>
<p><a href="https://www.stickermule.com/marketplace/tags/lainchan"> Buy stickers here</a>
@@ -189,16 +30,16 @@
<p>Monthly Funding Progress Bar</p>
-<p>Cost per month $55</p>
+<p>Cost per month {{ settings.monthlyamount }}</p>
-<p>Funds from stickers $37.75</p>
+<p>Funds from stickers {{ settings.currentamount }} </p>
<div class="container">
-<div class="progress-bar red glow">
- <span style="width:14%;position:relative;left:36%;
+ <div class="{{ settings.progressbarcssclass }}">
+ <span style="width:14%;position:relative;left:{{ settings.progressbarcssleft }}%;
"> </span>
</div>
-<div id="value" style="position:relative;left:135px;top:-45px">$-19.25</div>
+<div id="value" style="position:relative;left:{{ settings.progressbartextcssleft }}px;top:-45px">{{ settings.currentprogress }}</div>
</div>
</div>
diff --git a/templates/themes/donate/info.php b/templates/themes/donate/info.php
index fa3f649b..2b618e89 100644
--- a/templates/themes/donate/info.php
+++ b/templates/themes/donate/info.php
@@ -17,7 +17,38 @@ $theme = array(
array('title' => 'File',
'name' => 'file',
'type' => 'text',
- 'default' => 'donate.html')),
+ 'default' => 'donate.html'),
+
+ array('title' => 'Monthly Amount',
+ 'name' => 'monthlyamount',
+ 'type' => 'text',
+ 'default' => '$55'),
+
+ array('title' => 'Current Amount',
+ 'name' => 'currentamount',
+ 'type' => 'text',
+ 'default' => '$0'),
+
+ array('title' => 'Current Progress',
+ 'name' => 'currentprogress',
+ 'type' => 'text',
+ 'default' => '$0'),
+
+ array('title' => 'Progress Bar CSS class',
+ 'name' => 'progressbarcssclass',
+ 'type' => 'text',
+ 'default' => 'progress-bar red glow'),
+
+ array('title' => 'Progress Bar CSS left',
+ 'name' => 'progressbarcssleft',
+ 'type' => 'text',
+ 'default' => '36'),
+
+ array('title' => 'Progress Bar Text CSS left',
+ 'name' => 'progressbartextcssleft',
+ 'type' => 'text',
+ 'default' => '135'),
+ ),
'build_function' => 'donate_build');
?>
diff --git a/templates/themes/irc/info.php b/templates/themes/irc/info.php
index 8b31b011..59ff4bd6 100644
--- a/templates/themes/irc/info.php
+++ b/templates/themes/irc/info.php
@@ -17,7 +17,12 @@ $theme = array(
array('title' => 'File',
'name' => 'file',
'type' => 'text',
- 'default' => 'irc.html')),
+ 'default' => 'irc.html'),
+
+ array('title' => 'Channel',
+ 'name' => 'channel',
+ 'type' => 'text',
+ 'default' => 'lainchan')),
'build_function' => 'irc_build');
?>
diff --git a/templates/themes/irc/irc.html b/templates/themes/irc/irc.html
index 2828b6e0..1766f426 100644
--- a/templates/themes/irc/irc.html
+++ b/templates/themes/irc/irc.html
@@ -22,8 +22,8 @@
<div class="ban" style="text-align: left!important;">
- <h2>Web Client - Point your own clients to #lainchan on irc.freenode.net.</h2>
- <iframe src="https://webchat.freenode.net?channels=%23lainchan&uio=MTE9MTMz98" width="766" height="400"></iframe>
+ <h2>Web Client - Point your own clients to #{{ settings.channel }} on irc.freenode.net.</h2>
+ <iframe src="https://webchat.freenode.net?channels=%23{{ settings.channel }}&uio=MTE9MTMz98" width="766" height="400"></iframe>
</div>
</body>
</html>
diff --git a/templates/themes/irc/radio.html b/templates/themes/irc/radio.html
deleted file mode 100644
index 7f84134b..00000000
--- a/templates/themes/irc/radio.html
+++ /dev/null
@@ -1,29 +0,0 @@
-{% filter remove_whitespace %}
-<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <title>{{ settings.title }}</title>
- <link rel="shortcut icon" href="/favicon.png">
- <link rel="stylesheet" media="screen" href="/stylesheets/style.css"/>
- <link rel="stylesheet" media="screen" href="/stylesheets/dark.css"/>
- <link rel="stylesheet" media="screen" href="/stylesheets/dark_irc.css"/>
- </head>
- <body>
- <div class="bar top">
- {{ boardlist.top }}
- </div>
-
- <header>
- <h1>{{ settings.title }}</h1>
- <div class="subtitle">{{ settings.subtitle }}</div>
- </header>
-
-
- <div class="ban" style="text-align: left!important;">
- <h2>Web Client - Point your own clients to #lainchan on irc.freenode.net.</h2>
- <iframe src="https://webchat.freenode.net?channels=%23lainchan&uio=MTE9MTMz98" width="766" height="400"></iframe>
- </div>
- </body>
-</html>
-{% endfilter %}
diff --git a/templates/themes/radio/info.php b/templates/themes/radio/info.php
index d6679733..2ae31fbd 100644
--- a/templates/themes/radio/info.php
+++ b/templates/themes/radio/info.php
@@ -17,7 +17,12 @@ $theme = array(
array('title' => 'File',
'name' => 'file',
'type' => 'text',
- 'default' => 'radio.html')),
+ 'default' => 'radio.html'),
+
+ array('title' => 'Radio Status URL',
+ 'name' => 'radiostatus',
+ 'type' => 'text',
+ 'default' => '/radio_assets/status.xsl')),
'build_function' => 'radio_build');
-?> \ No newline at end of file
+?>
diff --git a/templates/themes/radio/radio.html b/templates/themes/radio/radio.html
index b19d703a..3e16430e 100644
--- a/templates/themes/radio/radio.html
+++ b/templates/themes/radio/radio.html
@@ -16,7 +16,7 @@ $(document).ready(function(){
});
function check_status(){
-$.get("/radio_assets/status.xsl", function(data){
+$.get("{{ settings.radiostatus }}", function(data){
var el = $( '<div></div>' );
el.html(data);
var sd = el.find(".streamdata");