Replies
- Brajesh Singh on September 5, 2015 at 6:33 pm in reply to: [Resolved] Setting Privacy in MediaPress #379
Hi Milo,
Thank you and welcome to the Premium Club.
I have sent you a Pm with my email. Let us get in touch.Marking this topic as resolved.
Thank you
Brajesh - Brajesh Singh on September 5, 2015 at 8:14 am in reply to: [Resolved] Setting Privacy in MediaPress #376
Hi Milo,
I have fixed it.
I went slightly different path.When a media is uploaded to Wall gallery, we check if the status of wall gallery is valid. If it is valid, we let the media upload. If the status is invalid( caused by unchecking etc), we set the current default status as wall gallery status and allow media to be uploaded. That fixes our issue.
Here is reference to the fix
https://github.com/buddydev/mediapress/commit/21e9782c3623b486f5865b16704c7baa2cd8b192Thank you
Brajesh - Brajesh Singh on September 5, 2015 at 8:12 am in reply to: [Resolved] mpp_register_media_size – image orientation #375
Hi,
Have fixed it here
https://github.com/buddydev/mediapress/commit/557e932ad2abe47450b3f13b128e2d27342b08de
Hope that helps. - Brajesh Singh on September 4, 2015 at 2:11 pm in reply to: [Resolved] Setting Privacy in MediaPress #373
Hi Milo,
I checked it. It is a side effect of the wall gallery being first public and then private.
Here is what is happening:-1. When your default privacy is public and you upload from activity a gallery is created with current default privacy( ‘public’) and set as wall gallery. We stored the id of this gallery in user meta to make it easier for future access.
Now, when you uncheck public, any public gallery will not be visible/available in the front end. Still when you upload, the script is just using that gallery id and moving the media to that public gallery.
Since the gallery is not visible publicly, the single link does not work from activity.
It is certainly a bug. Now, we have 2 ways to handle it:-
1.When uploading from activity, check if a wall gallery exists? If the status of wall gallery is not same as current default status, change the wall gallery status to current default status and move media to this gallery with the current status. Any old media inside the gallery will sustain their old status.
2. Or we check for the current status, if the wall gallery status is not same as the current status, we create a new gallery with current status and set it as wall gallery and move media here.
Which strategy is better? I am inclined towards the first one. Please let me know and I will have it in today’s update.
- Brajesh Singh on September 4, 2015 at 1:53 pm in reply to: [Resolved] Setting Privacy in MediaPress #372
Hi Milo,
I am looking at it right now. Will have an update about it soon. - Brajesh Singh on September 4, 2015 at 10:25 am in reply to: [Resolved] mpp_register_media_size – image orientation #371
Thank you.
I will push it tonight Indian time with 2 other changes. - Brajesh Singh on September 3, 2015 at 11:02 pm in reply to: [Resolved] Make Buddypress Community Private #365
Hi Jay,
I am sorry, I overlooked the homepage exclusion. I have updated the code below. Please update and check if this works./** * Make a site Private, works with/Withouthg BuddyPress * * @author sbrajesh * @global string $pagenow * */ function buddydev_private_site() { //first exclude the wp-login.php //register //activate global $pagenow; //do not restrict logged in users if( is_user_logged_in() ) { return ; } //if we are here, the user is not logged in, so let us check for exclusion //we selectively exclude pages from the list //are we on login page? if( $pagenow == 'wp-login.php' ) { return ; } //let us exclude the home page if( is_front_page() ) { return ; } $exclude_pages = array( 'register', 'activate', 'alphabeta', 'groups', 'members' );//add the slugs here //is it one of the excluded pages, if yes, we just return and don't care if( is_page( $exclude_pages ) ) { return ; } $redirect_url = wp_login_url( site_url('/') );//get login url, wp_safe_redirect( $redirect_url ); exit( 0 ); } add_action( 'template_redirect', 'buddydev_private_site', 0 );
Thank you
Brajesh - Brajesh Singh on September 3, 2015 at 10:38 pm in reply to: [Resolved] mpp_register_media_size – image orientation #363
Hi Aleksandar,
It is definitely the “JPEG Rotation and EXIF Orientation” issue. We haven’t put any mechanism to check for that and relay on default WordPress implementation( which suffers from same if I remember correctly).I will put a fix for the rotation by in tomorrow’s update.
Thank you
Brajesh Hi Milo,
Thank you for the reply and showing it with the image.1. I agree that the current comment in the activity stream is not good, It needs to have context. I will commit this change in 24 hours to include the referenced media( think about facebook share with comment )
The current architecture makes each new top level comment independent, and this is by design. It helps us to resolve many issues.
The thing is all media upload action may not be available as activity. Also, we have to differentiate between gallery activity( say multiple uploads ) and single media activity.
We had given enough thought to create a top level activity and associate it with a media, then add each comment as it’s child. The problem is we need to create an extra activity( hopefully hidden that acts as the parent activity of an uploaded media if the media was not published to the activity stream). It causes other complications deletion and keeping log. We are using Media activity as log( you will see more of it when a few addons come ).
The best possible solution without sacrificing any performance is to list the comment as it is now but include the parent Media in the comment content
Something like:-
Xyz commented on abc's photo {image}
Any comment on this comment will behave normally( be listed as child comments under parent). The issue is only with top level comments. Do you think that will be good enough for your use?
About Privacy: Please open a new topic and make to to let me know if you are setting privacy in the activity privacy plugin or it is about MediaPress privacy.
Thank you
Brajesh- Brajesh Singh on September 3, 2015 at 8:48 pm in reply to: [Resolved] Make Buddypress Community Private #360
Hi Jay,
Thank you.
Please find the code below.you can put the code in your bp-custom.php or your theme’s functions.php (I will prefer bp-custom.php )
/** * Make a site Private, works with/Withouthg BuddyPress * * @author sbrajesh * @global string $pagenow * */ function buddydev_private_site() { //first exclude the wp-login.php //register //activate global $pagenow; //do not restrict logged in users if( is_user_logged_in() ) { return ; } //if we are here, the user is not logged in, so let us check for exclusion //we selectively exclude pages from the list //are we on login page? if( $pagenow == 'wp-login.php' ) { return ; } $exclude_pages = array( 'register', 'activate', 'alphabeta' );//add the slugs here //is it one of the excluded pages, if yes, we just return and don't care if( is_page( $exclude_pages ) ) { return ; } $redirect_url = wp_login_url( site_url('/') );//get login url, wp_safe_redirect( $redirect_url ); exit( 0 ); } add_action( 'template_redirect', 'buddydev_private_site', 0 );
You can exclude any page by using the slug, It will work irrespective of the fact that BuddyPress may or may not be active.
Please do check and let me know if that worked for you or not?