Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Cover Profile Image Overide Is Not Applying.

10 years 9 months ago
Licenses:
JomSocial Expired

ISSUE SUMMARY:
Hello, I have my cover-male-default.png and cover-female-default.png I wish to have as the default cover photos in mytemplate/html/com_community/images. The overrides work for all the other covers and avatars such as cover-group and cover-event, however, they will not work for the male or female cover photos.

Appreciate the assistance!

STEPS TO REPLICATE:
1
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER

10 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Jordan,

Seems this is a bug.

I will report this issue.

thank you!

10 years 9 months ago
Licenses:
JomSocial Expired

Thank you Dimas!

10 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

you're welcome, we will let you know once the patch available

10 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

hi Jordan,

For fixing this please you open this file components/com_community/libraries/user.php, find this code :

// Default cover
            if(file_exists(COMMUNITY_PATH_ASSETS.'cover-'.$gender.'.png'))
                return JUri::root().str_replace(JPATH_ROOT,'',COMMUNITY_PATH_ASSETS).'cover-'.$gender.'.png';

            if(file_exists(COMMUNITY_PATH_ASSETS.'cover-'.$gender.'.jpg'))
                return JUri::root().str_replace(JPATH_ROOT,'',COMMUNITY_PATH_ASSETS).'cover-'.$gender.'.jpg';

            // Template cover
            $asset = $template->getTemplateAsset('cover-' . $gender . '.jpg', 'images');
            $uri = $asset->url;
            if(strlen($uri)) return $uri;

            $asset = $template->getTemplateAsset('cover-' . $gender . '.png', 'images');
            $uri = $asset->url;
            if(strlen($uri)) return $uri;

replace with :
// Default cover
            /*if(file_exists(COMMUNITY_PATH_ASSETS.'cover-'.$gender.'.png'))
                return JUri::root().str_replace(JPATH_ROOT,'',COMMUNITY_PATH_ASSETS).'cover-'.$gender.'.png';

            if(file_exists(COMMUNITY_PATH_ASSETS.'cover-'.$gender.'.jpg'))
                return JUri::root().str_replace(JPATH_ROOT,'',COMMUNITY_PATH_ASSETS).'cover-'.$gender.'.jpg';*/

            // Template cover / override things
            $asset = $template->getTemplateAsset('cover-' . $gender . '.png', 'images');
            $uri = $asset->url;
            if(file_exists($asset->file)) return $uri;
            
            $asset = $template->getTemplateAsset('cover-' . $gender . '.jpg', 'images');
            $uri = $asset->url;
            if(file_exists($asset->file)) return $uri;

cheers!

10 years 8 months ago
Licenses:
JomSocial Expired

Thanks Dimas,

Should I make this file as a template override or will this fix be included in the next version?

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW