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

    (@opajaap)

    We do not have that feature yet.

    Thread Starter daniish

    (@daniish)

    Could i achieve this feature using tags or perhaps by adding an extra Status: Private?

    …maybe then it would be possible to script for it. Alternatively, can you suggest any way that i could achieve this?

    Many thanks

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I can add status ‘private’ in the next version if you like. This will take only a few days, a week max. ok?

    Thread Starter daniish

    (@daniish)

    That’s great!

    Thank you ??

    Thread Starter daniish

    (@daniish)

    That’s great!

    Thank you ??

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Got it working and under test already…

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Fixed 6.1.10

    Thread Starter daniish

    (@daniish)

    Thanks Jacob.

    ..i need to ask for help with a conditional statement that only displays photos with a Private status if the user is logged.

    Can you tell me the PHP code for Status: Private

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You could do something like this:

    <?php
    global $wpdb;
    $photos = $wpdb->get_results( "SELECT * FROM ".WPPA_PHOTOS." WHERE status = 'private' ", ARRAY_A );
    if ( $photos ) foreach ( $photos as $photo ) {
    echo wppa_get_thumb_default( $photo['id'] );
    }
    ?>

    to display thumnails of all private photos.

    But, don’t you prefer a virtual album type for shortcodes like:

    [wppa type="..." album="#status,private"][/wppa]

    I could make this in approx a week or so, then it can do anything like slideshows etc.

    Thread Starter daniish

    (@daniish)

    OK at this point i’m not really sure which approach is most appropriate, so i thought i would just try to clarify what i’m after by way of example:

    This post (https://www.globexposure.net/wales/?p=159) has an album attached to it with 11 photos – 5 of these are Private.

    So when a logged user visits this page they see an album with 11 photos.
    But when a user who is not logged-in visits this page they see the same album but with just 6 photos.

    In reality there may be 10 different albums and i want to keep the photos in the albums that i have created and not amalgamate them into a single private or public virtual album.

    With this in mind, which solution do you think will best meet these requirements?

    Many thanks

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    What is exacly what you want to see? Do you want to see only the 5 private in the album of 11 when you are logged in and not the 6 ‘normal’?

    Thread Starter daniish

    (@daniish)

    When logged in you should see all the photos – in this case all 11.

    Logged-out users would just see the 6 normal photos.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    That should work now. You can have photos with status ‘publish’ and ‘private’ together in any album.

    Thread Starter daniish

    (@daniish)

    That’s brilliant Jacob.

    Thank you for all your hard work.

    Thank you so much!!!!!!!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Private Photos Viewable by Logged Users Only’ is closed to new replies.