php forum
php mysql forum
php mysql smarty
 
Topic Options
#218240 - 06/08/02 09:30 AM stylesheet problem
caymuc Offline
Enthusiast

Registered: 01/17/01
Posts: 449
I run a TEST user.<br />I havn't used that one for ages.<br />In the meantime the stylesheets got renamed.<br /><br />Today I logged in with the test user.<br />ANd got a 404 error with NEtscape: - stylesheet not found.<br />(IE displayed a page: without any stylesheet, but at<br />least without that stupid 404).<br /><br />I checked: for the TEST user the name of the stylesheet set was outdated. But instead of a 404 error i would prefer that the default stylesheet would be displayed if the chosen one is not found. <img src="/forum/images/icons/smile.gif" alt="" /> <br /><br />I think that shoud be easy to fix?
_________________________
Carl
Colour-Ize-Forums (test entry: user: 'test' pw: 'test2')

Top
#218241 - 06/08/02 09:46 AM Re: stylesheet problem [Re: rodrigo1]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
I been down this road before... <img src="/forum/images/icons/smile.gif" alt="" /><br /><br />In your ubbt.inc.php script find this:<br /><br /><pre><font class="small">code:</font><hr><br /> if (!$fstyle) {<br /> $fstyle = $user['U_StyleSheet'];<br /> if ( (!$fstyle) || ($fstyle == "usedefault") ) {<br /> $fstyle = $theme['stylesheet'];<br /> }<br /> }<br /></pre><hr><br /><br />and change it to this:<br /><br /><pre><font class="small">code:</font><hr><br /> if (!$fstyle) {<br /> $fstyle = $user['U_StyleSheet'];<br /> if ( (!$fstyle) || ($fstyle == "usedefault") ) {<br /> $fstyle = $theme['stylesheet'];<br /> }<br /> }<br /> if (!file_exists("{$config['stylepath']}/$fstyle.css")) {<br /> $fstyle = $theme['stylesheet'];<br /> }<br /></pre><hr><br /><br />That should do the trick. <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#218242 - 06/08/02 11:14 AM Re: stylesheet problem [Re: sjsaunders]
caymuc Offline
Enthusiast

Registered: 01/17/01
Posts: 449
Cool! Thanks!
_________________________
Carl
Colour-Ize-Forums (test entry: user: 'test' pw: 'test2')

Top
#218243 - 06/08/02 11:53 AM Re: stylesheet problem [Re: sjsaunders]
Rick Offline
Guru

Registered: 05/11/99
Posts: 8373
Loc: Olympia, WA
I'm going to move this thread into the Modifications Suggestions. Not sure about adding this fix into the main distro just because for every page generated it would need to do a file check. Probably eventually need some type of admin tool to verify everyone's stylesheet settings after a stylesheet has been removed/renamed, so it updates all outdated ones.
_________________________
UBB.threads Developer

Top
#218244 - 06/08/02 12:11 PM Re: stylesheet problem [Re: Sally]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
I was hesitant for the same reasons, being every page needing a file check (one more disk access). <br /> <br />Rick, perhaps a check during login? When a user logs in and their settings are being applied have a check and if the stylesheet isn't there have it set to default in the database. <br /> <br /> <br />Edit Note: On second thought, better off as an admin tool. Large sites will not want that many file checks running when users are logging in and out. Much better off as an admin tool when updating stylesheets. <img src="/forum/images/icons/smile.gif" alt="" />


Edited by JustDave (06/08/02 12:20 PM)
_________________________
~Dave
ChattersOnline.com

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks