Forums / Cotonti / Core Labs / Archive / Custom HTML for users/groups

Mynt
#16173 2009-08-18 07:57
@pieter,

This would I hope be handled through css in some aspect, however the admin would be able to set the css values. I guess the best way you could do it is a variable system. Set the variables up in the admin section, and have CSS call on the id_ of them?

@Trustmaster,

Here is a few code ways of doing it. In the admin panel, create a new field for each usergroup, name it something such as "usergroup_colors". Have a master field, which would be the default. So "usergroup_colors_default" and all other fields would be named "usergroup_colors_($usergroupname)"

In a post, you could then call on it with if/else commands.

if (user = usergroup) {
document.getElementById("[b]usernamecolor[/b]").style.selector =[b]hexvalue from admin panel[/b]
}
else
{
}

Of course the above is not actual viable working code. It was merely something to show, how you can do it.. in a way I suppose. This could actually be a very easy task, but you just have to add in everything to support it.
"I only sleep when I know I won't miss a thing."