Skip to content

Instantly share code, notes, and snippets.

@sorenmalling
Created April 19, 2013 16:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorenmalling/5421328 to your computer and use it in GitHub Desktop.
Save sorenmalling/5421328 to your computer and use it in GitHub Desktop.
Gravatar with TypoScript
10 = COA
10 {
10 = TEXT
10 {
value = http://www.gravatar.com/avatar/
}
20 = TEXT
20 {
value = soren.malling@gmail.com
hash = md5
}
}
@tomasnorre
Copy link

At the moment my template looks like this.

plugin.tx_ttaddress_pi1 {

    gravatar = COA
    gravatar {
        10 = COA 
        10 {
            10 = TEXT
            10 {
                value = http://www.gravatar.com/avatar/
            }
            20 = TEXT
            20 {
                value = soren.malling@gmail.com
                hash = md5
            }
        }
        10.wrap = |?s=40&d=http://aaby.tm/fileadmin/templates/images/tt_address/default.png
    }

    templates.default {
        email.wrap = <br /> |
        phone.wrap = <br /> Tlf.: &nbsp;|
        fax.wrap = <br /> DGU: &nbsp;|
        description.wrap = <br /> Hcp.: &nbsp;|
        image.file.maxW = 55
        image.file.maxH = 65
        placeholderImage = fileadmin/templates/images/tt_address/default.png
        }
}

But have to assign the avatar image if no image in tt_address? tried ifEmpty.field = image but don't know where to asign the gravatar too? i have not image option here as I understand the manual.

Actually i think i would be really fast and easy to implement it in PHP =) But TypoScript is fine by me if posible. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment