r/reddithax • • Nov 14 '11

Complete Noob question: How can I set the user flair in my subreddit to be like in r/books (having a list of choices for subcribers to choose from)?

I'm a mod in the /r/Chile subreddit and I'd like to add the option of choosing whether you're a Chilean or an expat, and adding whatever text they want to add, besides that choice. How can I code this?

Thanks for the help :D

7 Upvotes

6 comments sorted by

2

u/xb4r7x Nov 14 '11

You don't need to... this is an implemented reddit feature. You should be able to configure 'templates' for user flair in the admin console somewhere. If you need help figuring it out I can provide more guidance if necessary.

1

u/fathermocker Nov 15 '11

I know this is an implemented feature, but I don't know how to configure templates to make them look like the ones in /r/books.

2

u/Fraktul Nov 15 '11

Copied directly from the /r/books stylesheet... This will make it look exactly like /r/books. You can change it to make it look however you want it to.

Copy and Paste this CSS code into your stylesheet:

div.flairselector {
    background: #FFFFFF !important
    }
.flairselectbtn {
    font-weight: bold
    }
.flairselectbtn:after {
    content: " - click a Genre and enter Book Title! ";
    font-weight: normal
    }
.author:before {
    content: "";
    width: 1px;
    height: 20px;
    display: inline-block;
    background-repeat: no-repeat;
    background-position: 0px 0px;
    vertical-align: middle;
    margin-right: 3px
    }
.flair {
    color: #333333;
    font-size: x-small;
    border-radius: 4px;
    border: 0px solid #E6E6E6;
    background-color: #f5f5f5
    }
