Author: Ryan R. Bayne

Ultimate Member Extension for TwitchPress Now Available

Ultimate Member Extension for TwitchPress Now Available

This is the first funded extension for the TwitchPress system and the thanks go to a popular streamer known as Nookyyy. He didn’t just fund the work but participated in hours of testing and troubleshooting. So based on these facts he is also a contributor and together we have created a strong bridge between the Ultimate Member plugin and TwitchPress.

Twitch Subscription to UM Role

The primary purpose of the current version is to automatically change a WP users community role based on their Twitch subscription for a giving channel. If that doesn’t make much sense to you here is another way of putting it. The UM extension changes the level of access a WP user has to the website, has based on their subscription plan.

Ultimate MEmber plugin for WordPress

Perks Like Subscriber Only Content

Once a WP users Twitch data is synced it becomes part of the TwitchPress system first. Any plugin could be adapted to work with that data and offer our channels viewers some perks on our own websites. A common bonus for subscribing could be private content and if you know WordPress that essentially means hiding anything that can be added to a page using a shortcode.

We could hide downloads, votes, hosted videos, discount codes, and even games that interact with the Twitch API. Ultimate Member is the first plugin of its kind to be integrated with TwitchPress but I predict some other very good plugins will be too.

Professional Twitch Suite System

The bigger goal for TwitchPress is to support the creation of a Twitch suite. This is where extensions come in but without extensions the plugin is great. The core plugin focuses on sharing and importing posts with channel feeds. To use the TwitchPress UM Extension another two extensions are currently required though.

  • TwitchPress Login Extension: Displays a Connect to Twitch button for login and registration using a visitors own Twitch account. This is required because it contains the code that triggers data import from Twitch. A developer could replace this extension with their own or adapt another plugin to trigger the data import.
  • TwitchPress Sync Extension: This is the plugin that will focus on the flow of data to and from Twitch.tv with the primary goal of balancing requests. The only way to truly balance activity and be in control of it as website owner possibly providing a busy public service. Is it have it all go through one plugin that logs, stores, and displays data related to API requests. Well, there may be some small exceptions but the majority of calls to Kraken (Twitch API) is expected to go through the Sync Extension. This extension will be required by most TwitchPress systems, possibly all.

So far all extensions are provided free on WordPress.org and this only happens due to funding even if it is small amounts. So don’t think you need to donate hundreds to fund development. Every 10 dollars or 10 pounds or 10 euros can pay for 2-3 hours development, which is below minimum wages obviously. My own contribution is that extra time and in the end, I don’t really profit considering my costs.

 

Advertisements
TwitchPress Change Logs for Version 1.2

TwitchPress Change Logs for Version 1.2

The latest core version is 1.3.0 and I’ll soon sprint through some of the issues on GitHub. I will be paying attention to requests from users. First I need to finish getting a range of extensions playing nicely together because right now, they aren’t.

Change Log from readme.txt

Here are the changes from recent versions in recent weeks.

= 1.2.9 =
* FIX – Setup Wizard redirection problem fixed.

= 1.2.8 =
* FIX – generate_authorization_url_admin() was still in use during Setup Wizard.

= 1.2.7 =
* FIX – multitool_clean() function replaced with twitchpress_clean().
* DEV – Tools page loads differently and potentially fixed bugs.
* DEV – The Help tab now displays on all of the plugins views.
* FIX – Added missing method related to automatic installation of plugins during Setup Wizard.
* FIX – Extensions now downloading from WordPress.org during Setup Wizard.
* NEW – Advanced options category on the General settings view.
* NEW – Option on the advanced options view for switching error display on and off.
* INF – The new error display option is the same switch found in tools – they share the same value.
* DEV – generate_authorization_url_public() removed.
* DEV – generate_authorization_url_admin() renamed to generate_authorization_url()
* DEV – generate_authorization_url() now creates a random 14 character value for populating scope value.
* INF – Plugin now uses scope value to obtain information about the visitor and the oAuth2 request scenario.
* DEV – administrator_main_account_listener() no longer generates notice if error return by Twitch.
* INF – This change is to prevent the spamming of a URL with error parameter in it.

