Keyword

Custom Avatar

  • TOTALLNET
  • TOTALLNET's Avatar Topic Author
  • Offline
  • New Member
More
12 years 8 months ago #62163 by TOTALLNET
Custom Avatar was created by TOTALLNET
Hi All

i would like if is it possible to :

1 - add third option in sex field ... like male , female and couple
2 - in itens displays.. instead view uploaded images in avatar ... K2 will show our custom avatar ...
if the user is male so male.jpg avatar .. if user is female so female.jpg avatar and if user is couple .. couple.jpg avatar...

Any help would be appreciate
Thanks in advance

Kazuo

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 8 months ago #62164 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Custom Avatar
Hi Kazuo,

You could use the K2 User module for default registration, it already has Gender: Male or Female. Probably hide the upload avatar button and use PHP if / else to display the avatar based on the gender. Adding couples might need some extra work.

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

  • TOTALLNET
  • TOTALLNET's Avatar Topic Author
  • Offline
  • New Member
More
12 years 8 months ago #62165 by TOTALLNET
Replied by TOTALLNET on topic Re: Custom Avatar
Hi Kannan

Thanks for your response...

I know about what needs to do.. but i dont know to code these ..
<?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)): ?>
  	<img class="itemAuthorAvatar" src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />
  	<?php endif; ?>

And about the gender.. its in one list.. but where is the list ??

Kazuo

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum