BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25174
    Brajesh Singh on in reply to: [Resolved] BP Activity Shortcode CSS #2697

    You are most welcome. Marking it as resolved 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25174
    Brajesh Singh on in reply to: [Resolved] BP Activity Shortcode CSS #2693

    Hi Aaron,
    Thank you for the post and using Activity Shortcode plugin. I am glad you found it useful.

    I see that you are using Buddy theme. All you need is applying the white background here.

    In case of Buddy theme, you will need to wrap the shortcode inside padder div like below.

    
    <div class='padder'>
    [activity-stream ]
    </div>
    
    

    to make it look like the normal site element.

    Please visit Edit Page and click on “text” in the editor tab and there you can enter the code.

    Please let me know if that works for you or not?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25174
    Brajesh Singh on in reply to: Mediapress Galleries not showing up on Gallery page #2692

    Hi ngoegan,
    Thank you for using MediaPress. I am sorry for for the inconveniences.

    Can you please visit MediaPress->settings and tell me if you have saved the settings atleast once. Also, What is the default privacy set?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25174
    Brajesh Singh on in reply to: [Resolved] BP Autologin on Activation #2686

    Hi Jon,
    I am sorry for the inconvenience but this plugin does not send any email. The email is sent by BuddyPress.
    Please take a look here
    https://github.com/sbrajesh/bp-auto-login-on-activation/blob/master/bp-autologin-on-activation.php

    and you will see we do not send any emails.

  • Keymaster
    (BuddyDev Team)
    Posts: 25174

    Hi Piotr,
    Thank you. I see it better now. It is the directory page that you are trying to modify.

    1. If possible, I will advise to revert the old changes as that will affect the User profile Galleries listing too. We should not do that.

    2. Now, since it is directory page, we have two options

    a) Override the gallery directory template.

    b) or Create a custom page template and use that

    Let us see how it works for (a)

    Step 1: Copy mediapress/templates/mediapress/default/buddypress/directory/index.php to yourtheme(orchildtheme)/mediapress/default/buddypress/directory/index.php

    Step 2:- Let us create a file called photo-loop.php in the same directory and paste the code from my previous reply

    Step 3: Change this line

    
    			<?php
    				mpp_get_template( 'gallery/loop-gallery.php' );
    			?>
    

    to

    
    			<?php
    				mpp_get_template( 'buddypress/directory/loop-photo.php' );
    			?>
    

    That’s all. You can remove the unwanted links/drodowns as you deem fit.

    If you want to have both the media and gallery directory, in that case you should not use the above approach. You can use page template to do that. Let us see an example here

    Step 1:- Create a page template by copying your page.php and name that template “Media Directory”

    A page template is created by adding a meta like this to the file

    
    <?php
    /**
     * Template Name: Media Directory
     */
    ?>
    

    Now, we can open our custom page template file and where you see the code to display entry, replace that by the custom loop from my previous reply

    Step2: Visit Dashboard ->Add New Page and select that template and that’s it.

    Strategy 3:- Using shortcode to list Media
    Create/Edit a page and use the following shortcode
    [mpp-list-media type=’photo’ component=’members’ status=’public’]

    That will list all public photos from users

    Now, coming to the 2nd part of your question, is there some code to generate filter? I am sorry, but it is not present yet. I will add it in version 1.1 (Media directory is coming as part of 1.1)

  • Keymaster
    (BuddyDev Team)
    Posts: 25174

    Thank you for confirming.

    Can you please put a screenshot to show me what filters you are trying to change? I will be able to help in a better way then.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25174
    Brajesh Singh on in reply to: Understanding MediaPress Activity privacy #2676

    Hi Georges,
    Thank you. If this is the behavior then it is a deviation.
    In normal case only public media activity should be visible on activity, friendsonly and other levels should be hidden and only visible to the uploader user.

    To be honest, we are not implementing activity privacy as we believe it will come to BuddyPress sooner or later and the current schema of activity is not well designed to give fine grained control like facebook.

    What we are doing is piggybacking on the BuddyPress Activity Privacy plugin and falling back to BuddyPress behavior(like all or none).

    I am looking at it and I assure you that we will fix it soon to fallback to default BuddyPress behavior.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25174

    Hi Piotr,

    That is correct because you are not passing the component/component id.
    Try this code

    
    <?php
    $mppq = new MPP_Media_Query( array(
    	//'gallery_id' => mpp_get_current_gallery_id(),
    	'component' => 'members',
    	'component_id' => bp_displayed_user_id()
    ) );
    ?>
    <?php if(  $mppq->have_media() ): ?>
    <?php while( $mppq->have_media() ): $mppq->the_media(); ?>
    
    	<div class="mpp-u <?php mpp_media_class( mpp_get_media_grid_column_class() );?>">
    
    		<?php do_action( 'mpp_before_media_item' ); ?>
    
    		<div class='mpp-item-entry mpp-media-entry mpp-photo-entry'>
    			<a href="<?php mpp_media_src('full') ;?>" class="mpp-item-thumbnail mpp-media-thumbnail mpp-photo-thumbnail">
    				<img src="<?php mpp_media_src('thumbnail') ;?>" />
    			</a>
    		</div>
    
    		<div class="mpp-item-actions mpp-media-actions mpp-photo-actions">
    			<?php mpp_media_action_links();?>
    		</div>
    
    		<?php do_action( 'mpp_after_media_item' ); ?>
    	</div>
    
    <?php endwhile; ?>
    <?php
    	mpp_reset_media_data();
    	mpp_reset_gallery_data();
    ?>
    
    <?php endif;?>
    
    

    Here we are saying that list all the media from displayed user. Please let me know if this works for you or not?

    • This reply was modified 9 years, 8 months ago by Brajesh Singh.
    • This reply was modified 9 years, 8 months ago by Brajesh Singh. Reason: Correcting endif
  • Keymaster
    (BuddyDev Team)
    Posts: 25174

    Hi Piotr,
    the mpp_have_galleries() and mpp_have_media() work with global queries.

    What you are trying to do is create a custom loop where mpp media query may not be initilized.

    What I recommend is using custom mpp media query like this

    https://buddydev.com/mediapress/topics/api-reference/core/mpp_media_query/

    And here is the list of Media Template tags( or you can copy it from any of those loops included)
    https://buddydev.com/mediapress/guides/api-reference/template-tags/media-template-tags/

    Are you trying to override some MediaPress specific page or just create a new page to list media. There are shortcodes available too like the below
    https://buddydev.com/mediapress/topics/getting-started/shortcodes/mpp-list-media/

    That you can use.

    Hope that helps. Please do let me know if you need further help.

    Thank you
    Brajesh

    PS: Please make sure to keep the overrides in your theme.

  • Keymaster
    (BuddyDev Team)
    Posts: 25174
    Brajesh Singh on in reply to: Understanding MediaPress Activity privacy #2668

    Hi George,
    Thank you for posting.

    The BP Activity privacy plugin is not required just optional if you want to enforce the restricted activity visibility.

    Can you please let me know what type of issues you are facing at the moment?

    Thank you
    Brajesh