User Tools

Site Tools


phpmotion_membership_mod_pro

Usage Manual

Table of Content

  1. Overview
  2. Getting Started
  3. Basic Functions Overview
  4. In depth Functions Explanation
  5. Pro Functions Overview
  6. Other Mod Functions
  7. Email Templates
  8. Usage Tips
  9. Glossary
  10. Hooks

1- Overview

With this mod, you will be in the position to convert your free phpmotion site to a paid-only/membership-only site. Which means you can expect a steady income from your viewer/members of your website. No more having to rely on banner advertisement.

The PRO version introduces some business-like options. New functions includes; members affiliate system, PPV preview mode, automatic membership billing, member login restriction.


2- Getting Started

Installation

!BACKUP BACKUP BACKUP!

Upload all files in binary mode EXCEPT for following listed files and the template .htm files.

V2 installation: login.php play.php confirm.php convertor.php register.php seemore.php sub_tbs_class_php5 sub_template.php sub_template_upload.php uploader.php

V3 installation: join.php confirm.php convertor.php login.php memberprofile.php memberprofile_ajax.php sub_template.php sub_template_upload.php uploader.php

To upload, simply drag and drop the files in your phpmotion directory.

Once uploaded run the sub/setup.php file. Don't FORGET TO BACKUP YOUR DATABASE FIRST!

The setup wizard will install the new database tables automatically for you. The wizard will then prompt you for the default package and your license key.

Once the setup is done, delete the setup.php and the setup/ directory.

For V2 only:

Now that the install is complete, it is time to modify the template files. Edit the sub_tempate.php and sub_template_upload.php. The chances are that you are not going to need to modify it, unless you have a special template.

For both v2 and v3:

You may edit the text in those templates files such as overusage, suspended, upgrade and disallowed pages in the templates/ directory or themes/default/templates/ directory. The template for the membership mod start with a filename prefix inner_sub_*.htm

Once you are done editing the sub_* template files. Just upload them in the phpmotion's templates directory.

Next create a cron to load the daily_update_pro.php

0 0 * * * php -q “/home/youraccount/public_html/sub/daily_update_pro.php” > /dev/null 2>&1

IMPORTANT This cron will update your member's usage stats and generate invoices as they become past due

OPTIONAL

If you wish to let your members to be able to request their video to be either PPV or PPD. Replace the seemore.php and templates/inner_see_more.htm Otherwise, you don't need to replace those files.

For V3, place both inner_member_profile.htm and inner_member_profile_ajax.htm in the templates folder. You will also need to replace the memberprofile.php and memberprofile_ajax.php in the root folder. There are also two new icons in the themes/images/icons folder for the PPV/PPD request button.

Pro Version Setup

Once you have setup the STD files, now point your browser to http://yourphpmotioninstall/sub/upgrade/STDtoPRO.php

This file will get your database ready to the PRO version.

Go through this wizard again, it will prompt you for the following things.

-Your PRO license key -if you do not have a previous license from the STD version. Then just enter the same license again as you did in the previous wizard.

-Setup the prices for the default package. You will have to log into the mod's admin panel to set that up. Log onto the panel by (open a new browser) going to http://yourphpmotioninstall/sub/ → PRO Edition tab - > Membership Management. Then just click on the default package that you want to setup the prices, default payment term for. Once you have done that, go back to the wizard and continue with the install. If you don't want billing to be setup for you current members, then you don't have to continue.

Upgrade Instructions From STD

If you are upgrading from version 1.1STD or 1.2STD. Simply replace all the mod's files, then run the sub/upgrade/11to12.php then 12to15.php to upgrade the database. There is a new template file that will be called in this version, place the inner_sub_X.htm into your templates/ folder.

If you have a custom template, then make a copy of your current inner_play.htm, then name it to inner_sub_play.htm and also place that in the templates/ folder. Now open the inner_sub_play.htm, locate the <a href tag for the download links.(There should be two download links you have to edit)

Replace the <a href=….

with

<a href=“[var.baseurl]/sub_download_check.php?code=[var.random]&uid=[var.uid]&vid=[var.video_play]&cid=[var.c_id]”>

