RomanL 8 lat temu
rodzic
commit
c46a506bb6

+ 2 - 0
inc/classes/BxDol.php

@@ -171,6 +171,7 @@ interface iBxDolProfile
     public function hasImage();
     public function getPicture();
     public function getAvatar();
+	public function getCover();
     public function getThumb();
     public function getIcon();
     public function getIconModule();
@@ -199,6 +200,7 @@ interface iBxDolProfileService
     public function serviceProfileUnit ($iContentId);
     public function serviceProfilePicture ($iContentId);
     public function serviceProfileAvatar ($iContentId);
+	public function serviceProfileCover ($iContentId); 
     public function serviceProfileThumb ($iContentId);
     public function serviceProfileIcon ($iContentId);
     public function serviceProfileName ($iContentId);

+ 9 - 0
inc/classes/BxDolProfile.php

@@ -265,6 +265,15 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
         $aInfo = $this->getInfo($iProfileId);
         return BxDolService::call($aInfo['type'], 'profile_avatar', array($aInfo['content_id']));
     }
+	
+	/**
+     * Get cover url
+     */
+    public function getCover($iProfileId = 0)
+    {
+        $aInfo = $this->getInfo($iProfileId);
+        return BxDolService::call($aInfo['type'], 'profile_cover', array($aInfo['content_id']));
+    }
 
     /**
      * Get thumbnail url

+ 8 - 0
inc/classes/BxDolProfileUndefined.php

@@ -110,6 +110,14 @@ class BxDolProfileUndefined extends BxDolFactory implements iBxDolSingleton, iBx
     {
         return BxDolTemplate::getInstance()->getImageUrl('account-avatar.png');
     }
+	
+	/**
+     * Get profile cover
+     */
+    public function getCover()
+    {
+       return BxDolTemplate::getInstance()->getImageUrl('cover.jpg');
+    }
 
     /**
      * Get profile thumb

+ 5 - 0
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -243,6 +243,11 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
     {
         return $this->_serviceTemplateFunc('urlAvatar', $iContentId);
     }
+    
+    public function serviceProfileCover ($iContentId)
+    {
+        return $this->_serviceTemplateFunc('urlCover', $iContentId);
+    }
 
     public function serviceProfileEditUrl ($iContentId)
     {

+ 5 - 0
template/scripts/BxBaseServices.php

@@ -36,6 +36,11 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
     {
         return $this->_serviceProfileFunc('getAvatar', $iContentId);
     }
+	
+	public function serviceProfileCover ($iContentId)
+    {
+        return $this->_serviceTemplateFunc('urlCover', $iContentId);
+    }
 
     public function serviceProfileEditUrl ($iContentId)
     {