This commit is contained in:
Joey Kimsey
2024-12-20 14:07:45 -05:00
parent 528f003558
commit d428950be6
19 changed files with 109 additions and 635 deletions

View File

@ -61,7 +61,7 @@ class Member extends Controller {
Views::view( 'members.members' );
}
public function managepayment( $id = null ) {
public function managepayment() {
$this->confirmAuth();
$customer = self::$customers->findByUserID( App::$activeUser->ID );
if ( empty( $customer ) ) {
@ -85,7 +85,7 @@ class Member extends Controller {
}
public function cancelconfirm( $id = null ) {
$this->confirmAuth();
$this->confirmAuth( $id );
$memberships = new Memberships;
$result = $memberships->cancel( $id );
if ( ! empty( $result ) ) {
@ -98,7 +98,7 @@ class Member extends Controller {
}
public function pauseconfirm( $id = null ) {
$this->confirmAuth();
$this->confirmAuth( $id );
$memberships = new Memberships;
$result = $memberships->cancel( $id );
if ( ! empty( $result ) ) {
@ -111,26 +111,26 @@ class Member extends Controller {
}
public function pause( $id = null ) {
$this->confirmAuth();
$this->confirmAuth( $id );
self::$title = 'pause Membership';
Components::set( 'pauseid', $id );
Views::view( 'members.pause' );
}
public function resume( $id = null ) {
$this->confirmAuth();
$this->confirmAuth( $id );
self::$title = 'resume Membership';
Views::view( 'members.resume' );
}
public function cancel( $id = null ) {
$this->confirmAuth();
$this->confirmAuth( $id );
self::$title = 'Cancel Membership';
Components::set( 'cancelid', $id );
Views::view( 'members.cancel' );
}
public function manage( $id = null ) {
public function manage() {
if ( ! App::$isLoggedIn ) {
Session::flash( 'error', 'You do not have permission to access this page.' );
return Redirect::home();
@ -145,11 +145,12 @@ class Member extends Controller {
Views::view( 'members.manage', $userMemberships );
}
public function upgrade( $id = null ) {
public function upgrade() {
if ( ! App::$isLoggedIn ) {
Session::flash( 'error', 'You do not have permission to access this page.' );
return Redirect::home();
}
// need to check if the plan CAN be upgraded
self::$title = 'Upgrade Membership';
Views::view( 'members.upgrade' );
}
@ -165,7 +166,7 @@ class Member extends Controller {
return Redirect::to( 'home/index' );
}
self::$title = 'Join {SIITENAME}!';
self::$title = 'Join {SITENAME}!';
$stripePrice = $this->findPrice( $plan );
$product = self::$products->findByPriceID( $stripePrice );

View File

@ -61,11 +61,11 @@ class Members extends Plugin {
],
];
public $main_links = [
// [
// 'text' => 'Members',
// 'url' => '{ROOT_URL}member/index',
// 'filter' => 'member',
// ],
[
'text' => 'My Membership',
'url' => '{ROOT_URL}member/index',
'filter' => 'member',
],
[
'text' => 'Subscribe',
'url' => '{ROOT_URL}member/join',

View File

@ -1,3 +1,4 @@
<!-- Compare plans -->
<div class="table-responsive pricing-container container pb-4" id="compare">
<h1 class="display-6 text-center my-4">Compare plans</h1>
@ -6,60 +7,64 @@
<tr>
<th style="width: 34%;"></th>
<th style="width: 22%;">Free</th>
<th style="width: 22%;">Pro</th>
<th style="width: 22%;">Enterprise</th>
<th style="width: 22%;">Monthly</th>
<th style="width: 22%;">Yearly</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" class="text-start">Add and Manage Bookmarks</th>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
</tr>
<tr>
<th scope="row" class="text-start">Extensions for all major browsers</th>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="row" class="text-start">Access from any device</th>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
</tr>
<tr>
<th scope="row" class="text-start">Share bookmarks abd folders</th>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
</tr>
<tr>
<th scope="row" class="text-start">Import/Export Features</th>
<td></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
</tr>
<tr>
<th scope="row" class="text-start">Customizable Dashboards / Pages</th>
<td></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
</tr>
<tr>
<th scope="row" class="text-start">Request/Influence Development</th>
<td></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
</tr>
<tr>
<th scope="row" class="text-start">Early Access</th>
<td></td>
<td><i class="fa fa-fw fa-check"></i></td>
<td><i class="fa-solid fa-check"></i></td>
<td><i class="fa fa-fw fa-check atb-green"></i></td>
<td><i class="fa-solid fa-check atb-green"></i></td>
</tr>
<tr>
<th scope="row" class="text-start">Cheaper</th>
<td></td>
<td></td>
<td><i class="fa-solid fa-check"></i></td>
<td><i class="fa-solid fa-check atb-green"></i></td>
</tr>
</tbody>
</table>
@ -81,8 +86,9 @@
<li>Add / Manage your bookmarks</li>
<li>Extensions for all major browsers</li>
<li>Access from any device</li>
<li>Share access with anyone</li>
</ul>
<a href="/register" class="mt-auto w-100 btn btn-lg btn-outline-primary">
<a href="/register" class="mt-auto w-100 btn btn-lg atb-green-outline">
Sign-Up for Free
</a>
</div>
@ -102,15 +108,15 @@
<li>Direct control of Feature Development</li>
<li>Early Access to new features</li>
</ul>
<a href="/member/checkout/monthly" class="mt-auto w-100 btn btn-lg btn-primary">
<a href="/member/signup/monthly" class="mt-auto w-100 btn btn-lg atb-green-bg">
Get started
</a>
</div>
</div>
</div>
<div class="col">
<div class="card mb-4 rounded-3 shadow-sm border-primary h-100 context-main-bg">
<div class="card-header py-3 text-bg-primary border-primary">
<div class="card mb-4 rounded-3 shadow-sm atb-green-outline-only h-100 context-main-bg">
<div class="card-header py-3 atb-green-bg">
<h4 class="my-0 fw-normal">Yearly</h4>
</div>
<div class="card-body d-flex flex-column">
@ -118,7 +124,7 @@
<ul class="list-unstyled mt-3 mb-4">
<li>Its cheaper if you like the product</li>
</ul>
<a href="/member/checkout/yearly" class="mt-auto w-100 btn btn-lg btn-primary">
<a href="/member/signup/yearly" class="mt-auto w-100 btn btn-lg atb-green-bg">
Get started
</a>
</div>

View File

@ -1,38 +0,0 @@
<section id="features" class="container">
<h2 class="text-center">Why Choose Us?</h2>
<div class="row">
<div class="col-sm-6">
<h3>Free Version</h3>
<p>Basic storage for all your bookmarks, forever free.</p>
</div>
<div class="col-sm-6">
<h3>Pro Features</h3>
<p>Unlock powerful import/export and advanced organization.</p>
</div>
</div>
</section>
<section id="pricing" class="container">
<h2 class="text-center">Affordable Plans</h2>
<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-header bg-success">{name} Monthly Plan</div>
<div class="card-body">
<p>{prettyPriceMonthly}/month</p>
<p>All pro features unlocked</p>
<a href="{ROOT_URL}member/checkout/monthly" class="btn btn-success btn-block">Get Started</a>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="card-header bg-info">{name} Yearly Plan</div>
<div class="card-body">
<p>{prettyPriceYearly}/year</p>
<p>Save {prettySavings} annually!</p>
<a href="{ROOT_URL}member/checkout/yearly" class="btn btn-info btn-block">Sign Up</a>
</div>
</div>
</div>
</div>
</section>

View File

@ -1,6 +1,17 @@
<h1>Members' Area</h1>
<div class="jumbotron">
<h1>Welcome!</h1>
<p>This is the members section. You can give some groups permission to access these areas. the menu is hidden for normal users and if they get a link to a member's area, the authentication system will stop them from accessing any content protected this way.</p>
<p>You can even use this feature in-line with your views, hiding certain components from non-members</p>
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center atb-green mb-4">Membership Benefits</h2>
<p class="lead">
First, let me say thank you for choosing to become a member! There are several great benefits exclusively for members.
</p>
<p>
In addition to extra features for bookmark management like <a class="text-decoration-none atb-green" href="{ROOT_URL}bookmarks/dashboards">dashboards</a> and <a class="text-decoration-none atb-green" href="{ROOT_URL}bookmarks/import">import</a>/<a class="text-decoration-none atb-green" href="{ROOT_URL}bookmarks/export">export</a>, you gain access to influence development. <a class="text-decoration-none atb-green" href="{ROOT_URL}suggestions">Suggestions</a> gives users a direct way to make suggestions to me personally. By default, suggestions are not public, but I can comment on them to let you know what I think.
All respectful and reasonable suggestions go up for the entire community to see and comment on. There iis going to be a loyalty points system in the future to allow you to accrue points and use the points to vote for suggestions and features they like. But that's for another time.
</p>
<p class="text-muted">
Right now, this entire system was built and managed by myself. I have used my own version of this for years, but translating it to a publicly available product is not a 1-to-1 job. There may be bugs or issues encountered while you use the product. I can't guarantee a fix for every need in every case immediately, but I do actively keep track of bugs and work hard to ensure everyone has a great experience using the app.
</p>
<div class="text-center mt-4 pb-4">
{loggedin}<a href="/bugreport" class="btn btn-primary btn-lg px-5 atb-green-bg">Report a Bug</a>{/loggedin}
<a href="/contact" class="btn btn-outline-secondary btn-lg px-5 ms-3 atb-green-outline">Contact Us</a>
</div>
</div>