Git Product home page Git Product logo

zype-wordpress-plugin's Introduction

Don't know what Zype is? Learn more about Zype here.

Table of Contents

Zype Wordpress Plugin

This free plugin allows you to turn your WordPress website into an eye-catching, easy to use video streaming destination integrated with the Zype platform with minimal coding and configuration. The plugin is built with PHP and the Zype API. With brief setup you can begin streaming video on your website.

Using the plugin you can sell subscriptions for premium video content, track analytics for video engagement, create playlists and insert videos using shortcodes, and even broadcast live events with just a few clicks.

The Zype cloud service provides publishing, monetization, streaming, audience management, and analytics software that is integrated into hundreds of web, mobile, and OTT apps and engaged by millions of viewers every month.

Demo Website

Full functionality of the plugin can be viewed on Zype Plugin demo website.

Key Features & Capabilities

  • Easily add videos and playlist galleries to any page or post using shortcodes.
  • Responsive design instantly works on mobile and desktop with any theme.
  • Stream your content from a wide range of sources including native video uploads, YouTube, Vimeo, Hulu, and more.
  • Your branding front and center with your own custom branded HTML5 video player.
  • Generate revenue with built-in subscription paywalls to make more money from your premium content.
  • Maximize ad revenue with preroll, midroll, and postroll ads, including support for dynamic ad pairing.
  • Broadcast high quality Live Streams anywhere on your website with just a few clicks.
  • Improve discovery and navigation for your audience by displaying playlist galleries showcasing your entire video library.

Monetization Supported

  • Subscription
  • Ads

Installation

Requirements and Prerequisites

  • A valid and current Zype account
  • Requires WordPress version: 4.6 or higher | Tested up to: 4.9.5
  • Requires PHP: 5.6

Installation via docker compose(Recommended for developers)

The repo includes a Dockerfile ready to download the dependencies and run the application(with xdebug v3 support for debugging).

NOTE: Make sure to change the database credentials in the Dockerfile before installation

To setup everything you only need to run:

  docker-compose build
  docker-compose up -d
  docker-compose exec wordpress bash -c "cd /var/www/html/wp-content/plugins/zype-plugin && composer install --no-scripts"

The composer install step downloads the project dependencies, so is actually only needed to run the first time and whenever you add a new dependency.

Installation via prebundled zip archive

Download latest release from Google Drive link in releases section in Github

  1. Log in to the administrator panel.
  2. Go to Plugins Add > New > Upload.
  3. Click Choose file (Browse) and select the downloaded zip file of the zype plugin.
  4. Click Install Now button.
  5. Click Activate Plugin button for activating the Zype.

Installation via cloning the repo (Optional for developers)

Clone or download zype-wordpress-plugin repo. If you downloaded the ZIP file, you need to unzip the file.

  1. Open up Terminal. Navigate inside downloaded repo.
cd path/to/plugin-folder # change directory to plugin folder
  1. Enter the following command to get the required libraries:
composer install # get the latest version of required libraries with Composer
  1. After the libraries have been updated, ZIP the plugin folder.

  2. Manually add a new plugin in Wordpress and upload the ZIP file you just zipped.

Configuration

API Keys & Consumer Settings

  • Following installation you must import API and app keys from your Zype account. API and app keys will automatically validate as they are being added.
  • In order to support consumer management, you must also import your consumer OAuth keys and secret.

Enhanced Playlists

  • To set up enhanced playlists, there needs to be a root playlist set up in your Zype account. To create a root playlist, you can visit the Manage Playlist Relationships page in Zype and create a parent/child playlist structure.

Monetization

  • In order to use subscription monetization on your Wordpress website, you must have a Braintree or Stripe account and have your Braintree / Stripe settings configured in the plugin as well as in the Zype platform.

Website Integration

Shortcodes

Shortcodes can be inserted anywere on your Wordpress website and will render underlying functionality based on plugin configuration.

  • [zype_video id='Insert Video ID'] Will render a single video from your Zype account
  • [zype_playlist id='Insert Playlist ID'] Will render a playlist and all nested content from your Zype account
  • [zype_playlist id='Insert Playlist ID' zype_type=video_single] Will render all videos within a selected playlist
  • [zype_auth] Will render login/signup functionality.
  • [zype_signup] Will render signup functionality

URL rewrites

URL rewrites add new pages to your website.

Contributing to the repo

We welcome contributions to Zype Wordpress Plugin. If you have any suggestions or notice any bugs you can raise an issue. If you have any changes to the code base that you want to see added, you can fork the repository, then submit a pull request with your changes explaining what you changed, why you believe it should be added, and how one would test these changes. Thank you in advance to the community!

How to start the project

Since the project is dockerized just runnning the following will have a wordpress running with the Zypw Wordpress plugin:

docker-compose build && docker-compose up -d

if this is the first time you run the project (or if you added a new dependency) remember that you must download the dependencies (check Installation via docker compose section to see the command to download them)

Also you will probably need to change the Permalink Settings to Post name if not the routes from resources/routes.php won't work

Creating Initial user

The first time you start the app it will ask you to sign up a new user. If by some reason you removed it from the DB or you just want to do a fresh start you can remove the volumes and build the images again from scratch:

