Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9c4eb3ce4 | ||
|
|
8bbe6e63ee | ||
|
|
67579fa537 | ||
|
|
46ccd5ffaa | ||
|
|
dd16f21da3 |
No files matched your search
+3
-2
@@ -5,11 +5,12 @@
|
||||
"ext-curl": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-pdo_mysql": "*",
|
||||
"leafo/scssphp": "0.7.6",
|
||||
"erusev/parsedown": "^1.6",
|
||||
"erusev/parsedown-extra": "^0.7.1",
|
||||
"pelago/emogrifier": "^2.0",
|
||||
"mustangostang/spyc": "^0.6.2",
|
||||
"phpunit/phpunit": "^6.5"
|
||||
"mustangostang/spyc": "^0.6.2"
|
||||
}
|
||||
}
|
||||
Generated
+14
-1534
File diff suppressed because it is too large.
Load diff
@@ -135,6 +135,8 @@ class Controller
|
||||
$router->get('/verify/{token}', 'AcquisitionActions::executeVerify');
|
||||
$router->get('/verify', 'AcquisitionActions::executeAutoVerify');
|
||||
|
||||
$router->get('/follow/{claim}', 'AcquisitionActions::executeFollowCampaign');
|
||||
|
||||
|
||||
$router->get('/news/category/{category}', 'ContentActions::executePostCategoryFilter');
|
||||
|
||||
|
||||
@@ -2,6 +2,24 @@
|
||||
|
||||
class AcquisitionActions extends Actions
|
||||
{
|
||||
public static function executeFollowCampaign(string $claimName)
|
||||
{
|
||||
$claim = ChainQuery::findChannelClaim($claimName);
|
||||
|
||||
if (!$claim || !$claim['source_url']) {
|
||||
Controller::redirect('/');
|
||||
}
|
||||
|
||||
$title = $claim['title'] ?: $claim['name'];
|
||||
$coverUrl = $claim['source_url'];
|
||||
return ['acquisition/follow_campaign', [
|
||||
'claim' => $claim,
|
||||
'claimCount' => ChainQuery::countClaimsInChannel($claim['claim_id']),
|
||||
'title' => $title,
|
||||
'coverUrl' => $coverUrl,
|
||||
]];
|
||||
}
|
||||
|
||||
public static function executeYouTube(string $version = '')
|
||||
{
|
||||
$errorMessage = Request::getParam('error_message', '');
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
$config = [];
|
||||
// $config[Config::CHAINQUERY_DSN] = '';
|
||||
// $config[Config::CHAINQUERY_USERNAME] = '';
|
||||
// $config[Config::CHAINQUERY_PASSWORD] = '';
|
||||
// $config[Config::GITHUB_KEY] = '';
|
||||
// $config[Config::GITHUB_APP_CLIENT_ID] = ''; //optional, increases API rate limit
|
||||
// $config[Config::GITHUB_APP_CLIENT_SECRET] = '';
|
||||
|
||||
@@ -112,3 +112,6 @@
|
||||
/press-kit.zip: /press-kit
|
||||
/news/tag/events: /roadmap
|
||||
# /publish: /youtube
|
||||
|
||||
# Images
|
||||
/img/lbry-ui.png: /img/og-image.png
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ChainQuery
|
||||
{
|
||||
protected static $pdo = null;
|
||||
|
||||
public static function getInstance()
|
||||
{
|
||||
if (!static::$pdo) {
|
||||
static::$pdo = new PDO(Config::get(Config::CHAINQUERY_DSN),
|
||||
Config::get(Config::CHAINQUERY_USERNAME), Config::get(Config::CHAINQUERY_PASSWORD));
|
||||
}
|
||||
return static::$pdo;
|
||||
}
|
||||
|
||||
public static function findChannelClaim($claimName)
|
||||
{
|
||||
$claimName = '@' . trim($claimName, '@');
|
||||
$stmt = static::getInstance()->prepare("SELECT * FROM claim c WHERE c.name = ? AND c.bid_state = ?");
|
||||
$stmt->execute([$claimName, "controlling"]);
|
||||
return $stmt->fetch();
|
||||
}
|
||||
|
||||
public static function countClaimsInChannel($claimId)
|
||||
{
|
||||
$stmt = static::getInstance()->prepare("SELECT COUNT(*) FROM claim c WHERE c.publisher_id = ?");
|
||||
$stmt->execute([$claimId]);
|
||||
$result = $stmt->fetch();
|
||||
return $result[0] ?? 0;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,9 @@ class Config
|
||||
|
||||
//Constant to help with managing strings
|
||||
const IS_PROD = "is_prod";
|
||||
const CHAINQUERY_DSN = 'chainquery_dsn';
|
||||
const CHAINQUERY_USERNAME = 'chainquery_username';
|
||||
const CHAINQUERY_PASSWORD = 'chainquery_password';
|
||||
const GITHUB_KEY = "github_key";
|
||||
const GITHUB_APP_CLIENT_ID = "github_app_client_id";
|
||||
const GITHUB_APP_CLIENT_SECRET = "github_app_client_secret";
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php Response::setMetaDescription('Watch ' . $title . ' on a platform that shares your values.') ?>
|
||||
<?php Response::setMetaTitle($title . ' on LBRY') ?>
|
||||
<pre>
|
||||
<?php print_r($claim) ?>
|
||||
</pre>
|
||||
<main class="ancillary">
|
||||
<section class="hero hero--half-height" style="background-image: url(<?php echo $coverUrl ?>)">
|
||||
<div class="inner-wrap inner-wrap--center-hero">
|
||||
<h1>Watch <?php echo $title ?></h1>
|
||||
<h3>On a platform that shares your values.</h3>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="inner-wrap">
|
||||
<div class="inline-image-and-text">
|
||||
<img
|
||||
alt="cctv camera"
|
||||
class="inline-image"
|
||||
src="/img/icon--cctv.svg"
|
||||
/>
|
||||
|
||||
<p>Predatory platforms like Facebook and YouTube abuse users, censor creators, enforce rules arbitrarily, and spy on everything you do.</p>
|
||||
</div>
|
||||
<div class="inline-image-and-text">
|
||||
<p>LBRY is a user-controlled, open-source platform that stands for user freedom and personal choice. It has <em><?php echo $claimCount ?> videos from <?php echo $claim['name'] ?></em>.</p>
|
||||
<img
|
||||
alt="smile icon"
|
||||
class="inline-image"
|
||||
src="/img/icon--smile.svg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="inner-wrap">
|
||||
<h3>Step 1: Download LBRY</h3>
|
||||
<p>LBRY is an open-source application available on Windows, macOS, Linux, and Android, with iOS coming soon.</p>
|
||||
<br/>
|
||||
<div class="align-text--center">
|
||||
<?php echo View::render('download/_downloadButton', ['buttonStyle' => 'primary'])?>
|
||||
<a href="/get?showall=1" class="button--link">show all platforms</a>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="inner-wrap">
|
||||
<h3>Step 2: Search and Follow <?php echo $claim['name'] ?></h3>
|
||||
<p>Type <?php echo $claim['name'] ?> in the search bar and then click Follow.</p>
|
||||
<div class="align-text--center" style="margin-top: 1rem; margin-bottom: 1rem;">
|
||||
<img src="https://via.placeholder.com/600" alt="How to follow <?php echo $claim['name'] ?> on LBRY" />
|
||||
</div>
|
||||
<p>If you provide your email address, you'll be notified about every new video.</p>
|
||||
</div>
|
||||
<br/>
|
||||
</section>
|
||||
<section>
|
||||
<div class="inner-wrap">
|
||||
<h3>Step 3 (Optional): Support <?php echo $claim['name'] ?></h3>
|
||||
<p>Use the Tip button to support <?php echo $claim['name'] ?> and help others discover his content.</p>
|
||||
<p>If you verify your account, you'll receive free credits that you can send to <?php echo $claim['name'] ?> or other creators.</p>
|
||||
<small><em>Having trouble?</em> Read <a href="/faq/rewards">the rewards FAQ</a> for help.</small>
|
||||
<div class="align-text--center" style="margin-top: 1rem; margin-bottom: 1rem;">
|
||||
<img src="https://via.placeholder.com/600" alt="How to support <?php echo $claim['name'] ?> on LBRY" />
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
</section>
|
||||
<section>
|
||||
<div class="inner-wrap">
|
||||
<h3>Step 4: Enjoy Peace of Mind</h3>
|
||||
<p>When you watch <?php echo $title ?> on LBRY, you're watching via a platform that is open-source, user-controlled, and censorship-resistant.</p>
|
||||
<p>Unlike other platforms, it is <em>literally impossible</em> for LBRY to put it's thumb on the scales.</p>
|
||||
<p>So what are you waiting for? Try LBRY today!</p>
|
||||
<br/>
|
||||
<div class="align-text--center">
|
||||
<?php echo View::render('download/_downloadButton', ['buttonStyle' => 'primary'])?>
|
||||
<a href="/get?showall=1" class="button--link">show all platforms</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div>
|
||||
<small>Not enough details for you? Read the <a href="/what">manifesto</a> or the <a href="//lbry.tech">docs</a>.</small>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@@ -52,7 +52,7 @@
|
||||
if ($error_message): echo "<p class='error-block'>" . "The following error occurred: ". $error_message . " For support please send an email to <a href='mailto:hello@lbry.com' title='Email LBRY for help'>hello@lbry.com</a>." . "</p>";
|
||||
endif;?>
|
||||
|
||||
<p hidden id="lbry_error" class="error-block">LBRY channel name is either not valid (only letters, numbers and - allowed, no spaces) or your input is blank</p>
|
||||
<p hidden id="lbry_error" class="error-block">YouTube channel name is either not valid (only letters, numbers and - allowed, no spaces) or your input is blank</p>
|
||||
|
||||
<h2>Connect with your fans while earning money and rewards</h2>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php Response::setMetaDescription(__('description.no-os')) ?>
|
||||
<?php Response::setMetaTitle(__('global.get')) ?>
|
||||
<?php Response::addMetaImage(Request::getHostAndProto() . '/img/lbry-ui.png') ?>
|
||||
<?php Response::addMetaImage(Request::getHostAndProto() . '/img/og-image.png') ?>
|
||||
|
||||
<main class="ancillary">
|
||||
<section class="hero hero--half-height">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php Response::setMetaDescription(__('description.get')) ?>
|
||||
<?php Response::addMetaImage(Request::getHostAndProto() . '/img/lbry-ui.png') ?>
|
||||
<?php Response::addMetaImage(Request::getHostAndProto() . '/img/og-image.png') ?>
|
||||
<?php NavActions::setNavUri('/get') ?>
|
||||
|
||||
<main class="ancillary">
|
||||
@@ -47,7 +47,7 @@
|
||||
loop
|
||||
poster="https://spee.ch/f/2019-08-lbry-interface-poster.jpg"
|
||||
playsinline
|
||||
style="display: block; margin-right: auto; margin-left: auto; max-width: 500px; "
|
||||
style="display: block; margin-right: auto; margin-left: auto; max-width: 700px; "
|
||||
>
|
||||
<source src="https://spee.ch/a/2019-08-lbry-interface-webm.webm" type="video/webm"/>
|
||||
<source src="https://spee.ch/4/2019-08-lbry-interface.mp4" type="video/mp4"/>
|
||||
|
||||
@@ -47,10 +47,13 @@
|
||||
<meta name="twitter:card" content="app"/>
|
||||
<meta name="twitter:site" content="@LBRYio"/>
|
||||
<meta name="twitter:description" content="Meet LBRY, a content sharing and publishing platform that is decentralized and owned by its users."/>
|
||||
<meta name="twitter:app:country" content="US"/>
|
||||
<meta name="twitter:app:name:googleplay" content="LBRY beta"/>
|
||||
<meta name="twitter:app:id:googleplay" content="io.lbry.browser"/>
|
||||
<meta name="twitter:app:url:googleplay" content="https://play.google.com/store/apps/details?id=io.lbry.browser"/>
|
||||
|
||||
<?php if ($_SERVER['REQUEST_URI'] === '/' || $_SERVER['REQUEST_URI'] === '/android' || $_SERVER['REQUEST_URI'] === '/get'): ?>
|
||||
<meta name="twitter:app:country" content="US"/>
|
||||
<meta name="twitter:app:name:googleplay" content="LBRY beta"/>
|
||||
<meta name="twitter:app:id:googleplay" content="io.lbry.browser"/>
|
||||
<meta name="twitter:app:url:googleplay" content="https://play.google.com/store/apps/details?id=io.lbry.browser"/>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Twitter Card data -->
|
||||
<meta name="twitter:site" content="@lbryio">
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 656 KiB After Width: | Height: | Size: 175 KiB |
@@ -110,7 +110,7 @@
|
||||
}
|
||||
|
||||
position: relative;
|
||||
width: 450px;
|
||||
width: 520px;
|
||||
}
|
||||
|
||||
img {
|
||||
|
||||
Reference in new issue
Block a user