Gravatar module for Roxen

Published 9 December, 2009 in Misc , Roxen - 0 Comments

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
  1. <ul>
  2. <emit source=“sql” host=“mydb”
  3. query=“SELECT name, email, `date`, body FROM my_comments”
  4. >
  5. <li>
  6. <gravatar-img email=“&_.email;” rating=“pg” size=“32”
  7. default-image=“/path/to/icon.png”
  8. /> &_.name; wrote at <date iso-time=“&_.date;” />
  9. <wash-html paragraphify=“”>&_.body;</wash-html>
  10. </li>
  11. </emit>
  12. </ul>

Download the Gravatar Roxen module 14:20, Wed 09 December 2009 :: 7 kB