= 1.2.6 =
* NEW – Service Switches options added.
* DEV – More changes made to accomodate the new Ultimate Member extension.
* DEV – Setup Wizard now checks for an existing channel post before attempting to create one.

= 1.2.5 =
* FIX – Option category menus broken as they were still pointing to “twitchpress-settings” slug.

= 1.2.4 =
* FIX – Forwarding URL in start_twitch_session_admin() was causing a blank settings area in Twitch API tab.
* DEV – class.twitchpress-settings-kraken.php improved to allow extension to add section.
* DEV – New twitchpress_is_user_authorized() function makes it easier for all extensions to check the same user meta values for an authorized Twitch session.
* DEV – TwitchPress Sync Extension BETA added to list of plugins for quick install during Setup Wizard.
* DEV – As a temporary approach the sites official (default) Twitch account is applied as the WP users own account i.e. their personal use of the site will use that same account, their WP profile will display data from that channel.
* NEW – General settings page.
* NEW – Option to delete everything including data, when plugin is deleted. See Plugin Removal section in General Settings.
* DEV – Now including background-process.php and async-request.php in the main file.
* DEV – Plugin menu is loaded differently: in a manner that allows multiple post types to be added to it.
* NEW – Channels custom post type. This will be a method of managing channels with the option of displaying them.
* DEV – Channel feed sync to WordPress is much better with a more complex connection between posts, channels and owners.
* DEV – Activating the channel to WordPress feed syncing will now create a new CRON job (scheduled task).
* DEV – Removed option for updating Twitch feed entries pending further development.
* DEV – Removed option for updating WordPress posts when a Twitch feed item changes, pending further development.
* DEV – A few lines removed from developertoolbar_uninstall_settings() whicch did not appear to have a purpose.
* FIX – Function twitchpress_returning_url_nonced() now builds URL in a way that allows nonce check to pass.
* DEV – Removed the mainviews folder and contents deleted as it was not yet in use.
* NEW – New Tools view – created using a WordPress core table for an approach that allows endless expansion.
* DEV – Channel feed item ID is now queried straight after WordPress posts to Twitch and the item ID is stored in the original posts meta under “twitchpress_feed_item_id”

= 1.2.3 =
* DEV – TwitchPress_Settings_Permissions renamed to TwitchPress_Settings_Permissions
* DEV – Default footer message will no longer be displayed.
* DEV – New settings views are being added, they will be hidden until active extensions require them.
* DEV – Internationalizing (i18n) files added for the first time.
* DEV – Updated scopes description to insist on strict selection of required scopes only.
* DEV – get_global_accepted_scopes() had a “twitch_scope” string changed to “twitchpress_scope”.
* DEV – CSV 2 POST plugin removed from extensions list.
* DEV – The first official extension “TwitchPress Login Extension” added to extensions list.
* DEV – New function twitchpress_validate_code() applied to administrator_main_account_listener().
* DEV – Applied “$_SERVER[‘REQUEST_METHOD’] !== ‘GET'” to $_GET listeners.
* DEV – Updated user-friendly descriptions in scopes().
* DEV – added “openid” scope to the scopes() function.
* DEV – The $twitch_scopes variable has been updated with openid in TWITCHPRESS_Kraken5_Interface()
* DEV – Removed the getUserObject() function which has never been used and is no longer usable.

= 1.2.2 =
* DEV – Notices class improved to allow easier creation of all class (color) of notices.
* DEV – Changed Senior Developer role (seniordeveloper) to TwitchPress Developer (twitchpressdeveloper)
* DEV – The code_twitchpress capability is no longer applied to administrators on installation.
* DEV – New twitchpressdevelopertoolbar capability added and is only assigned to the administrator with ID:1 and TwitchPress Developers.
* NEW – TwitchPress Developers toolbar now available. It will only show for users with “TwitchPress Developer” role or custom capability applied to an admin account.
* NEW – Toolbar option for uninstalling all TwitchPress options.
* DEV – Renamed twitchpress_main_channel to twitchpress_main_channel_name
* DEV – New option “twitchpress_main_channel_id”
* FIX – Channel does not exist situation reported 27th June fixed 28th June.
* DEV – Notice will now appear when API credentials are missing, encouraging user to complete the Setup Wizard.
* DEV – Added esc_url() to second_level_configuration_options()
* DEV – Setup Wizard green styling replaced with purple.