docker-compose kill && docker-compose rm
docker volume rm zype-wordpress-plugin_db zype-wordpress-plugin_wordpress
docker rmi zype-wordpress-plugin_wordpress
docker-compose build
docker-compose up -d

Debugging

VS Code

In your launch.json add the following configuration:

{
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "port": 9000,
    "log": true,
    "pathMappings": {
      "/var/www/html/wp-content/plugins/zype-plugin": "${workspaceRoot}"
    },
    "xdebugSettings": {
        "max_data": 65535,
        "show_hidden": 1,
        "max_children": 100,
        "max_depth": 5
    }
}

And just click play on

Creating new release

If you want to create a release you must remove:

  1. Once your code is in master, create a new version: git tag X.X.X and push the tag to the repo.
  2. Duplicate the project folder and rename the copy to something like zype-wordpress-plugin-vX.X.X
  3. Remove the .git folder, the docker-compose.yml and Dockerfile files.
  4. Compress the folder into a zip file.
  5. Go to the releases page and create the release Zype Wordpress Plugin vX.X.X and upload the zipped file to the release.

Support

If you need more information on how the Zype API works, you can read documentation here. If you have any other questions, feel free to contact us at [email protected].

Versioning

For the versions available, see the tags on this repository.

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL-2.0 License - see the LICENSE file for details

Production account

There's a Zype production account https://zypeplugin.com/

zype-wordpress-plugin's People

Contributors

andyzheng547 avatar annarows avatar azheng249 avatar bdorry avatar heyjones avatar imchrissmith avatar matayoshimariano avatar nicolasderecho avatar osoro avatar svetdev avatar whoughton avatar zypechris avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zype-wordpress-plugin's Issues

Monetization Error

I created a plan in Shopify and added it to the Monetization section in Zype, but when I go to select it in the Monetization section in WordPress I just get the following error:

Warning: in_array() expects parameter 2 to be array, null given in /wordpress/wp-content/plugins/zype-wordpress-plugin/resources/views/admin/braintree.php on line 27

When I view my logs, I actually see the same error occurring quite often... any ideas?

Consumer Login is Not working

It always saying that invalid username or password when i sent email request.
{"status":false,"is_subscribed":false,"errors":["Username or password invalid."],"redirect":"https://countryroadtv7.wpengine.com/zype-profile"}

i have debugged that and print out the api response that shows me that error
Response Object
(
[data] => stdClass Object
(
[error] => invalid_grant
[error_description] => The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
)

[code] => 401

)

Plugin could not be activated because it triggered a fatal error.

When I try to activate the plugin I get the following error:

PHP Fatal error: Uncaught GuzzleHttp\\Exception\\RequestException: cURL error 3: <url> malformed (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in /wp-content/plugins/zype-wordpress-plugin-0.9.5/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:186\nStack trace:\n#0 /wp-content/plugins/zype-wordpress-plugin-0.9.5/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\\Handler\\CurlFactory::createRejection(Object(GuzzleHttp\\Handler\\EasyHandle), Array)\n#1 /wp-content/plugins/zype-wordpress-plugin-0.9.5/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\\Handler\\CurlFactory::finishError(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory))\n#2 /wp-content/plugins/zype-wordpress-plugin-0.9.5/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\\Handler\\CurlFactory::finish(Object(GuzzleHttp\\Handler\\CurlHandler), in /wp-content/plugins/zype-wordpress-plugin-0.9.5/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 186, referer: /wp-admin/plugins.php?plugin_status=all&paged=1&s

User routes not working

I defined my User routes under Settings > Users, but when I attempt to access them I get a 404 and this warning is coming up on every page of the site:

Warning: trim() expects parameter 1 to be string, array given in /wordpress/wp-content/plugins/zype-wordpress-plugin/vendor/illuminate/routing/Router.php on line 472

Error Upon Plugin Activation

WP Version: 4.9.8
PHP Version: 7.0
Framework: Genesis 2.6.1
Child Theme: ACF 5.7.3

Fatal error: Uncaught Error: Class 'Themosis\Foundation\Application' not found in /home/megaphonedemo/public_html/prepsports/wp-content/plugins/zype-wordpress-plugin-master/core.php:143 Stack trace: #0 /home/megaphonedemo/public_html/prepsports/wp-content/plugins/zype-wordpress-plugin-master/core.php(86): Themosis->bootstrap() #1 /home/megaphonedemo/public_html/prepsports/wp-content/plugins/zype-wordpress-plugin-master/core.php(97): Themosis->__construct() #2 /home/megaphonedemo/public_html/prepsports/wp-content/plugins/zype-wordpress-plugin-master/core.php(337): Themosis::instance() #3 /home/megaphonedemo/public_html/prepsports/wp-content/plugins/zype-wordpress-plugin-master/zype.php(4): require_once('/home/megaphone...') #4 /home/megaphonedemo/public_html/prepsports/wp-admin/includes/plugin.php(1897): include('/home/megaphone...') #5 /home/megaphonedemo/public_html/prepsports/wp-admin/plugins.php(178): plugin_sandbox_scrape('zype-wordpress-...') #6 {main} thrown in /home/megaphonedemo/public_html/prepsports/wp-content/plugins/zype-wordpress-plugin-master/core.php on line 143

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.