Skip to content

shayarnett/radiant-spreedly-extension

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= Spreedly Extension for Radiant

Adds support for paid subscriptions through Spreedly.

== Installation

From the target Radiant project:
  
  git clone git://github.com/pelargir/radiant-spreedly-extension.git vendor/extensions/spreedly
  
After installing the plugin run the migrations:

  rake radiant:extensions:spreedly:migrate

Start your project, login as an admin, and visit the Extensions page. The Spreedly
extension should be listed there. You should also see two new tabs near the top
of the page, "Spreedly" and "Subscribers."

Subscriber, login, and registration pages are added to your Radiant project during
installation. Click on the "Pages" tab to view these. They can be modified as
needed so long as the Radius tags and the slug are not disturbed.

== Configuring Spreedly

If you haven't registered with Spreedly, go ahead and sign up for an account. Once
you've logged in, choose either the testing or production environment based on whether
you want to test your subscription service or actually start charging people.

Under Configuration, choose or create the subscription plan you want to use. Change
its return URL to:

  http://domain.com/subscriber

Where domain.com is your web site URL. Also under Configuration, go into Site URLs
and set the Subscribers Changed Notification URL to:

  http://domain.com/subscriber_actions/changed

== Configuring the Spreedly Extension

Spreedly must also be configured on your local site. Login as an admin and click the
"Spreedly" tab, then click edit. Enter the your Spreedly account name and the ID of
the subscription plan you want to use. Mode can be set to "Test" when you're
testing your site with Spreedly, but you should change it to "Production" and clear
the subscribers out of your database before you actually start charging users for
real subscriptions.

== Managing Subscribers

Login as an admin and click on the Subscribers tab to view a list of subscribers
who have registered on your site. You can edit existing subscribers to change their
password or email address from this page. New subscribers can also be created
if you'd prefer to bypass registration through the site.

== Subscription Plans

The extension only supports using one subscription plan at a time. Select the
subscription plan you would like to use from the "Spreedly" tab.

== Protecting Pages

To make a page accessible to subscribers only, set its page type to "Paid Subscribers
Only." The next time a user visits the page, they will be prompted to login or register.
They won't be able to access the protected page until they have registered and paid
for a subscription through Spreedly.

Using a page type of "Subscribers Only" will only allow registered subscribers to
access the page, regardless of whether they have paid through Spreedly or not.

== Radius Tags

<r:subscriber:username />
Renders the username of the current subscriber.

<r:subscriber:logout />
Renders a logout link for the current subscriber.

<r:subscriber:subscription />
Renders the status of the current subscriber's Spreedly subscription.

<r:subscriber:refresh />
Renders a link to refresh the subscriber's account status from Spreedly. Override
the link text using the title attribute (e.g. <r:subscriber:refresh title="Refresh" />)

<r:subscriber:login:form />
Renders a login form for subscribers.

<r:subscriber:register:link />
Renders a link to register a new subscriber. Override the link text using the title
attribute (e.g. <r:subscriber:register:link title="Register" />)

<r:subscriber:register:form />
Renders a registration form for new subscribers.

<r:flash:notices />
Displays any pertinent user notices. For example, notification that the login failed
or that the requested page can only be accessed by paid subscribers.

== Future Development

See the TODO file.

== Resources

Repository: http://github.com/pelargir/radiant-spreedly-extension/
Blog: http://matthewbass.com
Author: Matthew Bass

Extraction work sponsored by Terralien

About

Adds support for paid subscriptions through Spreedly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 84.3%
  • HTML 14.3%
  • JavaScript 1.4%