BuddyDev

Search

Get a cover image automatically for a video like YouTube

Tagged: ,

  • Participant
    Level: Enlightened
    Posts: 35
    Kir on #25363

    Thanks, can I ask a question, if I wanted to remove the video drop from the form in the activity where you upload a video, leaving only the link field in the form, where would I find this / edit?

    Is it in here: mediapress/templates/mediapress/default/buddypress/activity

    I’ve had a look around but can see anything obvious to remove that (although it’s late here!) – I want to remove the bit that says ‘drop video here’ with the select files button.

    Thanks Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #25364

    Please visit Dashboard->MediaPress->settings and you can disable

    “Enable uploading files?” setting it to no will disable uploads but keep the links.

    PS:- it disables for all file types.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 35
    Kir on #25369

    Hi, ah okay – thanks but I’d rather override the template in child if possible, which file is the right one to edit that box out just for video files please?
    Thanks 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #25398

    Hi Kir,
    Sure.
    You can copy it from here

    
    wp-content/plugins/mediapress/templates/mediapress/default/gallery/manage/upload-form.php
    

    and put it in

    
    wp-content/yourtheme(replace it)/mediapress/default/gallery/manage/upload-form.php
    
    

    You will note a function

    
    mpp_upload_dropzone()
    
    

    there. Please comment it out and it will go away form gallery uploads.

    For activity, we don’t have a template override(an oversight on my part, fixing in next update). For now, you will need to modify this function

    
    mpp_activity_dropzone()
    

    to get rid of the dropzone.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 35
    Kir on #25410

    Hi thank you Brajesh, I removed that function from the template starting from here to here:

    ‘ <!–<?php
    }
    // Add to activity post form.
    add_action( ‘bp_after_activity_post_form’, ‘mpp_activity_upload_buttons’ );

    /**
    * Add dropzone/feedback/uploaded media list for activity
    */
    function mpp_activity_dropzone() {
    ?>
    <div class=”mpp-media-upload-container”><!– mediapress upload container –>

    <!– append uploaded media here –>–>
    <!– <div id=”mpp-uploaded-media-list-activity” class=”mpp-uploading-media-list”>

      </div>
      <?php do_action( ‘mpp_after_activity_upload_medialist’ ); ?>

      <?php if ( mpp_is_file_upload_enabled( ‘activity’ ) ): ?>
      <!– drop files here for uploading –>
      <!– <?php mpp_upload_dropzone( ‘activity’ ); ?>
      <?php do_action( ‘mpp_after_activity_upload_dropzone’ ); ?>
      <!– show any feedback here –>
      <!–<div id=”mpp-upload-feedback-activity” class=”mpp-feedback”>

        </div>
        <?php endif; ?>
        <input type=’hidden’ name=’mpp-context’ class=’mpp-context’ value=”activity”/>
        <?php do_action( ‘mpp_after_activity_upload_feedback’ ); ?>–>’

        …and then added mpp-activity-template.php to my active theme (a child theme) here:

        /wp-content/themes/my-theme/mediapress/modules/buddypress/activity

        But I can’t get it working. Am I taking the wrong approach?

        If so please tell me how to use the below function to remove the dropzone.

        mpp_activity_dropzone()

        Thanks Brajesh

      • Keymaster
        (BuddyDev Team)
        Posts: 24706
        Brajesh Singh on #25416

        Please do not change the whole function. Just comment one line out.

        From the original

        
        <?php mpp_upload_dropzone('activity');?>
        

        to

        
        
        <?php //mpp_upload_dropzone('activity'); ?>
        
        

        That should do it.

        Regards
        Brajesh

      • Participant
        Level: Enlightened
        Posts: 35
        Kir on #25745
        This reply has been marked as private.

      You must be logged in to reply to this topic.

      This topic is: not resolved