Creating automatic photo albums on joining

Is there anyway of creating two photo albums when a member first joins the site or as they click to upload there first photo(s). Not avatars.


The first one as a private one (friends ONLY)

and the other for all members of the site to see

I'm really not to sure where to start looking to do this, so any help would be great, this would then stop the need for people creating a album which just contains 3 (or so) photos.

 

Many Thanks in advance!

 

Quote · 24 Apr 2014

Find "Dolphin root/modules/boonex/photos/classes/BxPhotosPageAlbumsMy.php" file. Paste the following code in a class constructor after line 106:

//2nd album
$sCaption = getUsername($this->iOwnerId) . 'album_friends');
$aOwnerDefAlbumInfo = $this->oAlbum->getAlbumInfo(array('fileUri'=>uriFilter($sCaption), 'owner'=>$this->iOwnerId));

        

if (!is_array($aOwnerDefAlbumInfo) || empty($aOwnerDefAlbumInfo)) {
            $aData = array(
                'caption' => $sCaption,
                'location' => _t('_bx_' . $this->oConfig->getUri() . '_undefined'),
                'owner' => $this->iOwnerId,
                'AllowAlbumView' => BX_DOL_PG_FRIENDS,
            );
            $this->oAlbum->addAlbum($aData, false);
}//created

 

Set your name for a photo album instead of mine highlighted in red. Now you will see 2 default albums for all members.

Free and premium Dolphin templates. Custom design services.
Quote · 26 Apr 2014

I've put it in but it didn't seem to work         


  $this->oAlbum->addAlbum($aData, false);   THIS LINES ALREADY HERE

        }

 

                       }

                                 //2nd album

                                 $sCaption = getUsername($this->iOwnerId) . 'pvt_album');

                                 $aOwnerDefAlbumInfo = $this->oAlbum->getAlbumInfo(array('fileUri'=>uriFilter($sCaption), 'owner'=>$this->iOwnerId));

 

 

                                 if (!is_array($aOwnerDefAlbumInfo) || empty($aOwnerDefAlbumInfo)) {

                                 $aData = array(

                                 'caption' => $sCaption,

                                 'location' => _t('_bx_' . $this->oConfig->getUri() . '_undefined'),

                                 'owner' => $this->iOwnerId,

                                 'AllowAlbumView' => BX_DOL_PG_FRIENDS,

                  );

                                 $this->oAlbum->addAlbum($aData, false);

                                 }//created

 

    }

 

    function getViewLevel() THIS LINES ALREADY HERE

Quote · 27 Apr 2014

You have put it wrong, there is no second closing brace before my code. Place it like I have done below:

            $this->oAlbum->addAlbum($aData, false);
        }

//2nd album
$sCaption = getUsername($this->iOwnerId) . 'album_friends');
$aOwnerDefAlbumInfo = $this->oAlbum->getAlbumInfo(array('fileUri'=>uriFilter($sCaption), 'owner'=>$this->iOwnerId));

        

   if (!is_array($aOwnerDefAlbumInfo) || empty($aOwnerDefAlbumInfo)) {
               $aData = array(
                   'caption' => $sCaption,
                   'location' => _t('_bx_' . $this->oConfig->getUri() . '_undefined'),
                   'owner' => $this->iOwnerId,
                   'AllowAlbumView' => BX_DOL_PG_FRIENDS,
               );
               $this->oAlbum->addAlbum($aData, false);
      }//created
}

    function getViewLevel()

Free and premium Dolphin templates. Custom design services.
Quote · 27 Apr 2014

Me and a friend have looked over this and it doesn't work for either of us Frown

 

I've attached the file if you could have a look over it

BxPhotosPageAlbumsMy.php · 27.6K · 272 downloads
Quote · 27 Apr 2014
 
 
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.