Finally, copy the new file sub_download_check.php into your base directory.

«Script Update Sqeuence Path»

Current version = 1.5STD - > STDtoPRO.php

Current version = 1.7PRO - > 170to173.php → 173to175.php

If you are doing a fresh install, then you only need to run STDtoPRO.php. See below for details.

Finishing the Install

Once you have gotten your database updated, then run sub/upgrade/STDtoPRO.php

This file will get your database ready to the PRO version. Go through this wizard again, it will prompt you for the following things.

-Your PRO license key -Enter the PRO license key that you have received

-Setup the prices for the default package. - You will have to log into the mod's admin panel to set that up. Log onto the panel by (open a new browser) going to http://yourphpmotioninstall/sub/ → PRO Edition tab - > Membership Management. Then just click on the default package that you want to setup the prices, default payment term for. Once you have done that, go back to the wizard and continue with the install. If you don't want billing to be setup for you current members, then you don't have to continue.

Finally, update your cronjob to run daily_update_pro.php instead of daily_update.php

The upgrade is now complete.

The login is the same as your phpmotion siteadmin login.

Assuming you have installed the mod properly, you should now be able to log into the mod's interface. Upon logging in, you will see 8 different tabs.


3- Basic Functions Overview

This mod contains many useful functions which will enable you to monitor and manage your video site easily and effectively. Lets take a look at a few of these functions.

Membership Management

  1. Create different membership levels (free/premium/extra etc)
  2. Restrict only specified membership to view/access certain channel
  3. Allocate different viewing/download/upload (token) limits to each membership level.

Token Management

  1. Allocate tokens for each membership level
  2. Assign the total tokens needed to view/download/upload media to a video channel(category)

Pay-Pay-View/Pay-Per-Download Management

  1. User can request their video to designate as a PPV/PPD (Optional)
  2. Admin can approve/disapprove request
  3. Users are required to order the PPV/PPD or have a valid coupon before the user is able to view or download the video that is set as a PPV/PPD
  4. Admin can create viewing coupon for members
  5. Redeemable coupon system

PPV/PPD Billing Management

  1. Invoices are generated as a PPV/PPD is sold

4- In depth Functions Explanation

Lets go over each Tab's function within the mod interface in this section.

Manage Packages

This tab will allow you to manage the different membership levels available to your website.

Edit

  1. Configure each membership level's token allocation

Delete

  1. Delete a membership level

Make Default

  1. Make a specific membership level as the default membership for new members. So whenever a new member joins your website, those new members will automatically assigned to that membership level

Manage Members

Mass Functions

Perform account related functions to a batch of members at the same time. To use the Mass Functions, make sure you have checked the checkbox in front of each member you want to perform the function on. Then select the function you want to perform on those members from the dropdown list at the bottom. Once you have selected the function you want, click on the Mass Function button.

  1. Flush Daily Viewing Limit - Clear all checked user's daily viewing
  2. Flush Daily Upload Limit - Clear all checked user's upload viewing
  3. Flush Daily Downloading Limit - Clear all checked user's download viewing
  4. Change Package - Change the checked user's assigned package
  5. Change Limit Manually - Override the checked user's allocated limit set by the membership level
  6. Suspend Account - Suspend the account
  7. Unsuspend Account - Unsuspend the account

Individual Functions

Perform membership related functions individually.

  1. To change the member's assigned membership level, simply select the desired membership from the dropdown list then click on the Edit button.
  2. To change the member's allocated limit that is not defined by the membership level. Fill in the limit you want to modify, once you are done. Check the Package Override checkbox to tell the system to override the member's membership level limit.

Manage Channels

Change each channel/category's preferences by click on the Edit button.

  1. Disallowed Membership - Deny access to all users from a specific membership to this channel. Hold CTRL and click for multiple memberships
  2. Disallowed Upload Membership - Deny upload access to all users from a specific membership to this channel. Hold CTRL and click for multiple memberships
  3. Viewing/Upload/Download Fee - Set the token rate to subtract from the member's allocated limit each time a video is viewed/uploaded/downloaded from this channel

Manage PPx

Request

  1. Approve/Disapprove any PPV/PPD request by the member of your site