= 1.2.1 =
* FIX – Incorrect class name prevented plugin activation.

= 1.2.0 =
* NEW – Setup wizard making installation clearer and more professional.
* NEW – Extensions system so developers can add features quickly.
* NEW – Settings pages now use the WordPress Options API.
* VER – Twitch API Kraken Version 5 now supported.

Why too many Twitch plugins in WordPress is a bad idea!

Why too many Twitch plugins in WordPress is a bad idea!

Streamers are entering a new Twitch.tv era all thanks to WordPress. The ability to create a site quickly and install an endless number of free plugins allows a popular streamer to create a site for their community. The availability of over 5000 free plugins has always been one of the best things about WordPress but I’m about to tell you how it can also cause the death of a site and potentially ruin a Twitch channel.

Consider this…

  • How do you keep a database clean when multiple different plugins want to store their own version of the exact same data i.e. each plugin might store a Twitch User ID in an option record only that plugin uses and it’s possible that 2-3 plugins will each store a users ID!
  • If the Twitch API is taxed by the demand your site is putting on it, how will you establish which plugin is the cause and deal with the issue further by establishing which service/call within the plugin is at fault?
  • If two plugins require the exact same data from the Twitch API and they both make calls on their own to fetch it. Do you care or would you prefer a more professional approach that considers high traffic volumes?
  • If you want to integrate a membership plugin with Twitch subscriptions, will you install another plugin by a random developer? A plugin that makes calls to the Twitch API to get subscription data without considering the possibility that your other Twitch plugins might have already queried that data and potentially cached it for future use.
  • Would you rather build your Twitch based website on a single system? A system still built using multiple plugins thanks to an extensions system, but each plugin fully integrated to offer more by default. That is what the TwitchPress project offers and it includes more guarantees that success will not cause the downfall of your service. TwitchPress has been designed to adapt and grow, to suit your channel communities or stream teams demanding needs.

 

Too Many API Cooks

Installing many WP plugins can be a great experience. The fact that each plugin is created by a different developer isn’t normally a problem – if each developer knows what they are doing. But there is an exception and it has nothing to do with coding styles and everything to do with engineering decisions.

Each plugin author will take a slightly different approach which is normal and part of the beauty of coding. That beauty becomes a potentially horrendous mess when each approach creates duplicate data in a database or makes more calls to the Twitch API than are needed. Two plugins might require the same data to do different things. Each plugin will make a request to Kraken (the Twitch API) and this could happen many times per minute depending on the purpose of a plugin. This is a major issue for popular websites because API’s have limits and what started as a few calls a minute on a new WP site might quickly turn into a few calls per second during peak times. Especially if we install a few different Twitch plugins that each require interaction with Twitch.tv services.

Especially if we install a few different Twitch plugins that each require interaction with Twitch.tv services. The result is having too many API cooks in the kitchen.

I got here first!

There aren’t many WP plugins that connect to the Twitch API using their own set of application credentials and those that do have no plans to expand from what I can tell.

But to my surprise, I’ve already found two separate developers this year who said they plan to create a Twitch plugin that uses the API and will require application credentials to be entered. They approached me when they found my own Twitch plugin, “TwitchPress” and we’re interested in my approach. I urged them to consider creating extensions for TwitchPress instead and helping me to establish my plugin as the number-one solution for launching a Twitch based website.

I only hope developers are responsible enough to explain the pros and cons to using their plugins. Especially if they do not offer an extension system for an expanding community. We don’t want streamers investing a lot of time and money into a new website that makes it difficult to grow. Instead, they can choose a solution that is ready to expand when they are ready. That solution is TwitchPress.

