Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2015-03-30 18:35:58

Lirodon
Member
Registered: 2009-01-27
Posts: 98

Generate additional CSS classes

Okay, so, what if you wanted to arbitrarily apply different style rules to specific parts of the forum? i.e. a certain category?

A quick solution to this would be to populate the body tag of forum pages with CSS IDs and classes based on certain factors, such as page names or forum/category IDs. So for instance, viewing the category page for Feature requests would result in:

<body id="flux-vf" class="fid-9">

I could see potential uses for this.

Offline

#2 2015-03-30 19:30:25

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: Generate additional CSS classes

The only potential use I could see for this off-hand is for jQuery or JavaScript functions - coul you explain a bit more how you think this would be useful?

Last edited by chris98 (2015-03-30 19:30:52)

Offline

#3 2015-03-30 21:02:28

seven
Member
From: Torino, Italy
Registered: 2010-08-19
Posts: 314
Website

Re: Generate additional CSS classes

Make a style and use templates. Look at Victory for an example.


gamezoo.org - serious gaming services for serious gamers.

Offline

#4 2015-03-30 22:01:12

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,670
Website

Re: Generate additional CSS classes

Yeah, but styles cannot really do much in templates. The aforementioned example couldn't be done without changing viewforum.php.

I do think, though, that something like "forum-9" should be the ID, and the item should have an additional class "forum".


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#5 2015-04-02 05:06:37

Lirodon
Member
Registered: 2009-01-27
Posts: 98

Re: Generate additional CSS classes

Franz wrote:

I do think, though, that something like "forum-9" should be the ID, and the item should have an additional class "forum".

Yeah, that's what I was wanting. More semantics in the HTML code.

Offline

#6 2015-04-02 09:01:25

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,670
Website

Re: Generate additional CSS classes

Feel free to create a ticket in the "Development" section.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

Board footer

Powered by FluxBB