Private groups strange behavior

Hello,

 

I tried to create private groups on my Dolphin website. The objective would be to share files and discussions between a small group of persons.

Unfortunately, I cannot set up a group where users have to be approved by the group admin to actually see the group content (files and comments). I can only set up a group where users have to be approved to participate/publish in that group...

 

I'm not sure it is a bug or the desired behavior...  

Still, does anyone knows more about this, or maybe have a fix?

Quote · 15 May 2015

Yeah, that's a pain.

You have to go to each block in BxDolGroupsPageView.php and add the BOLD code to any block you don't want non members to be able to view.

    function getBlockCode_Photo() {
        if(!$this->_oDb->isFan((int)$this->aDataEntry['id'], $this->_oMain->_iProfileId, 1))
            return;       
        return $this->_blockPhoto ($this->_oDb->getMediaIds($this->aDataEntry['id'], 'images'), $this->aDataEntry['author_id']);
    }   

That way they cannot see this block without being a member.

http://www.mytikibar.com
Quote · 15 May 2015

Awesome Steve!

Is there a way to hide the items from listing if the group is set to private?

For example, If I set the group to totally private and user A logs in, that user still can see the twig, but says private...

 

How can I hide it?

private.PNG · 114.2K · 316 views
Quote · 15 May 2015

 

Yeah, that's a pain.

You have to go to each block in BxDolGroupsPageView.php and add the BOLD code to any block you don't want non members to be able to view.

    function getBlockCode_Photo() {
        if(!$this->_oDb->isFan((int)$this->aDataEntry['id'], $this->_oMain->_iProfileId, 1))
            return;       
        return $this->_blockPhoto ($this->_oDb->getMediaIds($this->aDataEntry['id'], 'images'), $this->aDataEntry['author_id']);
    }   

That way they cannot see this block without being a member.

 

This is a great fix, thank you Steve.

Best would really be to hide blocks in private groups only though (when "Join confirmation" is enabled), and show them for public groups (when "Join confirmation" is disabled).

If I push this fix on my working site, I'm afraid users won't undestand why they can't see the content of public groups anymore (unless they choose to JOIN the group).

Quote · 19 May 2015

That would mean you need a custom PHP block in the Groups View page.

use this code:

if($this->_oDb->isFan((int)$this->aDataEntry['id'], $this->_oMain->_iProfileId, 0))

MsgBox(_t('_GroupsYouMustBeAMember'));


Modify the language key to your liking

http://www.mytikibar.com
Quote · 19 May 2015

Great addition, thanks again for your help.

Quote · 20 May 2015

thank you for this

Quote · 26 Jan 2020

thank you for this

Quote · 26 Jan 2020
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.