We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Default avatars for mods/members

Development and Programming

transparentb's avatar
transparentb
24 posts
about 15 years ago
transparentb's avatar transparentb

Hi,

I’m trying to assign default avatars for mods and members in the forum. What’s the best way to do this?

Thank you!

Moved to Development and Programming by Moderator

       
Brandon Jones's avatar
Brandon Jones
5,500 posts
about 15 years ago
Brandon Jones's avatar Brandon Jones

Hi transparentb,

Take a look at this thread. Does that help?

       
transparentb's avatar
transparentb
24 posts
about 15 years ago
transparentb's avatar transparentb
Hi transparentb, Take a look at this thread. Does that help?

Hi,

I don’t think so. I’d like members to be able to upload their own, but start with a default one.

Thank you!

       
Natetronn's avatar
Natetronn
161 posts
about 15 years ago
Natetronn's avatar Natetronn

Maybe something like this could work:

{if avatar}

{avatar_url}

{if:else}

default-image

{/if}

http://ellislab.com/expressionengine/user-guide/modules/member/custom_profile_data.html

       
Stefan Rechsteiner's avatar
Stefan Rechsteiner
442 posts
about 15 years ago
Stefan Rechsteiner's avatar Stefan Rechsteiner

Each Forum I’m installing I ask myself, why does EEs Discussion Module not have a «if no_avatar» or «if avatar … if:else …» to display something if the member does not have a Avatar … is there really no chance to do so!?

@Natetronn: Discussion-Module breaks if you use if:else in the «if avatar»-conditional … there also is no «if no_avatar» or no possibility like «if avatar == ”» or «if avatar == false» … :-/

       
Bjørn Børresen's avatar
Bjørn Børresen
629 posts
about 15 years ago
Bjørn Børresen's avatar Bjørn Børresen

hmm, {avatar_url} has a default value if none is set by the user right? So you might be able to do a {if avatar_url == 'http://blablabla/default.png'} .. or {if '{avatar_url}’ == ‘http://blablabla/default.png’}

And “advanced conditionals” rarely work in the forum templates.

I’d use gravatar if I were you though. Easier.

       
Stefan Rechsteiner's avatar
Stefan Rechsteiner
442 posts
about 15 years ago
Stefan Rechsteiner's avatar Stefan Rechsteiner

thx Bjørn, but {avatar_url} has no default value … and your conditionals do not work in forum — even if you run the forum with the normal ee-templates — because there is no {avatar_url}-tag in forum-templates … so you can’t use this at all 😕

       
Greg Salt's avatar
Greg Salt
3,988 posts
14 years ago
Greg Salt's avatar Greg Salt

Hi Stefan,

The avatar_url tag is available if you use the Member Custom Profile Data tag.

@transparentb,

I think the only way to do this would be to create a simple extension perhaps using the member_member_register hook. Would you like me to move this thread to the Development & Programming Forum for you?

Cheers

Greg

       
transparentb's avatar
transparentb
24 posts
14 years ago
transparentb's avatar transparentb
Hi Stefan, The avatar_url tag is available if you use the Member Custom Profile Data tag. @transparentb, I think the only way to do this would be to create a simple extension perhaps using the member_member_register hook. Would you like me to move this thread to the Development & Programming Forum for you? Cheers Greg

Sounds good to me. Thanks.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
14 years ago
Sue Crocker's avatar Sue Crocker

Moved per request…

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.