Active Listings

  1. View all approved PPV/PPD
  2. You will have two available actions within this function. Mass action via the drop down list and the individual action via the Edit link
Mass Functions (Process button and drop down)
  1. Delist From PPV - If you delist a PPV, the member will be able to request that video to be a PPV again. Make sure you check the checkbox for any video you want to delist
  2. Update Token Cost - Update the price for the video. The final price of the video is calculated by the number in this field multiplied by PPV/PPD token rate set in the Config area.

Be careful! you don't need to check the checkbox to update the token cost. So only change the cost for the video you want.

  1. Token Cost -The final price of the video is calculated by the Token Cost x the PPV/PPD token rate set in the Config area.
  2. PPV/PPD Type - There are four different types of PPV/PPD you can select for a PPV/PPD video.
  • Unlimited - The member can view the video as many times they want once the PPV/PPD has been paid
  • Limited - The member can only view the video X number of time. The X value is specified by the “View Limit”
  • Timed - The member can only view the video within a certain time frame. The time frame is from the time the PPV/PPD has been PAID + X days (+ (x * 24 hours)). The X days is specified by the “Timed Day Limit”
  • View Once - The member is only view once.

Denied Listings

  1. Ordered List ItemView all disapproved PPV/PPD request. Once a video has been disapproved, the member can no longer request the video to be a PPV/PPD again.

Management

  1. Add a video to PPV - Manually add a video to the PPV listing. You will require the video's indexer or ID. To find the video ID, you can view the URL for the video.

For v2. Look at the URL of the browser when you play a video. Eg: play.php?vid=2389. The 2389 is the video ID

For v3. The ID is identified by the number after the /videos/. Eg: videos/28/testabc The 28 is the video ID

  1. Billing
  • Search By Paypal Email - Search for invoice(s) that came from a specific email address. Paid invoices are tracked by the paypal address, not the member's address on file.
  • Search By date - Search for invoice(s) by dates
  • Search By Member - Search for invoice(s) ordered by a specific member
  • Search PPV/PPD - Search for invoice(s) that ordered a specific PPV/PPD
  • Search By Coupon - Search for the invoice that is tied to a coupon
  • List All Invoices - List all paid and unpaid invoices
  • List All Coupons - List all coupons
  • Add a Coupon - Generate a viewing coupon
  • Clear All Unpaid PPV - Remove all PPV invoices that are unpaid
  • Clear All Unpaid PPD - Remove all PPD invoices that are unpaid

Once you got a invoice that you want to view, simply click on the Full Details to see the details for the invoice. Details such as invoice ID, member's name, paid date, number of times the video was view under that invoice.

Config

  • Your License - Your License
  • Admin Contact - Email you wish to have the statistic to be send to
  • Paypal Email Address - Your paypal address you want to use for payments
  • Pagination Configuration - Set the pagination in the manage tab listings inside the mod's interface
  • Viewing - Turning the limit checking on/off
  • Uploading - Turning the limit checking on/off
  • Downloading - Turning the limit checking on/off
  • PPV - Turning PPV on/off
  • PPV Token Rate - The rate at which individual PPVs are multipled at
  • PPD - Turning PPD on/off
  • PPD Token Rate - The rate at which individual PPDs are multipled at

5- Pro Functions Overview

Under the PRO Edition tab you should see the following available options.

  1. Membership Management
  2. Member Service
  3. Video Management
  4. Billing Management
  5. Misc.

Membership Management

  1. Manage Memberships - This is the place for the advanced membership level settings.
  • Base Weekly Fee
    1. The cost of the membership for a weekly basis. If the monthly fee for a membership is $10. Then the Base Weekly Fee would be $2.5.
  • Payment Terms Discount
    1. This option let you set the amount of discount is available when a choosing a payment term. If you want to have 10% off, then enter 90 in the field.
  • Available Payment Term
    1. This option let you set which payment term is available for this membership level
  • Affiliate Percentage
    1. The amount the affiliate will earn for each paid invoice under this membership level
  • Single Payment
    1. To display the payment button
  • Allow Duplicate IP Login:
    1. This option will define for members under this membership whether they will be able to login to multiple account with a logged IP to another account. For example, if member's IP is logged for account A then he tries to log in as account B. Access will be denied.
  • Allow Upgrades
    1. This list define which membership level is available for upgrade for member's under this membership level. For example. The membership you are editing is Default, and you have two other membership setup and they are Upgrade 1 and Upgrade 2. So you set Upgrade 1 to be able to upgrade for the Default membership. That means for every member that is under the Default membership, the member will only be able to upgrade to Upgrade 1.
  • Default Payment term
    1. This is the option that defines what payment term to use when a new sign up have join the site. This option is only used when the membership is the site's default membership

