Commit 9e55c57c authored by Simon Welsh's avatar Simon Welsh

Bunch of changes

parent 664292fc
......@@ -11,6 +11,7 @@ require 'tags/info.php';
require 'tags/log.php';
require 'tags/logs.php';
require 'tags/month.php';
require 'tags/sponsor.php';
require 'tags/timezone.php';
require 'tags/year.php';
require 'tags/years.php';
......@@ -75,7 +76,7 @@ function build_dates() {
$td = date('j');
if(isset($dates[$ty][$tm][$td])) {
$r->set('log:dates', $dates);
$d = new DateTime('midnight tomorrow', new DateTimeZone('Pacific/Auckland'));
$d = new DateTime('midnight tomorrow', new DateTimeZone('Australia/Canberra'));
$r->expireAt('log:dates', $d->format('U'));
}
}
......
......@@ -9,16 +9,7 @@ class :logs:foot extends :x:element {
protected function render() {
$url = 'irc://' . $this->getAttribute('server') . '/' . substr($this->getAttribute('channel'), 1);
return <p>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-2032949232018859"
data-ad-slot="3717064928"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({'{}'});
</script>
<br />
These logs were automatically created by <b>{$this->getAttribute('nick')}</b> on <a href={$url}>{$this->getAttribute('server')}</a>.
This site is powered by <a href="http://logs.simon.geek.nz/source/">code</a> available under a <a href="http://logs.simon.geek.nz/LICENSE">BSD license</a>.
</p>;
}
}
<?php
class :logs:sponsor extends :x:element {
protected function render() {
return <p>
Logging kindly sponsored by <a href="http://stripethenet.com/">Stripe The Net: Hosting and Deployment, made simple</a>.
</p>;
}
}
......@@ -3,7 +3,7 @@
class :logs:timezone extends :x:element {
protected function render() {
return <p>
All timestamps are in NZT (<a href="http://timeanddate.com/worldclock/city.html?n=264" title="Click here to see what time it is right now in Wellington, New Zealand">New Zealand Time</a>).
All timestamps are in AET (<a href="http://time.is/Canberra" title="Click here to see what time it is right now in Canberra, Australia">Australian Eastern Time</a>).
</p>;
}
}
......@@ -19,16 +19,11 @@ if(isset($_GET['date']) && preg_match('#^20[0-9]{2}-[01][0-9]-[0-3][0-9]$#', $_G
$body->appendChild(<logs:info>
<h2>IRC log for {date('j F Y', $time)}</h2>
</logs:info>);
$body->appendChild(<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-2032949232018859"
data-ad-slot="3856665720"></ins>);
$body->appendChild(<script>
(adsbygoogle = window.adsbygoogle || []).push({'{}'});
</script>);
$body->appendChild(<logs:sponsor />);
$body->appendChild(<logs:timezone />);
$body->appendChild(<logs:logs stamp={$time} />);
$body->appendChild(<logs:sponsor />);
} else {
header('Location: index.php');
exit;
......@@ -46,12 +41,14 @@ $body->appendChild(<script>
} else {
$body->appendChild(<logs:info />);
}
$body->appendChild(<logs:sponsor />);
$thisMonth = mktime(0, 0, 0, date('n'), 1, date('Y'));
foreach($dates as $year => $months) {
$body->appendChild(<logs:year year={$year} months={$months} />);
}
$body->appendChild(<logs:sponsor />);
}
echo <logs:document head={$head} body={$body} />;
......@@ -32,6 +32,7 @@ if($order) {
$body->appendChild(<logs:info>
{$header}
</logs:info>);
$body->appendChild(<logs:sponsor />);
$body->appendChild(<logs:timezone />);
if(empty($results)) {
......@@ -44,5 +45,6 @@ if(empty($results)) {
$body->appendChild(<logs:logs logs={$results} format="d/m/Y H:i:s" class="results" />);
}
$body->appendChild(<logs:sponsor />);
echo <logs:document head={$head} body={$body} />;
......@@ -10,6 +10,7 @@ $body = <x:frag>
<logs:info>
<h2>Swear stats</h2>
</logs:info>
<logs:sponsor />
</x:frag>;
$stats = get_stats();
......@@ -50,5 +51,6 @@ foreach($stats[1] as $name => $values) {
}
$body->appendChild(<div class="clear"></div>);
$body->appendChild(<logs:sponsor />);
echo <logs:document head={$head} body={$body} />;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment