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
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → 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
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.
Depends if you change the style in
database:user:style
or
database:config:o_default_styleI 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.
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'];
perfect
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → CSS Style selection
Powered by PunBB, supported by Informer Technologies, Inc.