Is there a way to have a thumbnail of the author populate in the byline when a story is written by him/her? There is no way to put a custom image field in the user profile is there?
thank you!
Reported on Movable Type 4.3
Is there a way to have a thumbnail of the author populate in the byline when a story is written by him/her? There is no way to put a custom image field in the user profile is there?
thank you!
Reported on Movable Type 4.3
Hi sali0023:
What byline are you talking about? Are you talking about the webpages generated by Movable Type?
--Dave Aiello
Sorry I wasn't clear. At the bottom of each individual entry and each entry blurb it says, in small type:
By xxxx on June 13, 2011 7:47 PM | No Comments
can there be a thumbnail down there?
It might not be obvious how to do this, but a good technique to use to find out how things like this are done is to look at the template sets that come with version 4 or 5 of Movable Type Pro, and find places in that code where the userpics are embedded.
A good template set to look at is the Community Blog template set in MT 4.3x and the Userpic template module at the Global Templates level.
The most important and relevant tags for you are:
<$mt:AuthorUserpicURL$>
<$mt:EntryAuthorUserpicURL$>
Without looking at the template module that produces your example output, I would say that you need to include <$mt:EntryAuthorUserpicURL$> with the tags that are already there, and you will probably get the result you want.
--Dave Aiello
Thank you Dave, that was just what I needed to find the answer. If anyone else is wondering...
Make a template module - 'Userpic' and put the following code in it:
<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>
Then put this line of code anywhere you want the image to appear:
<$mt:Include module="Userpic" userpic_size="36"$<>
Hi Sali,
Or you could simply grab that logic from a new movable type community blog template set.
Kind Regards,
Mihai Bocsaru
----------------------------------
Daily Movable Type Consultant
Web Development
Movable Type Consulting
Six Apart Partner
http://www.pro-it-service.com/
----------------------------------
Movable Type Demo
http://www.movabletypedemo.org/
----------------------------------
Open Melody Demo
http://www.openmelodydemo.org/