• Hello
    I would like to add two things
    the first is to add terms conditions before publishing a document (checkbox checkbox)
    and the second one to see the attached documents instead of uploading them to the front end
    thanks a lot

    • This topic was modified 8 years, 5 months ago by faress137.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Cavins

    (@dcavins)

    Hi @faress137-

    Regarding your first question, adding a checkbox would require validation and whatnot. It would be simpler to take the approach you see more and more these days: “If you submit a doc, you are agreeing to our terms.” This code added to my bp-custom.php file accomplishes that:

    
    add_action( 'bp_docs_closing_meta_box', function( $doc_id ) {
        ?>
        <p>I understand that by submitting this document, I am agreeing to this site's <a href="#">Terms and Conditions</a>.</p>
        <?php
    });
    

    More about bp-custom.php: https://codex.buddypress.org/themes/bp-custom-php/

    I’m not sure what your second question is. Can you restate, with more detail?

    -David

    • This reply was modified 8 years, 5 months ago by David Cavins.
    Thread Starter faress137

    (@faress137)

    thank you very much
    the second question:
    instead of downloading the document directly I would like to give the user the possibility to view it before.
    thx

    Plugin Author David Cavins

    (@dcavins)

    Ah, OK. That’s not going to be possible with the way the code is currently written. (Also, browser behavior varies and users can change the browser behavior.)

    We’ve talked about adding thumbnails for image-type attachments, but that wouldn’t help with Word docs or PDFs. So, sorry to say, I don’t have any help for that second question.

    -David

    Thread Starter faress137

    (@faress137)

    thank you David.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘accept condition checkbox & see attached docs before uploading’ is closed to new replies.