Topic: CSS Style selection

I've noticed that if I manually set my style to a non-existant sytyle (by entering it directly into the db) PunBB still displays the default (Oxygen) style.  Where is the code the governs this behavior?

Thanks,
  MRB

Re: CSS Style selection

Depends if you change the style in

database:user:style
or
database:config:o_default_style

I am guessing that if you change it in user:style then it will use the default_style if it cannot find the one you requested.

Re: CSS Style selection

StevenBullen wrote:

Depends if you change the style in

database:user:style
or
database:config:o_default_style

I am guessing that if you change it in user:style then it will use the default_style if it cannot find the one you requested.

I must have asked wrong...
what I am looking for is the php code the pulls user.style, determines if that style "exists" and then swaps in the default style otherwise.

If you notice in header.php, pun_user['style'] is already populated, so this comparison happens elsewhere.

Re: CSS Style selection

Apologies.. Here you go... my mistake.. Doh!

includes/functions.php - Line number will vary

        // Set a default style if the user selected style no longer exists
        if (!@file_exists(PUN_ROOT.'style/'.$pun_user['style'].'.css'))
            $pun_user['style'] = $pun_config['o_default_style'];

Re: CSS Style selection

perfect