diff --git a/content/faq/quarterly-report-july-2016.md b/content/credit-reports/2016-Q2.md
similarity index 91%
rename from content/faq/quarterly-report-july-2016.md
rename to content/credit-reports/2016-Q2.md
index 5b635cda..a6c44d45 100644
--- a/content/faq/quarterly-report-july-2016.md
+++ b/content/credit-reports/2016-Q2.md
@@ -1,5 +1,6 @@
---
title: "Quarterly Credit Report: Second Quarter 2016"
+sheet: https://docs.google.com/spreadsheets/d/1r7puheE4Ut4c08R47uCDZbDdMHAoQa0WDqw470gjMIw/edit#gid=0
category: policy
---
@@ -7,10 +8,6 @@ category: policy
This is LBRY's first quarterly report. We enter with zero credits expended. We anticipate zero institutional expenditures, zero or limited organizational expenditures, and light community expenditures.
-## Current Balance Sheet
-
-[Available here](https://docs.google.com/spreadsheets/d/1r7puheE4Ut4c08R47uCDZbDdMHAoQa0WDqw470gjMIw/edit#gid=0)
-
## Overview By Fund
### Community Fund
diff --git a/content/faq/quarterly-report-3q-2016.md b/content/credit-reports/2016-Q3.md
similarity index 91%
rename from content/faq/quarterly-report-3q-2016.md
rename to content/credit-reports/2016-Q3.md
index f9ca1442..c9671455 100644
--- a/content/faq/quarterly-report-3q-2016.md
+++ b/content/credit-reports/2016-Q3.md
@@ -1,15 +1,12 @@
---
title: "Quarterly Credit Report: Third Quarter 2016"
+sheet: https://docs.google.com/spreadsheets/d/1zPG58YuLPqpB3yzypntRWouoEVc4saDOifpnvnwS8Rc/edit?ts=57f28d0e#gid=799352054
category: policy
---
## Summary
This is LBRY's second quarterly report. This quarter we outlaid only 267,778 of the 2,000,000 allocated Community credits. 100,000 operational credits were exchanged with Shapeshift to provide liquidity. No institutional credits were moved or spent.
-## Current Balance Sheet
-
-[Available here](https://docs.google.com/spreadsheets/d/1zPG58YuLPqpB3yzypntRWouoEVc4saDOifpnvnwS8Rc/edit?ts=57f28d0e#gid=799352054)
-
## Overview By Fund
### Community Fund
diff --git a/content/faq/Q4-credit-report.md b/content/credit-reports/2016-Q4.md
similarity index 91%
rename from content/faq/Q4-credit-report.md
rename to content/credit-reports/2016-Q4.md
index 631e3655..2e21acab 100644
--- a/content/faq/Q4-credit-report.md
+++ b/content/credit-reports/2016-Q4.md
@@ -1,6 +1,7 @@
---
title: "Quarterly Credit Report: Fourth Quarter 2016"
+sheet: https://docs.google.com/spreadsheets/d/11nKwFXN3gIQHnE7jYjEK5AFClyAde9aFs6UlnGX3Uzg/edit#gid=799352054
category: policy
---
## Summary
@@ -8,10 +9,6 @@ category: policy
This quarter we did not move any community credits from cold storage. We spent 293,604 already moved community credits on line items detailed below. No operational credits were moved or spent. No institutional credits were moved or spent.
As the LBRY protocol performance and reliability has increased, we anticipate increased outlays in Q1 2017. We will be redeeming many if not all beta invites, as well as launching a new program offering credits to developers. We also may begin the first institutional outlays, but any outlays here will be pilot programs and come with spending restrictions.
-## Current Balance Sheet
-
-[Available here](https://docs.google.com/spreadsheets/d/11nKwFXN3gIQHnE7jYjEK5AFClyAde9aFs6UlnGX3Uzg/edit#gid=799352054)
-
## Overview By Fund
### Community Fund
@@ -24,7 +21,7 @@ As the LBRY protocol performance and reliability has increased, we anticipate in
-4,345 credits were used for “other” purposes, mostly given to developers
-This quarter was a down quarter in credit outlays because we declined to send beta invites to users while the protocol was showing poor reliability.
+This quarter was a down quarter in credit outlays because we declined to send beta invites to users while the protocol was showing poor reliability.
As reliability has been increasing, we anticipate inviting many if not all users on the beta waitlist. This will represent a significant uptick in credit outlays, possibly as much as 1-2 million LBC. We will also be launching a new program offering credits to developers.
### Operational Fund
diff --git a/content/faq/Q1-17-CreditReport.md b/content/credit-reports/2017-Q1.md
similarity index 90%
rename from content/faq/Q1-17-CreditReport.md
rename to content/credit-reports/2017-Q1.md
index a1d13b74..6c8b2dc1 100644
--- a/content/faq/Q1-17-CreditReport.md
+++ b/content/credit-reports/2017-Q1.md
@@ -1,5 +1,6 @@
---
title: "Quarterly Credit Report: First Quarter 2017"
+sheet: https://docs.google.com/spreadsheets/d/1c-8CR1ro7lKOANHhWhivF7bZ19_ppgCq-d-HD_u43vM/edit#gid=799352054
category: policy
---
## Summary
@@ -7,10 +8,6 @@ category: policy
This quarter we moved 3 million community credits from cold storage. We spent 1,186,244 total community credits on line items detailed below. No operational credits were moved or spent. No institutional credits were moved or spent.
As the LBRY protocol performance and reliability has again increased, we anticipate increased outlays in Q2 2017. This will primarily be driven by the redemption of beta invites. We also may begin the first institutional outlays, but any outlays here will be pilot programs and come with spending restrictions.
-## Current Balance Sheet
-
-[Available here](https://docs.google.com/spreadsheets/d/1c-8CR1ro7lKOANHhWhivF7bZ19_ppgCq-d-HD_u43vM/edit#gid=799352054)
-
## Overview By Fund
### Community Fund
diff --git a/content/faq/bounties.md b/content/faq/bounties.md
index cef05759..d0752055 100644
--- a/content/faq/bounties.md
+++ b/content/faq/bounties.md
@@ -1,6 +1,6 @@
---
title: How does the Bounty Program work?
-category: policy
+category: other
---
You can earn LBRY Credits for completing tasks as part of the LBRY Bounty Program.
diff --git a/content/faq/credit-policy.md b/content/faq/credit-policy.md
index b70ff1d6..e92cc878 100644
--- a/content/faq/credit-policy.md
+++ b/content/faq/credit-policy.md
@@ -1,6 +1,6 @@
---
-title: LBRY Credit Policy
-category: policy
+title: What is LBRY doing with non-mined credits?
+category: other
---
LBRY, Inc. controls a significant number of LBRY credits (LBC). At the inception of the blockchain, it was 400,000,000 LBC.
@@ -21,14 +21,7 @@ The initial 400m credits are broken down as follows:
LBRY issues a quarterly report every 3 months in January, April, July, and October, covering the preceding 3 full months. These reports outline the corresponding transaction history as the current state of LBRY, Inc.'s balance sheet and anticipated future expenditures.
-| Date | Report | Balance Sheet |
-| ---- | ------ | ------------ |
-| Q2 2016 | [report](/faq/quarterly-report-july-2016) | [sheet](https://docs.google.com/spreadsheets/d/1r7puheE4Ut4c08R47uCDZbDdMHAoQa0WDqw470gjMIw/edit#gid=0) |
-| Q3 2016 | [report](/faq/quarterly-report-3q-2016) | [sheet](https://docs.google.com/spreadsheets/d/1zPG58YuLPqpB3yzypntRWouoEVc4saDOifpnvnwS8Rc/edit?ts=57f28d0e#gid=799352054) |
-| Q4 2016 | [report](https://docs.google.com/document/d/10xY_4PXQagYOMDBtA7Lv8-jcs2ryCBKi9WXvAN4l8EU/edit?usp=sharing) | [sheet](https://docs.google.com/spreadsheets/d/11nKwFXN3gIQHnE7jYjEK5AFClyAde9aFs6UlnGX3Uzg/edit?usp=sharing) |
-| Q1 2017 | [report](https://docs.google.com/document/d/1_B6hUXuxfSxsmVuNIUkgX7NROj0WvZc8PCI4O87aZkQ/edit?usp=sharing) | [sheet](https://docs.google.com/spreadsheets/d/1c-8CR1ro7lKOANHhWhivF7bZ19_ppgCq-d-HD_u43vM/edit?usp=sharing) |
-
-Specific details of historic, ongoing, and anticipated fund expenditures can be seen in the most recent quarterly report.
+The full list of these reports can be seen on [the credit reports page](https://lbry.io/credit-reports).
## Community Fund
diff --git a/controller/Controller.class.php b/controller/Controller.class.php
index ab3d3ac5..bcb70ae4 100644
--- a/controller/Controller.class.php
+++ b/controller/Controller.class.php
@@ -112,18 +112,22 @@ class Controller
$router->post('/set-culture', 'i18nActions::setCulture');
$permanentRedirects = [
- '/lbry-osx-latest.dmg' => '/get',
- '/lbry-linux-latest.deb' => '/get',
- '/dl/lbry_setup.sh' => '/get',
- '/art' => '/what',
- '/why' => '/learn',
- '/feedback' => '/learn',
- '/faq/when-referral-payouts' => '/faq/referrals',
- '/faq/why-care-about-lbry' => '/get',
- '/news/meet-the-lbry-founders' => '/team',
- '/faq/no-auction-options' => '/faq/naming',
- '/join-list' => '/list/subscribe',
- '/publish' => '/youtube'
+ '/lbry-osx-latest.dmg' => '/get',
+ '/lbry-linux-latest.deb' => '/get',
+ '/dl/lbry_setup.sh' => '/get',
+ '/art' => '/what',
+ '/why' => '/learn',
+ '/feedback' => '/learn',
+ '/faq/when-referral-payouts' => '/faq/referrals',
+ '/faq/why-care-about-lbry' => '/get',
+ '/news/meet-the-lbry-founders' => '/team',
+ '/faq/no-auction-options' => '/faq/naming',
+ '/join-list' => '/list/subscribe',
+ '/publish' => '/youtube',
+ '/faq/quarterly-report-july-2016' => '/credit-reports/2016-Q2',
+ '/faq/quarterly-report-3q-2016' => '/credit-reports/2016-Q3',
+ '/faq/Q4-credit-report' => '/credit-reports/2016-Q4',
+ '/faq/Q1-17-CreditReport' => '/credit-reports/2017-Q1',
];
$tempRedirects = [
@@ -155,6 +159,9 @@ class Controller
$router->get([ContentActions::URL_FAQ . '/{slug:c}?', 'faq'], 'ContentActions::executeFaq');
$router->get([ContentActions::URL_BOUNTY . '/{slug:c}?', 'bounty'], 'ContentActions::executeBounty');
$router->get([ContentActions::URL_PRESS . '/{slug:c}', 'press'], 'ContentActions::executePress');
+// $router->get([ContentActions::URL_CREDIT_REPORTS . '/{slug:c}?', 'faq'], 'ContentActions::executeFaq');
+ $router->get(ContentActions::URL_CREDIT_REPORTS, 'ContentActions::executeCreditReports');
+ $router->get([ContentActions::URL_CREDIT_REPORTS . '/{year:c}-q{quarter:c}', ContentActions::URL_CREDIT_REPORTS . '/{year:c}-Q{quarter:c}'], 'ContentActions::executeCreditReport');
$router->any(['/signup{whatever}?', 'signup'], 'DownloadActions::executeSignup');
diff --git a/controller/action/ContentActions.class.php b/controller/action/ContentActions.class.php
index 95d3884f..05cf9bc9 100644
--- a/controller/action/ContentActions.class.php
+++ b/controller/action/ContentActions.class.php
@@ -8,18 +8,21 @@ class ContentActions extends Actions
SLUG_FAQ = 'faq',
SLUG_PRESS = 'press',
SLUG_BOUNTY = 'bounty',
+ SLUG_CREDIT_REPORTS = 'credit-reports',
URL_NEWS = '/' . self::SLUG_NEWS,
URL_FAQ = '/' . self::SLUG_FAQ,
URL_PRESS = '/' . self::SLUG_PRESS,
URL_BOUNTY = '/' . self::SLUG_BOUNTY,
+ URL_CREDIT_REPORTS = '/' . self::SLUG_CREDIT_REPORTS,
CONTENT_DIR = ROOT_DIR . '/content',
VIEW_FOLDER_NEWS = self::CONTENT_DIR . '/' . self::SLUG_NEWS,
VIEW_FOLDER_FAQ = self::CONTENT_DIR . '/' . self::SLUG_FAQ,
VIEW_FOLDER_BOUNTY = self::CONTENT_DIR . '/' . self::SLUG_BOUNTY,
- VIEW_FOLDER_PRESS = self::CONTENT_DIR . '/' . self::SLUG_PRESS;
+ VIEW_FOLDER_PRESS = self::CONTENT_DIR . '/' . self::SLUG_PRESS,
+ VIEW_FOLDER_CREDIT_REPORTS = self::CONTENT_DIR . '/' . self::SLUG_CREDIT_REPORTS;
public static function executeHome(): array
{
@@ -87,7 +90,6 @@ class ContentActions extends Actions
'setup' => 'Installing and Running LBRY',
'wallet' => 'The LBRY Wallet',
'mining' => 'Mining LBC',
- 'policy' => 'Policies',
'developer' => 'Developers',
'differences' => 'What Makes LBRY Different?',
'other' => 'Other Questions',
@@ -125,6 +127,38 @@ class ContentActions extends Actions
return ['content/faq-post', ['post' => $post]];
}
+
+ public static function executeCreditReports(string $year = null, string $month = null): array
+ {
+ Response::enableHttpCache();
+
+ $posts = Post::find(static::VIEW_FOLDER_CREDIT_REPORTS);
+
+ return ['content/credit-reports', [
+ 'posts' => $posts
+ ]];
+ }
+
+ public static function executeCreditReport(string $year = null, string $quarter = null): array
+ {
+
+ Response::enableHttpCache();
+
+ try
+ {
+ $post = Post::load(static::SLUG_CREDIT_REPORTS . '/' . $year . '-Q' . $quarter);
+ }
+ catch (PostNotFoundException $e)
+ {
+ return Controller::redirect('/' . static::SLUG_CREDIT_REPORTS);
+ }
+ $metadata = $post->getMetadata();
+ return ['content/credit-report', [
+ 'post' => $post,
+ 'sheetUrl' => $metadata['sheet']
+ ]];
+ }
+
public static function executePress(string $slug = null): array
{
Response::enableHttpCache();
diff --git a/model/Post.class.php b/model/Post.class.php
index 7f680f0d..f2942941 100644
--- a/model/Post.class.php
+++ b/model/Post.class.php
@@ -126,6 +126,11 @@ class Post
return $this->metadata;
}
+ public function getMetadataItem($key, $default = null)
+ {
+ return $this->metadata[$key] ?? $default;
+ }
+
public function setMetadataItem($key, $value)
{
$this->metadata[$key] = $value;
@@ -373,7 +378,7 @@ class Post
public static function getSlugFromFilename($filename)
{
- return strtolower(preg_replace('#^\d+\-#', '', basename(trim($filename), '.md')));
+ return strtolower(preg_replace('#^\d{1,3}\-#', '', basename(trim($filename), '.md')));
}
public static function collectMetadata(array $posts, $field)
diff --git a/view/template/content/credit-report.php b/view/template/content/credit-report.php
new file mode 100644
index 00000000..ceb288a3
--- /dev/null
+++ b/view/template/content/credit-report.php
@@ -0,0 +1,18 @@
+getTitle()) ?>
+
+
+
+ LBRY issues a quarterly report every 3 months in January, April, July, and October, covering the preceding 3 full months. These reports outline the corresponding transaction history as the current state of LBRY, Inc.'s balance sheet and anticipated future expenditures.
+ Quarterly Credit Reports
+
+
+
+
+
+
+
+
+ Date
+ Report
+ Balance Sheet
+
+
+
+ getSlug()) ?>
+ Report
+ Sheet
+