No traffic management!

There needs to be a core plugin or theme (usually a plugin) to create a sustainable system that a service can rely on. In our case, we want to create a Twitch.tv system and offer a suite of Twitch tools. It has to be professional and cater for an unlimited number of users, we can’t predict how popular the next big streamer is going to be.

We’ll want to add new services to our suite regularly i.e. games, raffles, new commands and shortcodes for displaying Twitch.tv content. We have no idea how many times we’ll need to call Kraken when providing these services. It’s not good enough to stumble into a situation where we’re hitting traffic or call limits without knowing what features are generating traffic or potentially excessive calls to the API.

So we need traffic management that gives us a picture of where users are going, what features they are using and how much demand is being put on third-party services like Twitch.tv.

Such an advanced traffic management solution does not exist in TwitchPress but it will. It will never exist within a group of random plugins and so building a gaming site using plugins from various developers will instantly rule out all of the control I plan to offer in my plugin.

Twitch Press Wallpaper 1280 x 720

Transparency for Users

I’m a fan of transparency in any development but it’s unlikely we’ll ever see a list of “My Installed Plugins” on any WordPress site. TwitchPress offers a recognized brand that we can use to create confidence in our visitors by displaying the brand clearly on our WP site i.e “Powered By TwitchPress”. The TwitchPress core plugin is free and so we could say the brand is also free.

TwitchPress is a project offered by me to two communities, the WordPress community, and the Twitch community. We can build the brand together, own it together, and each of our gaming websites will benefit from that brand.

Summary

This information is based on the idea that your WP site is being developed for an ever growing Twitch channel. That means the site is expected to provide a public service for potentially thousands of viewers. If your site is not expected to be visited by high volumes of traffic and you do not plan to offer a suite of Twitch tools in future. Then any plugins will do and I encourage you to try many. Just know that it is my goal to meet everyone’s needs so contact me with your requirements.

 

 

New Tools View

New Tools View

I’ve just added a new view to TwitchPress for tools. The design involves the use of a WordPress table, with information about each tool and a button (sometimes two). The idea is simple, quick, easy and accessible actions that do something specific.

Ideas Taking from Multitool

The approach of offering tools in a table was copied from the Multitool plugin (another one of my projects) which offers Quick Tools, Configuration Tools, and Advanced Tools. I’ve taken the Quick Tools view and will offer advanced tools also. Advanced tools take users through a step-by-step process

Advanced tools take users through a step-by-step process in a way that allows users to focus on each form. Each step in the process is hidden until required, so there is no clutter on the interface confusing users. This is not ready, but it will come if TwitchPress is popular enough.

Extendable by Extensions

One of the great things about the use of a table to present many actions is the extendability. It is possible for any number of extensions to add any number of tools, without causing clutter on the interface or even a UI that visually grows. Instead, users will see the same familiar table, even when their Twitch services expand. Users simply need to perform a search for the tool they need.

This is yet another element of the TwitchPress plugin that will allow developers to create a seamless experience between the services and tools added to their own custom Twitch.tv site.

We can easily add tool categories and I’ll eventually add the ability to favorite tools so that they appear first in the table. That is a feature planned for Multitool and will be copied over to TwitchPress.

 

New Twitch Channel Directory and Display Potential

New Twitch Channel Directory and Display Potential

Today I added a new custom post type to the TwitchPress plugin for Channels. We can enter new channels manually and if we install TwitchPress Login Extension a channel can be added automatically. As I said, it was only added today so this is all WIP.

The primary purpose of the core plugin is sharing posts to Twitch channel feeds and importing them. The second purpose is to act as the foundation, the core, to a much larger and endlessly expanding Twitch suite. The new custom post type will offer a multi-purpose solution for profiling channels.

Channel Settings Using Post-Meta

Using post meta we can add custom settings on a per channel basis. This could be settings related to how TwitchPress interacts with the channel through Kraken (Twitch API) or how our theme displays the channel should we list them publicly. The extension will easily add and use post meta as settings to do whatever an extension needs to do.

