How to add user configurable cosmetic tag display?

(AstonJ) #1

I’d like to add a user option where users can select their preferred tag style - is there an easy way to do this on Discourse?

On other forum platforms I’d usually just add a user preferences option via the ACP (which I believe we can do in Discourse via customise > user fields) and then in the template simply do something like the following specifying the css class:

if user.field3 == true

Is there any easy way to achieve the same thing in Discourse?

(Jeff Atwood) #2

I’m extremely confused about what exactly is going on in the ultra-confusing world of theming in Discourse… but perhaps @sam can elaborate. And perhaps we can eventually make it something normal people can understand :wink:

(Sam Saffron) #6

Yeah user selectable theme components will address this use case

(Jeff Atwood) #7

I think it would also address the OP’s use case as well, since “large font CSS per user” is not materially different from “slightly different tag CSS per user”

(Jay Pfaffman) #8

Also, if user groups were available in themes then users who were members of a particular group could see different things. (As I say it, though, it could be a nightmare to debug when a user says “I can’t see so-and-so” because they are a member of the “I hate so-and-so” group.)

@codinghorror: I read this topic not about tag display but as a more general “I want things to look different for some users than for others”. A way that I have tried before to have things display differently for different users was to use groups (I just searched couldn’t manage to find the topic). I wanted a “I can have a profile” group to be able to change their profile fields and everyone else to have those fields hidden from their profile page. If the user’s group were in the CSS stuff <waving hands, as CSS is something I understand only theoretically>, then it’d be possible to have a user join the “I like green boxes” group and see tags the way they wanted.

If the feature that I wanted existed, this would be a clever work-around. :wink:.

(Jeff Atwood) #9

I fail to see how groups are relevant to this discussion, as defined by the first post in the topic.

(AstonJ) #10

Definitely agree with that!!

Traditionally we have some of the most customised forums out there (many often winning ‘awards’) but our Discourse forum is the least customised forum I have run.

  • Part of that is because I really like a lot of default forum design :slight_smile: so didn’t want to change too much.
  • But a large part of it too is because customising themes hasn’t been as easy as it is on other forums.

I wish customising DC was easy - it could be used as an absolutely superb system to power more than just forums. Articles, News, User-blogs, Photo pages etc! This site is run purely on vB with one plug-in that allows you to create custom pages with custom queries (so the section pages, like the homepage, news homepage, article homepage etc) are built with that ‘cms’ plug-in, and then the content (news, articles, blogs etc) are just normal forum threads but where the first post gets one style, and all subsequent posts get another.

I’ve secretly hoped that this ‘CMS’ type system is what you guys had been working on - as I reckon the basis of Discourse could easily be used to put out a fantastic CMS/Blog/Publishing platform…

(Feel free to delete this if it’s too off-topic - job done if you and Sam read it)