Re: Video playback/performance across multiple platforms
Posted: October 17th, 2011, 9:40 pm
Hi Jason
Thank you for the recent updates.
I looked at the plugin and it seems to work in some situations but that's not what I have in mind.
In my template, I created a custom post type by using this in my function.php
<?php
// Fire this during init
register_post_type('movies', array(
'label' => __('Movies'),
'singular_label' => __('Movies'),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => false,
'query_var' => false,
'supports' => array('title', 'editor', 'author', 'custom-fields')
));
?>
Then I created a custom page called single-movies.php
Now, instead of using create a new post I have this custom post type in my admin page:
Now in the single-movies.php I have the JW Player code provided by S2:
<?php $cfg = array ("file_download" => "video.mp4", "url_to_storage_source" => true, "count_against_user" => true); ?>
<?php if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>
<script type="text/javascript">...........
So now all I have to do is add the custom filed and the video.mp4 above will be populated with the new value.
<?php echo get_post_meta($post->ID, playmovie, true); ?>
I need to create a new post for each video that I create, for example: The Little Princess (1939), I need to create a new custom post type that contain the video
I need to keep track of how many times the movie been watched (member only) as the original post would have incorrect hits form none members and boots
I am trying to avoid having to insert a code inside any post as I might change it. This way one custom field can support multiple codes. This is very helpful because we have over 2000 posts and will have the same number in custom post types.
Not sure if the plugin above works for that matter or you have any other ideas that might be better that what I'm doing
Thank you
Sam
PS. I know WordPress might be the wrong option for this kind of site but We started with WordPress as a simple video site and now it's all over the place.
Thank you for the recent updates.
I looked at the plugin and it seems to work in some situations but that's not what I have in mind.
In my template, I created a custom post type by using this in my function.php
<?php
// Fire this during init
register_post_type('movies', array(
'label' => __('Movies'),
'singular_label' => __('Movies'),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => false,
'query_var' => false,
'supports' => array('title', 'editor', 'author', 'custom-fields')
));
?>
Then I created a custom page called single-movies.php
Now, instead of using create a new post I have this custom post type in my admin page:
Now in the single-movies.php I have the JW Player code provided by S2:
<?php $cfg = array ("file_download" => "video.mp4", "url_to_storage_source" => true, "count_against_user" => true); ?>
<?php if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>
<script type="text/javascript">...........
So now all I have to do is add the custom filed and the video.mp4 above will be populated with the new value.
<?php echo get_post_meta($post->ID, playmovie, true); ?>
I need to create a new post for each video that I create, for example: The Little Princess (1939), I need to create a new custom post type that contain the video
I need to keep track of how many times the movie been watched (member only) as the original post would have incorrect hits form none members and boots
I am trying to avoid having to insert a code inside any post as I might change it. This way one custom field can support multiple codes. This is very helpful because we have over 2000 posts and will have the same number in custom post types.
Not sure if the plugin above works for that matter or you have any other ideas that might be better that what I'm doing
Thank you
Sam
PS. I know WordPress might be the wrong option for this kind of site but We started with WordPress as a simple video site and now it's all over the place.