Display avatar in template

Display avatar in template

Postby rubikwizard on Fri Sep 26, 2008 2:29 pm

Hi

I am new to LifeType and have installed it to set up 30 blogs for students in my class at a school. I have also installed the template pack. Now some of the template previews seem to have a section for the user's picture/avatar but this never seems to be displayed when those templates are selected by the students. I have done a search in this forum and the wiki and have come accross some references to this and something called 'smarty code' but I really have no idea where to put this code or how to get it to work.

I would really appreciate any help!!!

Thanks for your time.
rubikwizard
 
Posts: 2
Joined: Fri Sep 26, 2008 2:23 pm
LifeType Version: 1.2.8_r6440

Re: Display avatar in template

Postby Nomad on Fri Sep 26, 2008 4:16 pm

some of the templates already have the code in but if its not there - generally you would add it to the top of the nav bar.

in most templates this is generally panel.template or links.template though some (Like MirroDarkBlue) use sidebar.template. The standard templates use the footer.templaste and a couple of other do, like Matrix.

It's a case of looking at each template, see how its been structured and work from there. I've been doing some work recently on getting the templates sorted out and making them more standardized and also reducing the amount of files needed per template pack though I'm no where near finished.

Anyway - you need to place this bit of code

Code: Select all
{assign var=blogOwner value=$blog->getOwnerInfo()}
{assign var=AboutMyself value=$blogOwner->getAboutMyself()}
{if $blogOwner->hasPicture() && $AboutMyself} 
<li>
     <h2>{$locale->tr("about_myself")}</h2>
     <ul>
     <div id="AboutMyself">
     {assign var=picture value=$blogOwner->getPicture()}
     <li><img id="UserPicture" src="{$picture->getPreviewLink()}" alt="{$blogOwner->getUsername()}" /></li>
     <li>{$AboutMyself}</li>
     </div>
     </ul>
</li>
{/if}


Anywhere in the nav bar that you want it to show. easiest is generally at the start - i.e. If yoy look at template 'Almost Spring' and look at panel.template you'll see the code right at the top....
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: Display avatar in template

Postby rubikwizard on Fri Sep 26, 2008 5:12 pm

Thankyou. I shall give it a look.

Do you know if it is possible for me (admin) to create a resource/album that can be used by all the blog users? Ie so I can put pictures in that all can use? I want to create an album with all Avatars in so they can choose which one they want.

Thankyou
rubikwizard
 
Posts: 2
Joined: Fri Sep 26, 2008 2:23 pm
LifeType Version: 1.2.8_r6440

Re: Display avatar in template

Postby Nomad on Fri Sep 26, 2008 6:52 pm

well the way that av's work is that the user logs in and then either links to or uploads an image to the system though I think you might be able to use the gravatar plugin for what you want
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire


Return to Templates

cron