Hi Robin, Robin Luckey wrote: > Hi Noah, > > I've discovered your Ohloh badge macro plugin at Trac Hacks (and many > thanks for doing that BTW!), and this is partly what got us down the > road of thinking about Trac integration. > > Ohloh now has the ability to return a badge for an account using an > email address hash for lookup. This is described at > http://www.ohloh.net/api/email_lookup. > Because Trac knows the email addresses, it seems possible to render an > Ohloh account badge automatically, with no extra setup required from > users. > > I'm no Python or Trac expert, but the crucial point seems to be a > method called format_author(), which returns a blob of HTML listing > the author name and email. It seems straightforward to inject an Ohloh > badge at this point, at least in theory. > > Does the Trac plugin model allow such an override? Am I right to be > pursuing this method, or is there another, better method? >
There could be a new extension point (IUsernameRenderer ?) which the Chrome.format_author() method could use, yes. That would be a good match for the user model enhancements scheduled for 0.12 (see [1]). I'm CC'ing trac-dev on this, we could eventually follow-up there for discussing the API. -- Christian [1] - http://trac.edgewall.org/query?milestone=0.12&keywords=%7Euser > BTW given your initial code for the Ohloh badge macro it was pretty > simple to extend it for a variety of Ohloh badges, including > accounts... I need to get organized and share this patch. > > Thanks, > Robin > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
