Topic: Is there any way to disallow style changes?

Other than just having one style is there any way to disallow style changes?

I (and by I I really mean a user as I personally dont't care) want to be able to have seasonal styles that change colors and possibly background images around a bit but I want to disable the user profile option to change styles.

Thanks,
Andrew

Re: Is there any way to disallow style changes?

Try commenting out the drop-down menu in the profile smile

Re: Is there any way to disallow style changes?

Hmm, I tried that a few different ways but when you submit the page where it is commented out it either submitted a hidden variable or kept the style it was at when the user signed up. I may have goofed something up though so that could be an option I'm just doing wrong!

But I looked at the user table and even though user "guest" is set to Oxygen it is using Xmas for a guest which is what I set in admin so there is some override somewhere for guest so if I track that down and apply it to all I guess I'll be set! Then I'll just comment out the whole area like you said so the user doesn't think they can change it smile

4 (edited by Dr.Jeckyl 2006-03-03 21:02)

Re: Is there any way to disallow style changes?

remove all the styles you don't want them to have access to. simply put them in a folder in the "style" folder(you may have to do the same for the import/*_cs.cs files)

andrewteg wrote:

Other than just having one style is there any way to disallow style changes?

I (and by I I really mean a user as I personally dont't care) want to be able to have seasonal styles that change colors and possibly background images around a bit but I want to disable the user profile option to change styles.

Thanks,
Andrew

i just re-read you original post, sorry.

~James
FluxBB - Less is more

Re: Is there any way to disallow style changes?

Yeah, that's probably the best way smile

Re: Is there any way to disallow style changes?

actually i commented out the change lines in profile.php like elbekko suggested and so the user can't change options now and I figured out in header.php you can change the css link from

<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />

to

<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_config['o_default_style'].'.css' ?>" />

so that it reads it from the pun_config table instead of the pun_user table smile

The redirecting page seems to still use the user style but it's just a find replace issue now for $pun_user['style'].'.css to $pun_config['o_default_style'].'.css

Seems to work for me thus far... any thoughts why it wouldn't in the futre?

Thanks,
Andrew

Re: Is there any way to disallow style changes?

You could always try to do this: $pun_user['style'] = $pun_config['o_default_style'];

Re: Is there any way to disallow style changes?

lol, makes me feel good we came to the same conclusion ... pun is so darn easy to use and figure out it's scary!

Re: Is there any way to disallow style changes?

Yeah, I know tongue That's why I love writing mods for this forum ^^