Channel Sorting Using Taxonomies

I know Twitch.tv does a good job of adding meaning to a channel and the host can change the game or title based on what they are doing at any time. We can go further and add every game played on a channel, to the channel post. We could use this to add a channel to many categories i.e. game genres, games, events and creative. We could go even further and create a taxonomy to help us understand a channels style i.e. competitions, giveaways and possibly even a popularity score. These are all just ideas but we could create TwitchPress extensions that offer such features, easily.

Display Channels Using Theme Templates

Lastly, we can obviously display channel posts for the public to see. This is optional (pending the actual settings) and by default, they are hidden. In theory, we could create directories of Twitch channels and I can think of a few good reasons to do this. One of the more obvious is to display a teams channels. You could also offer subscribers the ability to add their own channel to your collection, essentially giving them a public page on your website. Maybe you want to create a massive directory of thousands of channels.

All you need to do is add a new file to your theme which displays the custom post type. Again, let me remind you that these are ideas if you like them you need to ask for them and support the project. The beauty is that your template for displaying channels can be as simple or as advanced as you like. You can embed the channel, embed the channel’s chat and a lot more. The question is, can you come up with an approach that suits your audience, your community and attracts Twitch.tv users to use your site?

Ideas Need Support

Twitch plugin for WordPress

Those are the easy ideas, I have plenty bigger ones, some potential money makers and I do share my big ideas with people who share with me.

I look after four children 24 hours a day, yet here I am producing something for the WordPress and Twitch community without any pay. Can you imagine the juggling that requires? So I’m not afraid to ask for your support, in every-way you can provide it, to make this project a success.

Support the TwitchPress project now, simply by sharing this post with other streamers.

Smoother Setup Wizard in 1.2.2

Smoother Setup Wizard in 1.2.2

I had not long begun working on the next version of TwitchPress when I was contacted by thatgirlslays regarding a fault. She posted on the plugins forum with a bug report that explained difficulties during the Setup Wizard.

Twitch ThatGirlSlays TwitchPress Plugin User.png

Version 1.2.2 focuses on improving the Setup Wizard. Apart from actual fixes, there is a change in the styling. I replaced the original green with a purple, making the wizard appear very…Twitch!

Change Log

  • DEV – Notices class improved to allow easier creation of all class (color) of notices
  • DEV – Changed Senior Developer role (seniordeveloper) to TwitchPress Developer (twitchpressdeveloper)
  • DEV – The code_twitchpress capability is no longer applied to administrators on installation
  • DEV – New “twitchpressdevelopertoolbar” capability added and is only assigned to the administrator with ID:1 and TwitchPress Developers
  • NEW – TwitchPress Developers toolbar now available. It will only show for users with “TwitchPress Developer” role or custom capability applied to an admin account
  • NEW – Toolbar option for uninstalling all TwitchPress options
  • DEV – Renamed twitchpress_main_channel to twitchpress_main_channel_name
  • DEV – New option “twitchpress_main_channel_id”
  • FIX – Channel does not exist situation reported 27th June fixed 28th June.
  • FIX – Channel does not exist situation reported 27th June fixed 28th June
  • DEV – Notice will now appear when API credentials are missing, encouraging user to complete the Setup Wizard
  • DEV – Added esc_url() to second_level_configuration_options()
  • DEV – Setup Wizard green styling replaced with purple

New Developer Toolbar

The Developer Toolbar is a feature for anyone improving the plugin or testing/debugging it. The toolbar doesn’t offer a lot in this plugin but I use the same feature in other plugins and eventually pack them full of quick tools.

Next Update Coming Soon

Today’s release as part of a two-week sprint to deliver the plugins first extension. The extension will bridge TwitchPress and Ultimate Members. It is a response to a request by a Twitch streamer who gets over 2000 viewers when he goes live and he has over 5 million channel views.

The purpose of the extension will be to apply UM membership levels based on a visitors (WP user) Twitch subscription level. Twitch offers three levels of subscription and my new client wants to offer different levels of access to his WordPress site based on how big a fan a person is.