Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi Couch! Its me again :lol:


I have a question about gravatar on comment, to show comment author avatar based on comment author's email.

But, not all people in this world have a gravatar account, also i met the situation that user put email like this, to false the email validator :
Code: Select all
asdf@qwerty.com


My question is,
Can we use conditional tag to display a default image, if the user's email not registerd on gravatar, or the user put email like above.

IE : If comment author's email not not registerd on gravatar, or the user put random email like above, couch will show this image :
Image


Need Advice, Thx!
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
Hi :)

As mentioned in the docs (http://docs.couchcms.com/tags-reference/gravatar.html), the cms:gravatar tag accepts a parameter named 'default' where you can specify the image to use in case a valid gravatar is not found. Please try the following -
Code: Select all
<cms:gravatar 
   email="asdf@qwerty.com"
   default='http://www.handball-harsewinkel.de/sites/default/files/pictures/default_user.png'
   size="36"
/>

Hope it helps.
KK wrote: Hi :)

As mentioned in the docs (http://docs.couchcms.com/tags-reference/gravatar.html), the cms:gravatar tag accepts a parameter named 'default' where you can specify the image to use in case a valid gravatar is not found. Please try the following -
Code: Select all
<cms:gravatar 
   email="asdf@qwerty.com"
   default='http://www.handball-harsewinkel.de/sites/default/files/pictures/default_user.png'
   size="36"
/>

Hope it helps.


Omg :lol:
I missd that one :lol:

Thx KK for the help ;)
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
3 posts Page 1 of 1
cron