Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Include user flair class in body tag #498

Closed
wants to merge 2 commits into from

4 participants

@rasher

Would open some interesting customizing possibilities if the body tag included the user's flair classes, just like it includes the "loggedin" etc. classes.

This might cause surprises with some stylesheets (if they've been using the flair classes without being more specific about it), so maybe the class should be named differently (user-flair-xxx maybe).

@Saturate

You should post this in: http://www.reddit.com/r/ideasfortheadmins/. However I think while this opens up for a lot of things, it might not be that good and just add to confusion and maybe abuse.

@andre-d

This bug tracker is for confirmed bugs in reddit, please post to /r/ideasfortheadmins.

@chromakode chromakode closed this
@chromakode

After considering the potential use (and abuse cases) for this, we've decided not to add it at this time. Thanks very much for taking the time to file this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 29, 2012
  1. @rasher
Commits on Aug 31, 2012
  1. @rasher
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 r2/r2/lib/pages/pages.py
View
5 r2/r2/lib/pages/pages.py
@@ -435,6 +435,11 @@ def page_classes(self):
classes.add('contributor')
if c.cname:
classes.add('cname')
+ flair = wrapped_flair(c.user, c.site, False)
+ flair_enabled, _pos, _text, flair_css_class = flair
+ if flair_enabled and flair_css_class:
+ for flair_css_class in flair_css_class.split():
+ classes.add('userflair-%s' % flair_css_class)
if c.site.is_moderator(c.user):
classes.add('moderator')
Something went wrong with that request. Please try again.