What I need to do is more of a general question and not

What I need to do is more of a general question and not a problem per say.

I want to be able to add my own custom videos into the mix for the Integrated Video Tutorials plugin.

The reason is simple... several of the sites I currently run and a few I have planned, have some specific plugins and/or features that are not covered in these videos.

Examples are your custom plugins such as events, appointments, e-commerce, etc. Third party examples would be a custom post type I created for the site, or other third party plugins.

The point is, these videos only cover the basics of WordPress and while that's great, it inevitably will leave holes in the training provided for many many wordpress sites.

My solution is quite simple and one that WP 101 already employs. That is to allow us users to insert our own videos with embed codes. With this function, we can simply create our own videos for these custom features as that wouldn't make sense for you to provide, then insert a code from Vimeo or such and viola... custom training videos.

I feel that this is a pretty high priority item for me. Please let me know if and when it can be done.

I know I mentioned WP 101, which I would simply switch to for this function, but they are not multi-site so each sib-site will have to enter the API code, plus admins would be able to see the nature of where these videos come from which is not something I want.

Thanks and please let me know.

Micha

  • Vinod Dalvi

    Hi Micha,

    I hope you are well today and thanks for posting on the forum.

    There isn't any Integrated Video Tutorials plugin option to add our own custom videos but we have developed some hooks in the plugin as mentioned in the following reply which can be used to develop custom code and achieve it.

    https://premium.wpmudev.org/forums/topic/how-to-add-own-videos-to-integrated-video-tutorials-plugin#post-813863

    I will move this over to the features & feedback section. This way it can be considered for future development depending on the number of feature requests it get from members and we can also see what other community members think about the feature request but We don't publish ETAs to prevent disappointment if a deadline is missed(which in plugin development quite a frequent occurrence!).

    Thanks,
    Vinod Dalvi

  • Micha

    Thanks for the response. Well, that comment on the other post is a little underwhelming. While it does sound like there is a solution, it doesn't appear to be actually listed there.

    This person mentions that there have been hooks made to enable it, but no mention of what the hooks are, the best methods to use them and/or example snippets, nothing. It's sort of like a researcher saying "oh yeah... I just cured cancer", but offering no further details into how.

    Sorry for the over the top analogy.

    I do thank you for suggesting this to your team and understand that you can not provide an eta. But, I do need a more immediate solution to this problem. Can you please expand on the use of the hooks so I can add my own videos?

    Thanks.

  • Vinod Dalvi

    Hi Micha,

    The below hooks are documented in the following Integrated Video Tutorials plugin file on line number 500

    /wp-content/plugins/wpmudev-videos/wpmudev-videos.php

    //run video and category list through filters so people can add their own videos
    $this->video_list = apply_filters( 'wpmudev_vids_list', $this->video_list );
    $this->video_cats = apply_filters( 'wpmudev_vids_categories', $this->video_cats );

    You can use the above hooks to add video category and videos.

    Best Regards,
    Vinod Dalvi

  • Micha

    Honestly, I haven't even had a chance to try this. I'm still working on the core development of this site and I'm nowhere near the support development aspect.

    Frankly, I'm hoping the WPMU does a similar implementation that WP101 does before I launch. Otherwise, I'll just use theirs because it does this out of the box.

    They have a similar core group of basic videos, then an easy to use GUI that gives you a URL field for your video (hosted on Vimeo or similar). Once you add one, there's a plus button that lets you add another field and so on.

    Super easy to use and frankly, I'm a bit surprised that WPMU hasn't done something like this already.

    Anyways... sorry I don't have an example for you.

  • Hoang Ngo

    Hi there,

    I hope you are well today.

    I'm sorry for the incorrect, the code should be

    add_filter( 'wpmudev_vids_categories', 'custom_video_tutorial', 10 );
    function custom_video_tutorial( $content ) {
    	$vid = isset( $_GET['vid'] ) ? $_GET['vid'] : 0;
    	if ( $vid == 0 ) {
    		return $content;
    	}
    
    	$vids = array(
    		'video-1' => 'URL to VIDEo',
    		'video-2' => 'URL to VIDEo',
    		'video-3' => 'URL to VIDEo',
    	);
    	if ( isset( $vids[ $vid ] ) ) {
    		$new_url = $vids[ $vid ];
    		$content = '<iframe style="display:block;margin:0 auto;box-shadow:30px 0 50px -30px #222, -30px 0 50px -30px #222;"
    							        src="' . $new_url . '" frameborder="0" width="600"
    							        height="338" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
    	}
    
    	return $content;
    }

    @Micha,
    I think that feature is great too, I will move this thread to Feature & FeedBack section, so the developer will get noticed about this :slight_smile:

    If you have any additional issues, please let us know and we'll be happy to help.

    Best regards,
    Hoang

  • Hoang Ngo

    Hi @Steve,

    Please remove the old code I provided, and try this instead

    //the video-1,video-2,video-3 is your video ID, and this must be unique, please add your prefix like steve-video-discovery for example
    //The URL to VIDEO, is the direct URL to your video.
    $video_list = array(
    	'video-1' => 'URL to VIDEo',
    	'video-2' => 'URL to VIDEo',
    	'video-3' => 'URL to VIDEo',
    );
    
    add_filter( 'wpmudev_vids_list', 'wpmudev_custom_vids_list' );
    function wpmudev_custom_vids_list( $list ) {
    	global $video_list;
    	$list = array_merge( $list, $video_list );
    
    	return $list;
    }
    
    add_filter( 'wpmudev_vids_categories', 'wpmudev_custom_cats_list' );
    function wpmudev_custom_cats_list( $cats ) {
    	global $video_list;
    	if ( is_array( $cats ) ) {
            //your-custom-category is your category ID, and this must be unique too
    //the Category Name, you will need to update this value to your category
    		$cats['your-custom-category'] = array(
    			'name' => 'Category Name',
    			'list' => array_keys( $video_list )
    		);
    	} else {
    		$vid = isset( $_GET['vid'] ) ? $_GET['vid'] : 0;
    		if ( $vid == 0 ) {
    			return $cats;
    		}
    
    		if ( isset( $video_list[ $vid ] ) ) {
    			$new_url = $vids[ $vid ];
    			$cats = '<iframe style="display:block;margin:0 auto;box-shadow:30px 0 50px -30px #222, -30px 0 50px -30px #222;"
    							        src="' . $new_url . '" frameborder="0" width="600"
    							        height="338" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
    		}
    	}
    
    	return $cats;
    }

    Please note that, you will need to update the values to make it works properly. Please check my commend inside the code :slight_smile:

    If you have any additional issues, please let us know and we'll be happy to help.

    Best regards,
    Hoang

  • Steve

    Hi Hoang, getting closer! The video is added to the list, but there are still a few issues preventing it from playing.

    1. http://i.imgur.com/17eZp7Y.png
    The video is labelled using the video path. I guess using the video ID would be better if there's a way to insert a proper title that would be best.

    2. http://i.imgur.com/l66IK5I.png
    The video doesn't play, from the source it looks like it's not looking for the video locally.

    <iframe style="display:block;margin:0 auto;box-shadow:30px 0 50px -30px #222, -30px 0 50px -30px #222;" src="https://premium.wpmudev.org/video/exporting-entries-from-ecpbuilder?autoplay=1" frameborder="0" width="600" height="338" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

  • Micha

    Guys... can't you see how convoluted this is? I would bet that almost all of your customers are your customers because they don't have the coding knowledge to do things like this. Yet, when presented with a problem, you just give us code.

    Also, while I can manage some code myself, the reason I want this feature is so that my support staff can produce, add, change, and remove custom videos as needed based on the site's requirements. How's that going to work?

    The original solution asked for was for you, WMPU, to add a function so that your users can add custom videos in the backend without coding. I even gave an example of another video training solution that does it.

    After further research, there are a few more out there that have this same feature too. This is because so many sites will have some custom things developed into it whether a custom post type, eCommerce, events system, etc. And we NEED to be able to add videos for our client in an easy way.

    Please stop all this back and forth with try this and try that. Instead, just develop this feature that all of your competition already has built into it, and for a good reason, and allow us to manage our websites in a more easy fashion.

    After all, that is what a software/development company is all about right? Making your customers lives easier through software?

    Sorry for the long rant, but this is just bugging me too much not to say something.

    Thanks,
    Micha

  • Hoang Ngo

    @Steve,

    Can you please send me your currently code? I would like to take a look

    @Micha,
    I'm sorry you feel that way , and I can understand the frustrating. Unfortunately, the feature currently now out of the box, so I will move this thread to Feature & Request section, so the lead developer will get noticed, and he can consider for this feature.

    In the meantime, can you please send me your URLs, categories, video names and how it should be structured. I will implement the code to your site, make sure everything works properly, and then inform you.

    I'm sorry for this inconvenience, and many thanks for your patience.

    Best regards,
    Hoang

  • Micha

    Hey. That's a great offer and I much appreciate that. You support has always been top notch and that's one of the main reasons I'm a customer.

    That said, my reasoning for insisting on this, is because this project will most likely require a fair amount of updating these videos over time. Because of this, it would be much easier if this feature was implemented.

    Thank your for giving this attention and bringing it up the ladder.

    Micha

  • Steve

    @Hoang, this is my code:

    $video_list = array(
    	'exporting-entries-from-ecpbuilder' => '/wp-content/uploads/2015/08/Exporting-Form-entries.mp4',
    	//'https://dl.dropboxusercontent.com/u/67178/Exporting%20Form%20entries%20from%20Ecpbuilder.m4v' => 'exporting-entries-from-ecpbuilder',
    );
    
    //add_filter( 'wpmudev_vids_list', 'wpmudev_custom_vids_list' );
    function wpmudev_custom_vids_list( $list ) {
    	global $video_list;
    	$list = array_merge( $list, $video_list );
    
    	return $list;
    }
    
    //add_filter( 'wpmudev_vids_categories', 'wpmudev_custom_cats_list' );
    function wpmudev_custom_cats_list( $cats ) {
    	global $video_list;
    	if ( is_array( $cats ) ) {
            //your-custom-category is your category ID, and this must be unique too
    //the Category Name, you will need to update this value to your category
    		$cats['forms'] = array(
    			'name' => 'Forms',
    			'list' => array_keys( $video_list )
    		);
    	} else {
    		$vid = isset( $_GET['vid'] ) ? $_GET['vid'] : 0;
    		if ( $vid == 0 ) {
    			return $cats;
    		}
    
    		if ( isset( $video_list[ $vid ] ) ) {
    			$new_url = $vids[ $vid ];
    			$cats = '<iframe style="display:block;margin:0 auto;box-shadow:30px 0 50px -30px #222, -30px 0 50px -30px #222;"
    							        src="' . $new_url . '" frameborder="0" width="600"
    							        height="338" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
    		}
    	}
    
    	return $cats;
    }
  • Tom

    Hi Guys,
    I just read through this thread, I too would really like this feature implemented into one of WPMUDEV's Excellent array of plugins. I've also seen WP101's plugin which seems great (apart from the price tag) One of the excellent WPMUDEV's Selling points is its extra themes + plugin resources on top of the excellent support. So like Micha has put making an easy to use interface (even some kind of temporary workaround Add-on to the existing plugin to run in beta mode - on site owner's risk) until a fully resolved version can be released would be highly appreciated.

    Thanks

    Tom

  • Tom

    Hi Micha,
    Wow 50 sites is alot :slight_smile: Are they all doing similar things or is the plugin just to help out the site users ?
    If all owned by you perhaps Multi-site might be useful for you to look into. that way you could perhaps manage and implement it once and it could be applied to all. (might save you some time)

    (im still want to see the easy to use interface for the plugin wpmudev I can see others are also keen on this feature, perhaps a temporary beta version could be developed for us?)

    Thanks
    Tom

  • Micha

    Yeah... I'm rounding, but it's a lot. They're all pretty different unfortunately, which is why adding a custom video or two into the mix of these videos is so important to me.

    I do have a couple multi-sites in addition to that so, I'm fully aware of the benefits of multi-sites.

    However, there's reasons why these aren't multi-sites, the biggest being simply features and performance. Several of these sites are heavily customized and we just don't feel a multi-stir is the right choice.

    Anyways, that does bring up an interesting point though about this plug and multi-sites and it's something I haven't yet considered. If the feature was added to the plugin to allow custom videos, would that function for the entire network? Or would there be additional controls to allow the added videos to be enabled on a per site basis so that some users could see video X and others video Y for example.

    Not saying this has to be done, and I don't need that, but someone may.

    Thanks
    Micha

  • Hoang Ngo

    Hi @Steve,

    I hope you are well today.

    Here is the updated code, can you please try?

    $video_list = array(
    	'exporting-entries-from-ecpbuilder' => array(
    		'name' => 'NAME',
    		'url'  => '/wp-content/uploads/2015/08/Exporting-Form-entries.mp4'
    	),
    	//'https://dl.dropboxusercontent.com/u/67178/Exporting%20Form%20entries%20from%20Ecpbuilder.m4v' => 'exporting-entries-from-ecpbuilder',
    );
    
    add_filter( 'wpmudev_vids_list', 'wpmudev_custom_vids_list' );
    function wpmudev_custom_vids_list( $list ) {
    	global $video_list;
    	$my_list = array();
    	foreach ( $video_list as $k => $v ) {
    		$my_list[ $k ] = $v['name'];
    	}
    	$list = array_merge( $list, $my_list );
    
    	return $list;
    }
    
    add_filter( 'wpmudev_vids_categories', 'wpmudev_custom_cats_list' );
    function wpmudev_custom_cats_list( $cats ) {
    	global $video_list;
    	if ( is_array( $cats ) ) {
    		//your-custom-category is your category ID, and this must be unique too
    //the Category Name, you will need to update this value to your category
    		$cats['your-custom-category'] = array(
    			'name' => 'Category Name',
    			'list' => array_keys( $video_list )
    		);
    	} else {
    		$vid = isset( $_GET['vid'] ) ? $_GET['vid'] : 0;
    		if ( $vid === 0 ) {
    			return $cats;
    		}
    		$vids = array();
    		foreach ( $video_list as $k => $v ) {
    			$vids[ $k ] = $v['url'];
    		}
    		if ( isset( $vids[ $vid ] ) ) {
    			$new_url = $vids[ $vid ];
    			$cats    = '<iframe style="display:block;margin:0 auto;box-shadow:30px 0 50px -30px #222, -30px 0 50px -30px #222;"
    							        src="' . $new_url . '" frameborder="0" width="600"
    							        height="338" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
    		}
    	}
    
    	return $cats;
    }

    Best regards,
    Hoang