Member Service

This is an advanced version of the “Manage Members” tab. You should see the following new columns in the Members table.

  • Duplicate IP - To allow the account to login if the visiting IP has been logged with another account
  • Membership Level - The membership level the user name is currently under
  • Account Status - Phpmotion's account status (pending/active/suspended)
  • Membership Status - Membership level's status, if active then member will get bill for the membership accordingly

In the Details View page, you will see the detailed information regarding the member's account status.

  • Member Invoices - This will list the selected member's invoices
  • Affiliate Invoices - This will list all the invoices which it is under the selected member's affiliation
  • Make Payout - If an affiliated is paid, a link will activate for you to add that invoice to the next payout.
  • Current Payout Amount - This will display the current amount that is awaiting to be “payout” for the member
  • Set Membership to Pending - Set the membership subscription back to Pending state.
  • Set Membership To Cancel - Cancel the membership subscription, the invoice will stop generating
  • Set Membership and Member to Cancel - Cancel the membership subscription and suspend the member's account. The member will no longer to watch video
  • Set Membership and Member to Active - Cancel the membership subscription and make the phpmotion account remain active. Depending on your setting, the member may still be able to watch the video

Video Management

  1. PPV Preview Management - This will allow you to generate preview videos for your PPV videos

Billing Management

  1. Manage Invoices - This function list all the membership subscription invoices
  2. Search Invoices - This function let you search for a specific membership subscription invoices
  3. Manage Affiliate - This function list all the payouts that has been processed
  4. List Cancellations - List all membership subscriptions waiting to be cancelled

You will be given three options to a cancellation request.

  • Approve Cancellation - Cancel membership, but phpmotion account remains active. Invoice will stop generating
  • Reject Cancellation - Put membership back to active. Invoice will continue to generate
  • Approve Cancellation + Suspend - Cancel membership, suspend phpmotion account. Invoice will stop generating, not able to view video.

Misc.

  1. Pro Config - Manage new settings under the Pro version
  • Deny Duplicate IP Login or IP Override - This option will take into member's IP address into account. If enabled, using a second username to login will result in error. Because the IP was already logged while the member was logging in using the first username This option will stop members from abusing free accounts
  • Auto Cancellation - Enabling this will approve any cancellation request automatically. It will cancel the membership subscription and put the account to suspended state. Be careful when using this.
  • Debug Mode - Enabling this will output useful log when daily_update_pro.php, sub_paypal_callback.php, sub_pro_paypal_callback.php is run.
  • Preview Mode for PPV - Turning this will turn on a preview player for PPV that have a preview video created
  • Automatic Preview Generation - Turning this will set the system to create a preview video every time you approve a PPV automatically
  • Automatic Preview Generation for all Videos - Turning this will set the system to create a preview video every time a new video has been uploaded to the site. Members without memberships to certain channels will be asked to upgrade the membership and the preview video will be shown
  • Automatic Preview Length - The time you want the preview clip to be
  • Affiliate Mode - To let your members earn commission while referring new sign ups to your website
  • Generate Invoice when Member Register - Members will be forced to pay for the initial invoice before the member can view anything
  • Billing Currency - The currency you want your PPV/PPD/Membership to be in
  • Invoice Overdue Date - The number of days the invoice is past due before suspending the account
  • Secret Hash - A secret codeword used for numerous functions throughout the mod. You can enter anything inside the box
  • Suspending Account if Membership Order is Pending -If enabled, members with pending membership will not be able to view video until the membership is turned into Active

*Minimum Payout Amount - The minimum commission the member must earn before a payout button display in their profile. Make sure enter format as x.xx


