<!-- thumbnail: https://i.sstatic.net/TWlTc.png -->
<!-- version: 1.0 -->
<!-- tag: flair -->
<!-- excerpt: HTML-formatted combined flair for all StackExchange sites, including area51, running on Google App Engine. -->

##Screenshots

Screenshots of some samples:

![my flair][1] ![Jeff Atwood][2] ![John Skeet][3]

Tooltip with total reputation:

![total rep tooltip][4]

Tooltip with specific-site reputation:

![single-site rep tooltip][5]

##About

se-flair produces combined-account flair in the form of a short HTML document suitable for iframe-embedding that fits with the look of the standard flair on StackExchange sites.  Using HTML allows for links to multiple specific-site profiles and tooltips showing total rep and specific-site rep.  Totals are calculated across all linked accounts (as opposed to the standard combined StackExchange flair, which only uses sites where the user has at least 200 rep).

Display name and gravatar are taken from the highest-rep associated account.  The specific sites shown and linked are in descending-rep order.  The number of sites shown and linked can be chosen from 1-8 (with a default of 7, since the 8th just barely doesn't fit).

Data is cached for up to 8 hours.

###[se-flair.appspot.com](http://se-flair.appspot.com/)

See [http://se-flair.appspot.com/](http://se-flair.appspot.com/) for more complete instructions.  Short version:

- `http://se-flair.appspot.com/[association-id]/` produces an HTML document suitable for iframe-embedding
- `http://se-flair.appspot.com/js/[association-id]/` produces javascript that inserts the stylesheet link into the document head and writes the flair div into the document

Note that your association-id is a 36-character-long string (32 hex digits and 4 hyphens).

###Compatibility

See [se-flair.appspot.com](http://se-flair.appspot.com/) for instructions on how to embed the flair.  Embedding both by iframe and by javascript works in current versions of Chrome, Firefox, Safari, and IE.  In at least some versions of IE, the favicons for the sites do not render well and the bounds for the suggested iframe are not quite right, though the javascript embedding method works fine other than the favicons.

###Updates

*2011-02-26*: The "internal server error" issue seems to have been a problem with loading badge counts.  Now, in instances where there is a problem loading badge counts for a user on a particular site, it is counted as zero badges from that site to allow loading to complete.  Retrieval of the badge count is retried on the next load.

*2011-02-28*: In the case described above, where some badge counts are assumed to be zero because of a failed API call, a small `(?)` will appear to the right of and slightly above the badge counts with the title text "data may be incomplete".  (As above, the API call to get the badge counts will be tried again on the next load.)  Also, requests using the 32-character hexadecimal string association id without the 4 hyphens are now redirected to the URL with the 36-character association id (with the 4 hyphens in place).

*2011-03-02*: Fixed "internal server error" issue for users for whom their Area 51 account is their highest-rep account.  (Since there is no API access to Area 51 data, the data on the Area 51 account is generated by running some regexes against the HTML of the user page; previous versions neglected to pull the display name and email hash for Area 51—the display name and email hash of the highest-rep account are used for the gravatar and display name in the generated output.)

*2011-03-05*: Added a work-around for [a bug where the StackAuth 1.1 API returns an invalid user_id](http://stackapps.com/questions/2169/mismatch-between-user-id-as-reported-in-stackauth-1-1-invalid-and-1-0-valid), and some improved error-handling.

*2011-03-06*: Total rep is now rounded rather than truncated (as is the case in StackExchange-produced flair); diamond is shown if moderator on highest-rep site and diamond and count are shown if moderator on other sites; display-name color fixed.

*2011-03-07*: Javascript embedding method added; all links now target `_blank` so as to open in a new window/tab; `http://se-flair.appspot.com/[site hostname]/[site user_id]/` (or `http://se-flair.appspot.com/js/[site hostname]/[site user_id]/`) now displays a link to the correct URL rather than redirecting to it.

##Contact

Comment here or email ilg at the domain in the website in my profile.

##Code

Written in Python (directly fetching API URLs), running on Google App Engine.


  [1]: https://i.sstatic.net/ytqNh.png
  [2]: https://i.sstatic.net/cGxBE.png
  [3]: https://i.sstatic.net/gxpFz.png
  [4]: https://i.sstatic.net/2fayl.png
  [5]: https://i.sstatic.net/7ZEUT.png