A new Extension, “Gravatars” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

A Data Source to create Gravatar URLs. Requires some slight configuration of the data.gravatars.php file:

var $ds_comments = 'ds-blog-post-comments';
var $size = 50;

By default it assumes you have a data source called Blog Post Comments with an output parameter $ds-blog-post-comments. This output parameter should be the Email address field of the commenter. If your Section is named differently, update this string.

Install the Exension and include the Gravatars Data Source on a page. It will create a list of gravatar nodes, for example:

<gravatar email="" url="" />

Therefore when you build your comments HTML, insert the image thusly:

<img src="{/data/gravatars/gravatar[@email=current()/email]/@url}" />

Handy, thanks for putting this up I'm sure I'll get some use out of it!

Updated to v1.1

  • The DS-name variable wasn't working properly
  • Added a default.gif for when a gravatar cannot be found

A note for my future self to implement Twittar alongside this.

Nick, any chance you want to upload this to github - I’ve got a pretty nice, easy workflow going with git submodules now for all the extensions I use, and I want this to be one of them!

Absolutely yep, will do this tomorrow.

You’re a legend - thanks!

@ tonyarnold
your submodules workflow , is that per buahause’es tutorial or is there info/tutorial beyond the install part of offcial symphony docs?

Looks like my laptop HDD died this afternoon, sans backup, so it will take me a little bit longer to get onto this. Bleugh.

Sorry to hear that, Nick. With everything you do for the Symphony community, maybe we should all chip in and buy you an external drive…

Oh Nick, no backup, really? I even have have one in a safe deposit box which is never older than one week. I couldn’t stand losing more than a few days’ data.

Wow. That’s intense Michael.

Thanks for the sentiment ;-) I have a Time Capsule that backs up three Macs at home, but at work I am, er, “in between” backup routines. Last week started a Time Machine backup across the network but it never completed (would get to 20% then it’s time to go home…) so I had planned to leave it overnight this week. Just my luck this happens the weekend before.

I’ve not had an external drive (Time Capsule included) that’s lasted more than two years. Michael is right — you can never have enough copies!

Code is in various SVN and Github repos so there’s little Symphony related-stuff lost.

However I can’t boot to OSX or Disk Warrior DVDs so it could be something other than the HDD. Time will tell.

@newnomad - just adding each extension as a submodule, then switching it to the master branch and using git pull/git submodule update - it seems to work a treat!

Sorry to hear about your hard drive, Nick - that’s no good.

Nick, ouch! Not a good feeling. Glad little Symphony related is lost, but still. It’s never any fun trying to come back from that. Hopefully it’s something other than the HDD and the drive data can be retrieved.

Wow. That’s intense Michael.

Yes, I could write an article named “backups for neurotics”. :-) Being neurotic about data loss feels right for me.

But I did not want my words to sound cold to Nick.

I’ve been using this extension for a site I’m building. It has been very helpful! However, I’m wondering whether I can use it on multiple Data Sources. Is that possible?

I haven’t tested this so it might not work, but here goes. I’ve replaced the $ds_comments string with an array. Fill it with the output parameters from other Data Sources (note: including the $):

Don’t forget to post your site into the Showcase when it’s finished — I’d be interested to see where you’re using this DS :-)

It does work! Wow, thanks a lot! I’ll post the site to the Showcase, though that might take until next month.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details