6- Other Mod Functions

For every completed transaction, the mod will automatically mark the invoice as PAID. The mod will also email the buyer and the admin a sales receipt. If the member chose to buy a coupon, he/she will also receive the coupon within that email.

When PPV or PPD is set to on and the cronjob for the daily_update.php is configure. This mod will email the admin daily sales and monthly sales report. Daily and monthly usage report will also be mail to the admin.

7- Email Templates

New in PRO version, there are now email templates that you will need to edit. They are sub_pro_emailtemplates.php, sub_pro_payout_email.php and sub/emailtemplates.php

  1. sub_pro_emailtemplates.php - This template file is for when a member have just completed a order for the membership.
  2. sub_pro_payout_email.php - This template is for when your member request a affiliate payout.
  3. sub/emailtemplates.php - This template consist of emails that will be send out to your members when a new invoice is generated or the account is overdue.

8- Usage Tips

Obviously with this mod, you can limit how many videos your members can view, download or upload. Therefore the first thing you will want to do is configure how much the viewing fee is for the channel. For the channels that have some “good” contents. You may want to assign a high value than a channel that just have some general videos.

Also make sure the daily viewing limit for each package is at a good number, also make sure the monthly viewing limit IS BIGGER than the daily viewing limit.

9- Glossary

Account/PHPmotion Account - The default account that phpmotion creates when a member join your site. This is located in the member_profile table in the database

Base Weekly Fee - Defined as the cost for the membership per week. A month is (Base Weekly Fee x 4)

Download Token Cost - This refers to the the token it will subtract from member's allocated limit everytime a video is downloaded

Fee (View/Upload/Download) - Refers to the amount set within a channel. This fee will be used to subtract the member's allocated limits. If the member had exhausted his monthly or daily allocated token. Then access to the video will be denied.

IP Override - When enabled, the IP that is logging onto the account will bypass the IP check. Regardless whether the IP was logged on another account

Limit - Refers to the package's limit when using the basic membership function. The limit is the token each member under this membership have. Every time a video is viewed/uploaded/downloaded, the limit is subtracted by the viewing/uploading/downloading fee specified by the channel. Once the limit has been reached, or gone over the daily or monthly limit. The user will deny access to that video

Membership Level - Refers to the different packages that is tied to the phpmotion account

Package - Same as a Membership Level

Token - The dollar term used in this mod

Upload Token Cost - This refers to the the token it will subtract from member's allocated limit everytime a video is uploaded

Viewing Token Cost - This refers to the the token it will subtract from member's allocated limit everytime a video is watched

10- Hooks

List of variables available in on each page.

add_payout_pro pre: none

post: $hash - hash code, $invoice - invoice id

addcoupon pre: none

post: $_POST - post values, $giftcode - gift certificate code, $memberid - member id, $result - invoice id

addppx pre: none

post: $_GET - get values, $vid - video id,

affiliate_payout_pro pre: none

post: $uid - member id, $hash - hashcode, $total - payout amount

cancelmember_pro pre: none

post: $_POST - post values

channel_edit pre: none

post: $disallow - disallow playback list, $disallow_up - disallow upload list

daily_update_pro pre: none

post: none

daily_update_pro_members $params→array⇒(memberid, reason)

reasons= paidinvoicecreated, freeinvoicecreated,updatenextinvoicedate,accountoverdue,cancelaccount

Additional variable:

updatenextinvoicedate⇒$new_due_date

edit_billing_invoice pre: none

post: $_POST - post values

edit_billing_invoice_pro pre: none

post: $_POST - post values,

massmemberedit pre: none

post: $_POST - post values, $members - selected members

massmemberedit_pro pre: none

post: $_POST - post values, $members - selected members

massppxaction pre: none

post: $_POST - post values

massppxaction_pro pre: none

post: $_POST - post values

member_edit pre: none

post: $id = member's id, $row5 - array of the package being used, $_POST - post values

memberinvoiceupdate_pro pre: none

post: $id = member's id,

11- Changelog

1.75

  • New auto cancellation
  • New cancellation option
phpmotion_membership_mod_pro.txt · Last modified: 2015/04/30 17:30 (external edit)