3 of 3
3
1.3 how to add an avatar/photo
Posted: 03 July 2005 04:44 PM   [ Ignore ]   [ # 37 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  33276
Joined  05-14-2004

I took your question and pasted it into google: How do I clear the float?.

I tend to use <br style=“clear: both;” /> (or right, or left) if I need to.  But I also avoid floats most of the time, as they always seem to bork my layout, since I’m not good at them.  You can do it without xhtml markup too, see Google link. =)

 Signature 
Profile
MSG
 
 
Posted: 03 July 2005 05:57 PM   [ Ignore ]   [ # 38 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  289
Joined  05-15-2004

I ended up not being able to do what I wanted to do with the current set up.  Thanks for the tips.

Luka

 Signature 


My Blog Incogblogo Version 1.6.0 Build: 20070622
“No trees were killed in the making of this post ...... however, a large number of electrons were horribly inconvenienced.” ~Unknown

Profile
 
 
Posted: 03 July 2005 06:56 PM   [ Ignore ]   [ # 39 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  33276
Joined  05-14-2004

spacey wiki’d this.

 Signature 
Profile
MSG
 
 
Posted: 10 July 2005 03:32 PM   [ Ignore ]   [ # 40 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  484
Joined  05-14-2004

For some reason this isn’t working.  It displays thre EE avatar no problem, but just seems to ignore the whole avatar_filename==’’ argument.

{if comments}
<div class="comments-body">

{if avatar_filename ==''}
<div style="float:left;margin:3px;"><img src="{exp:gravatar email="{email}" rating="R" size="40" border="006600"}" /></div>
{/if}
{if avatar}
<div style="float:left;margin:3px;"><img src="{avatar_url}" width="40" height="40" alt="Avatar for {name}" class="avatar" /></div>
{/if}

{comment}
<span class="comments-post">Posted by {if url != ""}<a href="{url}">{/if}{name}{if url != ""}</a>{/if} on  {comment_date format='%m/%d'}  at  {comment_date format='%h:%i %A'}</span>
<
div style="clear:both"></div>
</
div>
{/if}

This is a sample of the outputted source for a user known to have a gravatar and not an avatar.  As you can see it just seems to skip the if avatara_filename conditional

<div class="comments-body">

<
p>Comment text

</p>
<
span class="comments-post">Posted by <a href="http://www.domain.net">deb</a>&nbsp;on&nbsp; 07/10 &nbsp;at&nbsp; 07:45 AM</span>
<
div style="clear:both"></div>
</
div>

Any help?

 Signature 

Far From Perfect
Broadcasting live from Iraq via High-speed Bytes/Second Internet!

Profile
 
 
Posted: 10 July 2005 03:36 PM   [ Ignore ]   [ # 41 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  33276
Joined  05-14-2004

One thread really is enough.

 Signature 
Profile
MSG
 
 
Posted: 10 July 2005 03:38 PM   [ Ignore ]   [ # 42 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  484
Joined  05-14-2004

Yea, I just found this thread via Chris and re-directed that thread here.  However, even after the wiki I am still having the issue.

 Signature 

Far From Perfect
Broadcasting live from Iraq via High-speed Bytes/Second Internet!

Profile
 
 
Posted: 10 July 2005 03:49 PM   [ Ignore ]   [ # 43 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  33276
Joined  05-14-2004

nevermind.

 Signature 
Profile
MSG
 
 
Posted: 10 July 2005 03:52 PM   [ Ignore ]   [ # 44 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  484
Joined  05-14-2004

I think I just discovered the problem, a third case.  A non-registered commenter with a gravatar.  I would think that avatar_filename should still work, but I guess it there is no entry in the database for the user then there would be no avatar_filename to check against.  There doesn’t seem to be anything to check against, ie {if Non-member}.  The current checks (group_id, member_id) sheck against the current logged/visiting user and not the author of the comment/entry left, etc.

Now, to think about how to cover this third case.  You can see it in the most recent comments on my site.  Just view the source and you can see it work on my “quick Test” but skip over Deb’s comment (the non-registered user with a gravatar)

 Signature 

Far From Perfect
Broadcasting live from Iraq via High-speed Bytes/Second Internet!

Profile
 
 
Posted: 10 July 2005 04:02 PM   [ Ignore ]   [ # 45 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  279
Joined  11-30-2002

I didn’t think about the third case! But that’s easily solvable.

{if author_id == 0}
<img src="{exp:gravatar rating="R" size="50" email="{email}" default="http://www.yourdomain.com/no_avatar.gif"}" width="50" height="50" alt="Avatar" class="avatar" />
{/if}

Profile
 
 
Posted: 10 July 2005 04:17 PM   [ Ignore ]   [ # 46 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  484
Joined  05-14-2004
spacey310 - 10 July 2005 04:02 PM

I didn’t think about the third case! But that’s easily solvable.

{if author_id == 0}
<img src="{exp:gravatar rating="R" size="50" email="{email}" default="http://www.yourdomain.com/no_avatar.gif"}" width="50" height="50" alt="Avatar" class="avatar" />
{/if}

Yep that was it.  I hadn’t worked my way down to those codes yet..lol

BTW the line actually needs to be {if author_id == “0”}  It doesn’t work unless the 0 is surrounded by quotes.

 Signature 

Far From Perfect
Broadcasting live from Iraq via High-speed Bytes/Second Internet!

Profile
 
 
   
3 of 3
3
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66467 Total Logged-in Users: 28
Total Topics: 84860 Total Anonymous Users: 13
Total Replies: 455330 Total Guests: 162
Total Posts: 540190    
Members ( View Memberlist )