default userpic

No User Pics

Vote 0 Votes

I noticed on the blog page of the Professional Web Site template set that image pics do not automatically show with entries. Is this a simple modification to the template?

Reported on Movable Type 4.2

4 Replies

| Add a Reply
  • michaele,

    Try this. In your Entry (or even Main Index template if you want author pics to show there as well, get to your 'Entry MetaData' include template.

    There you will want to install an include statement which will include the Userpic template, like so:

        <$mt:Include module="Userpic" userpic_size="36"$>
    

    You can insert the above line just after the first line in your Entry Metadata template code:

    <div class="asset-meta">
    

    The contents of the Userpic template should be similar or like the following, (you may need to create this Userpic template under Template Modules if it doesn't already exist.

             <div class="user-pic">
              <mt:If name="userpic_type" eq="profile">
               <img src="<mt:If tag="AuthorUserpicURL"><$mt:AuthorUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>"  width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="user-pic" />
              <mt:Else name="userpic_type" eq="commenter">
               <mt:IfCommenterIsAuthor><mt:ignore>IF NATIVE MTCS USER</mt:ignore>
                <a href="<$mt:Var name="profile_view_url" encode_html="1"$><$mt:CommenterID$>"><img src="<mt:If tag="CommenterUserpic"><$mt:CommenterUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="user-pic" /></a>
               <mt:Else>
                <mt:If tag="CommenterID"><mt:ignore>IF AUTHENTICATED USER (OPENID, VOX, LJ, ETC)</mt:ignore>
                <a href="<$mt:CommenterURL$>">
                 <img src="<mt:If tag="CommenterUserpic"><$mt:CommenterUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="user-pic" />
                 <mt:If tag="CommenterAuthIconURL"><span class="auth-icon"><img src="<$mt:CommenterAuthIconURL size="logo_small"$>" alt="<$mt:CommenterAuthType$>"/></span></mt:If>
                </a>
                <mt:Else><mt:ignore>ELSE ANONYMOUS COMMENTER</mt:ignore>
                 <a href="<$mt:CommentURL$>"><img src="<mt:If tag="CommenterUserpic"><$mt:CommenterUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>" 
                 width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="user-pic" /></a>
                </mt:If>
               </mt:IfCommenterIsAuthor>
              <mt:Else name="userpic_type" eq="userlist">
                <a href="<$mt:Var name="profile_view_url" encode_html="1"$><$mt:AuthorID$>"><img
                src="<mt:If tag="AuthorUserpicURL"><$mt:AuthorUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>"
                width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="user-pic" /></a>
              <mt:Else>
                <a href="<$mt:Var name="profile_view_url" encode_html="1"$><$mt:EntryAuthorID$>"><img
                src="<mt:If tag="EntryAuthorUserpicURL"><$mt:EntryAuthorUserpicURL$><mt:Else><$mt:StaticWebPath$>images/default-userpic-90.jpg</mt:If>"
                width="<$mt:Var name="userpic_size"$>" height="<$mt:Var name="userpic_size"$>" alt="user-pic" /></a>
              </mt:If>
             </div>
    
    


  • i tried this, but all commenters -> anonymous and different types users are showing the entryauthor pictures. How can I fix this?

    Thanks

  • I have that same problem - is there a way to fix this?

    I want to be able to show the avatars for the various types of commenter profiles - eg, typepad

  • Using the deafult template, mine don't just show the author userpic, but they also link to a very wrong user url.

    I've just noticed that I have 4.3, and I see that there is 4.31 to install. Are my commenter problems specific to this, and will upgrading fix them?

    If anyone has any ideas it would be very helpful.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012