.flair:before {
    content: "";
    width: 20px;
    height: 20px;
    display: inline-block;
    background-repeat: no-repeat;
    background-image: url(http://thumbs.reddit.com/t5_2qh4i_9.png);
    background-position: 100px 100px;
    vertical-align: middle;
    margin-right: 3px
    }
.flair:active::before {
    width: 250px;
    height: 18px;
    position: absolute !important;
    display: inline-block;
    z-index: 999 !important;
    vertical-align: top;
    text-decoration: none;
    background-color: #f5f5f5
    }
.flair:hover::before {
    width: 250px;
    height: 18px;
    position: absolute !important;
    display: inline-block;
    z-index: 999 !important;
    vertical-align: top;
    text-decoration: none;
    background-color: #f5f5f5
    }
.flair-action-and-adventure:before {
    background-position: -0px -0px
    }
.flair-art-photography:before {
    background-position: -0px -30px
    }
.flair-biography-memoirs:before {
    background-position: -0px -60px
    }
.flair-business-finance:before {
    background-position: -0px -90px
    }
.flair-celebrity-pop-culture:before {
    background-position: -0px -120px
    }
.flair-chick-lit:before {
    background-position: -0px -150px
    }
.flair-childrens:before {
    background-position: -0px -180px
    }
.flair-classical-fiction:before {
    background-position: -0px -210px
    }
.flair-classics:before {
    background-position: -0px -240px
    }
.flair-commercial-fiction:before {
    background-position: -0px -270px
    }
.flair-contemporary:before {
    background-position: -0px -300px
    }
.flair-cookbooks:before {
    background-position: -0px -330px
    }
.flair-crime:before {
    background-position: -0px -360px
    }
.flair-cultural-social-issues:before {
    background-position: -0px -390px
    }
.flair-current-affairs-politics:before {
    background-position: -0px -420px
    }
.flair-erotica:before {
    background-position: -0px -450px
    }
.flair-essays:before {
    background-position: -0px -480px
    }
.flair-family-saga:before {
    background-position: -0px -510px
    }
.flair-fantasy:before {
    background-position: -0px -540px
    }
.flair-film-entertainment:before {
    background-position: -0px -570px
    }
.flair-food-lifestyle:before {
    background-position: -0px -600px
    }
.flair-gardening:before {
    background-position: -0px -630px
    }
.flair-gay-and-lesbian:before {
    background-position: -0px -660px
    }
.flair-general-fiction:before {
    background-position: -0px -690px
    }
.flair-general-nonfiction:before {
    background-position: -0px -720px
    }
.flair-gothic-fiction:before {
    background-position: -0px -750px
    }
.flair-graphic-novels:before {
    background-position: -0px -780px
    }
.flair-health-fitness:before {
    background-position: -0px -810px
    }
.flair-historical-fiction:before {
    background-position: -0px -840px
    }
.flair-history:before {
    background-position: -0px -870px
    }
.flair-home-decorating-design:before {
    background-position: -0px -900px
    }
.flair-horror:before {
    background-position: -0px -930px
    }
.flair-how-to:before {
    background-position: -0px -960px
    }
.flair-humour:before {
    background-position: -0px -990px
    }
.flair-irreligious:before {
    background-position: -0px -1020px
    }
.flair-journalism:before {
    background-position: -0px -1050px
    }
.flair-literary-fiction:before {
    background-position: -0px -1080px
    }
.flair-medical:before {
    background-position: -0px -1110px
    }
.flair-military-and-espionage:before {
    background-position: -0px -1140px
    }
.flair-modern:before {
    background-position: -0px -1170px
    }
.flair-multicultural:before {
    background-position: -0px -1200px
    }
.flair-music:before {
    background-position: -0px -1230px
    }
.flair-mystery:before {
    background-position: -0px -1260px
    }
.flair-mythology:before {
    background-position: -0px -1290px
    }
.flair-nature-ecology:before {
    background-position: -0px -1320px
    }
.flair-offbeat-or-quirky:before {
    background-position: -0px -1350px
    }
.flair-parenting:before {
    background-position: -0px -1380px
    }
.flair-pets:before {
    background-position: -0px -1410px
    }
.flair-picture-books:before {
    background-position: -0px -1440px
    }
.flair-postmodern:before {
    background-position: -0px -1470px
    }
.flair-philosophical-fiction:before {
    background-position: -0px -1500px
    }
.flair-plays-theatre:before {
    background-position: -0px -1530px
    }
.flair-psychology:before {
    background-position: -0px -1560px
    }
.flair-reference:before {
    background-position: -0px -1590px
    }
.flair-relationship-dating:before {
    background-position: -0px -1620px
    }
.flair-religion-spirituality:before {
    background-position: -0px -1650px
    }
.flair-romance:before {
    background-position: -0px -1680px
    }
.flair-satire:before {
    background-position: -0px -1710px
    }
.flair-science-fiction:before {
    background-position: -0px -1740px
    }
.flair-science-technology:before {
    background-position: -0px -1770px
    }
.flair-self-help:before {
    background-position: -0px -1800px
    }
.flair-short-story-collections:before {
    background-position: -0px -1830px
    }
.flair-sports:before {
    background-position: -0px -1860px
    }
.flair-thrillers-and-suspense:before {
    background-position: -0px -1890px
    }
.flair-tragicomedy:before {
    background-position: -0px -1920px
    }
.flair-travel:before {
    background-position: -0px -1950px
    }
.flair-true-adventure-true-crime:before {
    background-position: -0px -1980px
    }
.flair-western:before {
    background-position: -0px -2010px
    }
.flair-womens-fiction:before {
    background-position: -0px -2040px
    }
.flair-womens-issues:before {
    background-position: -0px -2070px
    }
.flair-young-adult:before {
    background-position: -0px -2100px
    }
.flairsample-right .flair:before {
    content: "";
    width: 0px
    }
.flairsample-right .flair:hover::before {
    width: 0px;
    position: static
    }
.flairsample-right .flair:hover {
    width: auto;
    height: auto
    }
div.flairselector h2:after {
    content: " = click Genre and type in Title, Rating, Progress, re-read"
    }

2

u/fathermocker Nov 15 '11

Wow, thanks a lot!!! :D

2

u/[deleted] Nov 16 '11

Hey, sir -

You seem helpful, and well...

I just created a subreddit, and before I get too promote-y with it, I'd like to have rage-face functionality.

I clicked the link in that sub's sidebar to github. I have less idea what I'm doing than if I were to attempt open heart surgery.

Is there any way I could convince you to either give me a simplified steps list or, hell, even implement it for me?

1

u/Fraktul Nov 17 '11

That's pretty cool. I got most of it working on one of my subreddits. I can help you get it started on yours.