BuddyDev

Search

[Resolved] MediaPress Plugin – How Do I Stop Video Uploads?

Tagged: ,

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #23522

    Hi Propertytips,
    Thank you for confirming.

    TO enable it for some media type and not others? Yes, it is doable via filter but that won’t work on activity screen.

    Please allow me to keep this for our major version. We are committing to next phase of MediaPress from August and I am making a list of things to do. I will be adding it too.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 42
    Propertytips on #23580

    Hi Brajesh,

    Thanks for all your help… Will wait till august as suggested

    Kind Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #23588

    Thank you.

  • Participant
    Level: Enlightened
    Posts: 42
    Propertytips on #27154

    Hi Brajesh,

    Season Greetings!!!

    Any update on this please.

  • Participant
    Level: Enlightened
    Posts: 42
    Propertytips on #27155

    Would be great if you can give me a code to temporarily filter out the video uploads for now…. so that I can allow my users to upload images but no videos (except video links). I don’t mind if it will not work on the activity screen for now.

    kind Regards

  • Participant
    Level: Enlightened
    Posts: 42
    Propertytips on #27270
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #27291

    Hi Propertytips,
    I am sorry to have kept you waiting for this.

    1. Please apply one line change to your current MediaPress as shown here
    https://github.com/buddydev/mediapress/commit/164e649deabffe963ab76d2dd93aa7653779751f

    2. Please put this code in your bp-custom.php or theme’s functions.php

    
    
    add_filter( 'mpp_file_upload_enabled', function ( $enabled, $context ) {
    
    	if ( 'gallery' !== $context ) {
    		return $enabled;
    	}
    
    	$gallery = mpp_get_gallery();
    	if ( $gallery && 'video' === $gallery->type ) {
    		$enabled = false;
    	}
    
    	return $enabled;
    }, 10, 2 );
    
    

    That will make sure that only links can be added for video gallery.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 42
    Propertytips on #27292

    Hi Brajesh,

    Thank you so much… the code works brilliantly

    Looking forward to the next update. I would suggest you make this a standard feature of the mediapress plugin as it takes mediapress to another level… Absolutely love it!!

    Kind Regards,

    Propertytips

  • Participant
    Level: Enlightened
    Posts: 42
    Propertytips on #27293

    Hi Brajesh,

    Just for other users who might be looking for the same solution:

    The problem with the activity tab not having upload links for videos and images can be resolved with your new plugin (activity plus reloaded) located here https://buddydev.com/plugins/bp-activity-plus-reloaded/

    Kind Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #27303

    Hi Propertytips,
    Thank you.

    I am glad that it worked.

    Thank you for sharing for others. It will certainly help.

    Regards
    Brajesh

The topic ‘ [Resolved] MediaPress Plugin – How Do I Stop Video Uploads?’ is closed to new replies.

This topic is: resolved