Gravatar module for Roxen
Although I’m working on some social web related Pike modules where a Gravatar module is included I needed a Gravatar module right now at work so I hacked up a standalone Gravatar Roxen module.
This is how it works
12 lines of RoXen Macro Language
- <ul>
- <emit source="sql" host="mydb"
- query="SELECT name, email, `date`, body FROM my_comments"
- >
- <li>
- <gravatar-img email="&_.email;" rating="pg" size="32"
- default-image="/path/to/icon.png"
- /> &_.name; wrote at <date iso-time="&_.date;" />
- <wash-html paragraphify="">&_.body;</wash-html>
- </li>
- </emit>
- </ul>
Download the Gravatar Roxen module 14:20, Wed 09 December 2009 :: 7 kB