Add defaut cover to Sngine

Jane Marcia
Admin
Iscritto: 2024-11-24 00:49:31
2024-12-08 04:23:26

Sngine does not have profile default cover as of out of the box, so I added this little hack

 

Open profile.tpl look for content/themes/default/templates

   <!-- cropped-cover -->
            <img class="js_position-cover-cropped {if $user->_logged_in && $profile['user_cover_lightbox']}js_lightbox{/if}" data-init-position="{$profile['user_cover_position']}" data-id="{$profile['user_cover_id']}" data-image="{$profile['user_cover_full']}" data-context="album" src="{$profile['user_cover']}" alt="{$profile['name']}">
          <!-- cropped-cover -->

And after that Add

 

{else}
    <!-- Default cover image -->
    <img class="js_position-cover-cropped" src="{$system['system_url']}/content/themes/{$system['theme']}/images/default_cover.jpg" alt="{__("Default Cover")}">


add a default cover image to theme folder like this 

/content/themes/default/images/default_cover.jpg

and that is all enjoy.
Edy Lee
Moderator
Iscritto: 2024-11-24 00:57:42
2024-12-20 20:11:53

Can i use the same code for group and page?