« |
»
How to show the user picture
easyexpat
| 01 August, 2005 14:07
It is possible for users to select a picture to represent them, as some kind of "avatar". The picture must be selected from the list of pictures currently available in the "resource center".
The picture can be shown anywhere in our templates, and the templates developed by EasyExpat (easyexpat, std_2col, std_rightcol, std_leftcol... etc) show it in header.template or footer.template with the description of the user if you put any:
<!-- Display the personal picture -->
{assign var=blogOwner value=$blog->getOwnerInfo()}
{assign var=userName value=$blogOwner->getUsername()}
<!--<h4>{$userName}</h4>-->
<br />
{if $blogOwner->hasPicture()}
{assign var=picture value=$blogOwner->getPicture()}
<img src="{$url->resourcePreviewLink($picture)}" alt="My picture!" />
<br /><br />
{/if}
{assign var=userDescription value=$blogOwner->getAboutMyself()}
{$userDescription }
<!-- END Display the personal picture -->
If interested in this feature, you can add the following Smarty code anywhere in your favourite template set.
You can find other tips and tricks in the pLog's documentation.
If you are looking for more help on EasyExpat's blogs, do not forget that we have a dedicated forum.