• Resolved treefarm32

    (@treefarm32)


    Hi,

    For the front end uploader I was wondering how to make it so you don’t have to click the upload link to show the div layer with the upload controls. This would eliminate a step when using the uploader embed in a page using the short code.

    <div id=”wppa-file–1″ class=”wppa-file-1″ style=”width: 637px; text-align: center; display: none; clear: both;”>

    The link changes the above display value to block but not sure where with code is stored.

    Thanks,

    https://www.ads-software.com/plugins/wp-photo-album-plus/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I assume you do this with a shortcode?

    Use the TEXT editor, NOT the VISUAL editor to change the shortcode:

    [wppa type="upload"][/wppa]

    into:

    [wppa typ"upload"][/wppa]
    <script type="text/javascript" >
    jQuery( '#wppa-file--1' ).css( 'display', 'block' );	// Open the Upload form
    jQuery( '#wppa-up--1' ).css( 'display', 'none' );	// Hide the Upload link
    </script>

    Mote: the 1 is for the sequence number of the shortcode on the page, if it would be the second wppa shortcode, it would read ‘#wppa-file–2’ and ‘#wppa-up–2’ etc.

    Thread Starter treefarm32

    (@treefarm32)

    Yep that’s exactly what I was looking for. Thanks!!

    Thanks for this tip ! I just tried and completed with all the content of the upload onclick function.
    As I’m a bit more violent in my code, I use this :

    <script type="text/javascript" >
    jQuery(function($){
           $( document ).ready(function() {
            $( '[id^=wppa-file-]' ).css( 'display','block' );
            $( '[id^=wppa-up-]' ).css( 'display','none' );
            $( '[id^=wppa-cr-]' ).css( 'display','none' );
            $( '[id^=wppa-ea-]' ).css( 'display','none' );
            $( '[id^=wppa-cats-]' ).css( 'display','none' );
            $( '[id^=_wppa-up-]' ).css( 'display','none' );
            _wppaDoAutocol( 2 );
          });
    })
    </script>

    I disabled the ‘close’ button because my upload shortcode is called in a modal div, so I don’t need 2 ‘close’ buttons.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Front End Uploader – Show Div Box By Default’ is closed to new replies.