BuddyDev

Search

Mediapress fullscreen mobile images

  • Participant
    Level: Initiated
    Posts: 3
    Dan on #9290

    Doing some reading and trying a few things but not getting anywhere.

    I want images uploaded to be bigger, do I make the change here?

    // Register media sizes.
    mpp_register_media_size( array(
    ‘name’ => ‘thumbnail’,
    ‘height’ => 200,
    ‘width’ => 200,
    ‘crop’ => true,
    ‘type’ => ‘default’,
    ) );

    mpp_register_media_size( array(
    ‘name’ => ‘mid’,
    ‘height’ => 300,
    ‘width’ => 500,
    ‘crop’ => true,
    ‘type’ => ‘default’,
    ) );

    mpp_register_media_size( array(
    ‘name’ => ‘large’,
    ‘height’ => 800,
    ‘width’ => 600,
    ‘crop’ => false,
    ‘type’ => ‘default’,
    ) );

    Also tried adding this to bp-custom.php but its not working.

    <?php
    function mpp_custom_setup_custom_image_size() {

    mpp_register_media_size( array(
    ‘name’ => ‘large’,
    ‘height’ => 1000, //change it
    ‘width’ => 1000,
    ‘crop’ => false,
    ‘type’ => ‘default’// can be photo/video/audio/doc, default applies to all media type
    ) );

    }
    add_action( ‘mpp_setup_core’, ‘mpp_custom_setup_custom_image_size’ );
    ?>

    Couldn’t really find anything else. Maybe CSS?

    Dan

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #9292

    Hi Dan,
    Welcome to BuddyDev.
    You have done it correctly.

    It will use the dimensions for any future uploads resizing.

    If that does not happen, please do let me know.

    PS:-
    In case of lightbox, we are using css to resize the image. If you are having issue in lightbox, It will need some css to fix that.

  • Participant
    Level: Initiated
    Posts: 3
    Dan on #9293

    Thanks for the welcome.

    I tested with a few uploads and did not seem to work. I am using the Boss theme. Guessing I will need some CSS to fix it.

    Dan

  • Participant
    Level: Initiated
    Posts: 3
    Dan on #9295

    Not sure what css to add to boss theme I tried this and no go

    .is-mobile #buddypress .activity-list li .activity-content
    {
    margin-left: 0;
    width: 100%;
    }
    .is-mobile #buddypress #activity-stream
    {
    padding:0px;
    }

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #9304

    Hi Dan,
    Please post me a screenshot and I will have better idea. I will post the css code then.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Dan on #9308

    I tried to post and couldn’t so I used the screenshot for my profile pic. I would like photo uploads to be fullscreen. See profile pic.

    Dan

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #9320

    So, I guess you are trying to have larger image in the activity stream display?

    There are two eays to do it.

    1. Either change the size of the thumbnail from the above code(and It will resize for new)
    2. Or use a different image size(may be ‘mid’)

    For the second case, Please do teh following

    a) Copy the mediapress/templates/default/buddypress/activity/views/grid-photo.php (Please see screenshot)
    http://i.imgur.com/Yk3vXW4.png

    to Yourtheme/mediapress/default/buddypress/activity/views(as shown below)
    http://i.imgur.com/7LVKyNh.png

    Once you have done it, Please change the code

    
    			<a href="<?php mpp_media_permalink(); ?>">
    				<img src="<?php mpp_media_src( 'thumbnail' ); ?>" class='mpp-attached-media-item' data-mpp-activity-id="<?php echo $activity_id; ?>" title="<?php echo esc_attr( mpp_get_media_title() ); ?>"/>
    			</a>
    
    

    to

    
    			<a href="<?php mpp_media_permalink(); ?>">
    				<img src="<?php mpp_media_src( 'mid' ); ?>" class='mpp-attached-media-item' data-mpp-activity-id="<?php echo $activity_id; ?>" title="<?php echo esc_attr( mpp_get_media_title() ); ?>"/>
    			</a>
    

    That will do it.

    Hope that helps.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved