1 (edited by Paul 2005-01-15 15:26)

Topic: User group styling

Go to line 315 of viewtopic which reads

<div id="p<?php echo $cur_post['id'] ?>" class="blockpost<?php echo $vtbg ?><?php if (($post_count + $start_from) == 1) echo ' firstpost'; ?>">

and replace it with this

<div id="p<?php echo $cur_post['id'] ?>" class="blockpost<?php echo $vtbg ?><?php if (($post_count + $start_from) == 1) echo ' firstpost'; ?> <?php echo strtolower(str_replace(' ', '', $user_title)) ?>">

What this does is to assign the posters title as a class. Note, the class will be in lower case and will have spaces removed so "New member" becomes "newmember". The output looks something like this

<div id="p3" class="blockpost roweven administrator">

This will enable you to style most aspects of a post depending on the posters user title. For example you can change the colour of the user title for different user groups like so

DIV.newmember DD.usertitle {COLOR: red}

You can also change the colour of the header row, change background colours, change font sizes or give admins a graphic background. You could even make all posts from banned users invisible or make the content of their posts vanish. You could make user  titles for everybody apart from admins and mods invisible. You could disable avatars and then assign an avatar to different groups by applying it as a background image.

I think you could also use it for a ranking system by assigning a background image with stars, pips etc and a bit of padding to DD.usertitle or wherever but I haven't tested it.

It's just a bit of fluff really but it doesn't use much code so it's fairly harmless.

Re: User group styling

Ok... But, my title in russian language, how can I use this?

3 (edited by D9r 2005-02-13 18:06)

Re: User group styling

That's a cool feature, Paul.  Thanks.  (CSS sure is fun, isn't it?)

Re: User group styling

Austral wrote:

Ok... But, my title in russian language, how can I use this?

why would that cause a problem?

Re: User group styling

1. When I write css in english, all ok. But I have usertitle in Russian.
2. How can I coloring username (not usertitle)

6

Re: User group styling

I don't understand what your problem is either.  This is just basic, standard CSS.

7 (edited by Paul 2005-02-13 22:32)

Re: User group styling

I assume the problem is using the Russian character set in a stylesheet. Obviously the same would go for Chinese character sets etc. That never occured to me. I always thought you could use unicode for class names.

8

Re: User group styling

Oh, that makes sense.