Autojoin at group creation

Hello,

Trying to modify the module group in order to get the creator of a group to automatically join the groups he created, we used the function actionJoin($iEntryId, $iProfileId)... but we're about to give up :/

Do you have a clue to do it? There is no previous post on the forum about it and the documentation (boonex.com/doc) is not enough for us.

Thank you in advance

Quote · 26 Aug 2013

Yes, I could not understand this bit myself.  The person which created the group, and is the admin of the group, has to join the group that he/she created.  This should be changed and hopefully AlexT, or others that can create a ticket, will come in and mark this as a "bug" that needs fixing in the next release.

Geeks, making the world a better place
Quote · 26 Aug 2013

Thank you for the information! Indeed, a ticket could be a good way. But, right now, does anyone have a tip or a hack to do it? In advance thank again.

Quote · 26 Aug 2013

You need to copy the onEventCreate function from inc/classes/BxDolTwigModule.php and place it in modules/boonex/groups/classes/BxGroupsModule.php then add the line of code as shown below :

 

    function onEventCreate ($iEntryId, $sStatus, $aDataEntry = array())
    {
        if ('approved' == $sStatus) {
            $this->reparseTags ($iEntryId);
            $this->reparseCategories ($iEntryId);
        }

    $this->_oDb->joinEntry($iEntryId, $this->_iProfileId, true);

        if (BxDolModule::getInstance('BxWmapModule'))
            BxDolService::call('wmap', 'response_entry_add', array($this->_oConfig->getUri(), $iEntryId));

        $this->_oDb->createForum ($aDataEntry, $this->_oDb->getProfileNickNameById($this->_iProfileId));
        $oAlert = new BxDolAlerts($this->_sPrefix, 'add', $iEntryId, $this->_iProfileId, array('Status' => $sStatus));
        $oAlert->alert();
    }

 

This is just one of the many improvements I added in the Premium Groups mod.

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 26 Aug 2013

Thank you very much Laughing It just works perfectly !!!

Quote · 26 Aug 2013
 
 
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.