From c76772e868dae500c536f283af19d92fc50756dc Mon Sep 17 00:00:00 2001
From: 8chan
Date: Fri, 24 Apr 2015 17:46:53 -0700
Subject: [PATCH 1/5] claim.php: file_write, not unix pipe (fix blank page
issue)
---
README.md | 2 +-
claim.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 7018cdc8..dc84fee8 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ A lot of the static pages (claim.html, boards.html, index.html) need to be regen
```cron
*/10 * * * * cd /srv/http; /usr/bin/php /srv/http/boards.php
-*/5 * * * * cd /srv/http; /usr/bin/php /srv/http/claim.php > /srv/http/claim.html
+*/5 * * * * cd /srv/http; /usr/bin/php /srv/http/claim.php
*/20 * * * * cd /srv/http; /usr/bin/php -r 'include "inc/functions.php"; rebuildThemes("bans");'
*/5 * * * * cd /srv/http; /usr/bin/php /srv/http/index.php
```
diff --git a/claim.php b/claim.php
index 456c8a32..11625e85 100644
--- a/claim.php
+++ b/claim.php
@@ -58,4 +58,4 @@ foreach($boards as $board) {
}
}
$body = Element("8chan/claim.html", array("config" => $config, "delete" => $delete));
-echo Element("page.html", array("config" => $config, "body" => $body, "title" => _("Claim"), "subtitle" => _("Take deserted boards back from their owners")));
+file_write("claim.html", Element("page.html", array("config" => $config, "body" => $body, "title" => _("Claim"), "subtitle" => _("Take deserted boards back from their owners"))));
From b6675ba7b70641569f8bb52ff5a565e343421e9c Mon Sep 17 00:00:00 2001
From: 8chan
Date: Fri, 24 Apr 2015 17:47:11 -0700
Subject: [PATCH 2/5] Gratipay->Flattr
---
faq.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/faq.php b/faq.php
index 5da901db..e3023766 100644
--- a/faq.php
+++ b/faq.php
@@ -166,7 +166,7 @@ Assuming the /b/ board, they are as follows:
How do I donate?
Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LUPgSCJt3iGeJXUETVhmnbQ89Riaq1yjZm (Litecoin).
I am also a big fan of Monero (XMR). You can send XMR to our OpenAlias in the simplewallet client, or simply send to 49dBJhGhYFxJEfydS6hH6GRyg1W4cDgupdNVtw7j1WtcUY7xPXwNLw6fUVay644viaCcEhMFG1Z7SjjxRXEFDdNWJdvH9kS.
-If you would like to support development of the engine that 8chan runs on (infinity), you may also donate via Gratipay.
+If you would like to support development of the engine that 8chan runs on (infinity), you may also
.
Are you really a cripple?
Yes.
From bcb387da43f980de8e117ccae4d532d4725a8011 Mon Sep 17 00:00:00 2001
From: 8chan
Date: Fri, 24 Apr 2015 17:48:06 -0700
Subject: [PATCH 3/5] news+ -> n
---
inc/instance-config.php | 2 +-
index.php | 4 ++--
templates/8chan/index.html | 10 +++++-----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/inc/instance-config.php b/inc/instance-config.php
index a212d323..d75cefe3 100644
--- a/inc/instance-config.php
+++ b/inc/instance-config.php
@@ -165,7 +165,7 @@
$config['markup_paragraphs'] = true;
$config['markup_rtl'] = true;
- $config['boards'] = array(array('' => '/', '' => '/boards.html', '' => '/faq.html', '' => '/random.php', '' => '/create.php', '' => '/bans.html', '' => '/search.php', '' => '/mod.php', '' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'news+', 'boards'), array('operate', 'meta'), array(''=>'https://twitter.com/infinitechan'));
+ $config['boards'] = array(array('' => '/', '' => '/boards.html', '' => '/faq.html', '' => '/random.php', '' => '/create.php', '' => '/bans.html', '' => '/search.php', '' => '/mod.php', '' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'n', 'boards'), array('operate', 'meta'), array(''=>'https://twitter.com/infinitechan'));
//$config['boards'] = array(array('' => '/', '' => '/boards.html', '' => '/faq.html', '' => '/random.php', '' => '/create.php', '' => '/search.php', '' => '/mod.php', '' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array('v', 'a', 'tg', 'fit', 'pol', 'tech', 'mu', 'co', 'sp', 'boards'), array(''=>'https://twitter.com/infinitechan'));
$config['footer'][] = 'All posts on 8chan are the responsibility of the individual poster and not the administration of 8chan, pursuant to 47 U.S.C. § 230.';
diff --git a/index.php b/index.php
index a44b56e5..1081ba65 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
fetchAll(PDO::FETCH_ASSOC);
} else {
@@ -10,4 +10,4 @@ if ($query) {
$index = Element("8chan/index.html", array("config" => $config, "newsplus" => $newsplus));
file_write('index.html', $index);
-echo $index;
\ No newline at end of file
+echo $index;
diff --git a/templates/8chan/index.html b/templates/8chan/index.html
index 14f614b2..caab5157 100644
--- a/templates/8chan/index.html
+++ b/templates/8chan/index.html
@@ -209,18 +209,18 @@
@@ -276,11 +276,11 @@
{% trans %}Create your board{% endtrans %}
{% trans %}Browse existing boards{% endtrans %}
- Latest headlines |
+
From 5352d2f40098f0f3b9b122982ad07d0941ecb324 Mon Sep 17 00:00:00 2001
From: 8chan
Date: Fri, 24 Apr 2015 17:48:22 -0700
Subject: [PATCH 4/5] Defer buildIndex after fastcgi_finish_request
---
post.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/post.php b/post.php
index ce6a5f47..adefeaf6 100644
--- a/post.php
+++ b/post.php
@@ -1015,12 +1015,12 @@ elseif (isset($_POST['post'])) {
event('post-after', $post);
- buildIndex();
-
// We are already done, let's continue our heavy-lifting work in the background (if we run off FastCGI)
if (function_exists('fastcgi_finish_request')) {
@fastcgi_finish_request();
}
+
+ buildIndex();
if ($post['op']) {
rebuildThemes('post-thread', $board['uri']);
From e4f8725c552e6d5669fad26ecaf35ba917656f43 Mon Sep 17 00:00:00 2001
From: 8chan
Date: Fri, 24 Apr 2015 17:49:11 -0700
Subject: [PATCH 5/5] Announcement class
---
stylesheets/style.css | 6 ++++++
templates/thread.html | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/stylesheets/style.css b/stylesheets/style.css
index 0cf9b2a3..7a6651f1 100644
--- a/stylesheets/style.css
+++ b/stylesheets/style.css
@@ -1649,3 +1649,9 @@ td.board-tags a.tag-link {
#post-moderation-fields {
display: none;
}
+.announcement {
+ font-size: 75%;
+ padding-bottom: 1%;
+ margin-left: 25%;
+ margin-right: 25%;
+}
diff --git a/templates/thread.html b/templates/thread.html
index 6ff6fa2c..4e3e825c 100644
--- a/templates/thread.html
+++ b/templates/thread.html
@@ -44,6 +44,10 @@
{% include 'attention_bar.html' %}
+ {% if config.announcement %}
+ {{ config.announcement }}
+ {% endif %}
+