The WP Cablecast plugin aims to provide an easy way for WordPress site builders to integrate data from a Cablecast system into WordPress. The plugin handles importing Shows
, Channels
, ScheduleItems
, Projects
, Producers
, Categories
into WordPress so they can be queried and displayed the same as any other WordPress post.
I've set up a simple demo site that I'll be expanding with examples of how to do common things as questions are asked. Checkout http://wp-cablecast.raytiley.com to see what this plugin does.
Upload the plugin and activate it. Then in the admin dashboard navigate to Cablecast Settings
. There is a single input for the Cablecast Server Address
. This is the url you use to login to Cablecast from the public internet. Example http://tighty.tv
.
TL;DR - Follow these instructions for setting up wordpress cron: https://developer.wordpress.org/plugins/cron/hooking-into-the-system-task-scheduler/
The WP Cablecast plugin uses Wordpress's Cron System to periodically sync content from Cablecast. This can be a lengthy operation involving many API calls to Cablecast. By default WordPress will attempt to do this in a normal users web request. Depending on your server configuration this may cause a poor user experience as the visitor has to wait on the Cablecast Sync. It also may lead to incomplete syncs due to web request timeouts. For best experience it is recommended you execute WordPress cron using the system task scheduler so the sync happens independent of visitors using your site. See the link above for more information.
The WP Cablecast plugin creates custom posts for the following Cablecast resources. The resource and the post custom meta properties are described below.
A Cablecast show is the primary resource in Cablecast. It describes a program that viewers can watch on the channel or through VOD.
Properties | Description |
---|---|
cablecast_show_id |
|
cablecast_show_title |
|
cablecast_show_event_date |
|
cablecast_show_cg_title |
|
cablecast_show_comments |
|
cablecast_show_location_id |
|
cablecast_show_project_id |
|
cablecast_show_project_name |
|
cablecast_show_producer_id |
|
cablecast_show_producer_id_name |
|
cablecast_show_category_id |
|
cablecast_show_category_name |
|
cablecast_show_vod_embed |
|
cablecast_show_vod_url |
|
cablecast_show_custom_1 |
|
cablecast_show_custom_2 |
|
cablecast_show_custom_3 |
|
cablecast_show_custom_4 |
|
cablecast_show_custom_5 |
|
cablecast_show_custom_6 |
|
cablecast_show_custom_7 |
|
cablecast_show_custom_8 |
|
cablecast_last_modified |
Properties | Description |
---|---|
cablecast_channel_id |
|
cablecast_channel_live_embed_code |
WP Cablecast creates several two custom taxonomies Projects
and Producers
that are used to relate Cablecast Projects and Producers to Cablecast Shows.
Properties | Description |
---|---|
cablecast_producer_address |
|
cablecast_producer_contact |
|
cablecast_producer_email |
|
cablecast_producer_name |
|
cablecast_producer_notes |
|
cablecast_producer_phone_one |
|
cablecast_producer_phone_two |
|
cablecast_producer_phone_website |
So far there are none... But in order to head some people off... here we go.
Because there are so many schedule events, the WP plugin stores the schedule events as a seprate database table rather than creating a custom post type.
The plugin provides a function cablecast_get_schedules($channel_id, $date_start)
that can be used in themes to get schedule items. The function returns an Array
of objects with details on a schedule item.
Property | Description |
---|---|
run_date_time |
|
show_id |
|
show_title |
|
channel_id |
|
show_post_id |
|
channel_post_id |
|
schedule_item_id |
The plugin sets a custom meta property of cablecast_channel_live_embed_code
to the channel for the embed code to watch the live stream. If this property isn't set it's likely your Cablecast isn't configured correctly, or you don't have a live streaming server.
By default the plugin will modify the content when viewing a Channel
to place the embed code above the schedule. If you have custom themed the Channel
page you'll need to add the embed code to your theme.
The vod embed code and url are set as custom meta on the Show
in the cablecast_show_vod_embed
and cablecast_show_vod_url
respectivly.