BuddyDev

Search

Change behaviour inside the lightbox

  • Participant
    Level: Initiated
    Posts: 10
    elias on #26065

    Hi there,

    Thanks a lot for the plugin!

    Currently when a user upload a photo and opens it she see the Lightbox. Then if she click on the photo inside the lightbox she would see a dedicated page for that photo. We don’t want that because we don’t want users to leave a buddypress group.

    Can we disable that second click? I mean once the lightbox opens and the user click on the photo once again she shouldn’t see anything

  • Participant
    Level: Initiated
    Posts: 10
    elias on #26066

    Also can you please tell me how to disable the lightbox and redirect traffic directly to a file itself? For example if the file is .jpeg then open a page with the .jpeg file directly?

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #26091

    Hi elias ,
    Welcome to BuddyDev.

    Please visit Dashboard->MediaPress->settings->Theming
    Please adjust the lightbox settings there(enable/disable etc).

    Currently, we do not have the option to link to media.

    If you want to do it, you will need to override a template file? Please let me know if you are comfortable with that and I will share how to do it.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 10
    elias on #26092

    Thanks, Brajesh, please give me the code so I can put it in the functions.php

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #26093

    Hi,
    Please copy plugin/mediapress/templates/mediapress/default/buddypress/activity/views/grid-photo.php to
    Your theme/mediapress/default/buddypress/activity/views/grid-photo.php

    Now, you will see somethin like this

    
    <a href="<?php mpp_media_permalink(); ?>"
    

    change the

    
    <?php mpp_media_permalink(); ?>
    

    with

    
    <?php mpp_media_src( 'original' ); ?>
    

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 10
    elias on #26094

    Thanks, Brajesh!

    Sorry, do I need to put grid-photo.php to the /MYSITE/wp-content/themes/MYTHEME/mediapress/default/buddypress/activity/views/grid-photo.php ?

    If yes I assume I need to create all this folders myself (/mediapress/default/buddypress/activity/views/) ?

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #26095

    Yes, you are right.

    you will need to create these folders in your currently active theme.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved