Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Public Testing of RavenNuke(tm) v2.10.00
Author Message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue Jan 30, 2007 9:36 am Reply with quote

Raven, that sounds good. But do we modify the core files to include both your theme's style.css and this new subSilver.css, or do we just duplicate (ugh) the subSilver.css in each style.css file? Maybe we should move towards 64bitguy's idea. Confused
 
View user's profile Send private message
Gremmie
PostPosted: Tue Jan 30, 2007 10:01 am Reply with quote

So maybe some conditional logic in the core files somewhere:

if the theme has a forums subfolder, then generate link tags for the theme's style.css AND the forums subfolder forums.css

else if the theme doesn't have a forums subfolder then generate a link tag for the theme's style.css AND the default subsilver.css

Then theme authors just have to make sure their CSS doesn't clash with the default subsilver.css (or provide their own forums.css file).
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Tue Jan 30, 2007 10:08 am Reply with quote

Hopefully the only css data in subSilver.css is for the forum template itself, in which case we would 'have' to load it - just ensure it isnt being called when you are not actually in the forum module.

I have been perusing Steph's post and I think I understand where he is coming from now so I'n going to try some experiments on my own custom theme to see what discernable differences there are in terms of load times etc.

The beauty of Steph's approach is that you can prepare the ground with if else logic and creating your own constant for 'custom style inclusion' without actually breaking anything.
 
View user's profile Send private message Send e-mail
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Tue Jan 30, 2007 11:25 am Reply with quote

Actually this fits in very well with an idea I proposed a while back. If you look at the css files for the themes in Ravennuke you'll see that there is enormous duplication. I mean upwards of 90 percent. I published some spreadsheets factoring all this out over at fkelly.org 6 months ago. What I proposed and actually had working in a test system was to consolidate the styles into a master style sheet that would always be loaded in header.php. Then if a theme needs to override an element of an existing style (say the color of a font) or add, a style that would be in the individual theme's style sheet. That's what "cascading" stands for if I am not mistaken.

The forums stuff could then be in the master style sheet and it would always be loaded (but only once) in header.php. If a forum theme needed to override the common stuff it could also do so in it's individual style sheet without repeating everything else.
 
View user's profile Send private message Visit poster's website
Guardian2003
PostPosted: Tue Jan 30, 2007 11:58 am Reply with quote

Sounds like a plan!
 
Gremmie
PostPosted: Tue Jan 30, 2007 12:01 pm Reply with quote

fkelly, that sounds great. When you say "loaded in header.php" I hope you mean a <link> tag is generated rather than dumping all the CSS with every page load.

We should really start using CSS like it was meant to be used...LOL.
 
fkelly
PostPosted: Tue Jan 30, 2007 3:20 pm Reply with quote

What I did, if I recall correctly because I don't have the code here on my laptop was before the line in header where it says:

Code:
   echo '<link rel="StyleSheet" href="themes/'.$ThemeSel.'/style/style.css" type="text/css" />'."\n\n";    


I just stuck a line that did the same thing for a style.css that I created in the root /themes directory. That "root" css file had maybe 30 lines in it that was derived from the "commonalities" in the existing theme css files. Then I would link to the style css for the $ThemeSel but that css file would typically have only 1 or two lines ... some had none since they didn't override anything from the common file.

I used an Excel spreadsheet to do my analysis. I just downloaded all the style files for all the themes into it and I put in the theme name along with the style and each attribute for each style. That way I could sort by style name and I'd have:

style1 theme1 attributes
style1 theme2 attributes
style1 theme3 attributes ...
style2 theme1 attributes ... you get the point

Then I could look at the attributes for each style right next to each other and see which were unique. Then I could move the most common attribute settings for a given style to my common file and only have overrides in individual theme style files where they were needed.

It also struck me that this common style file could be a great library if you were trying to develop a new theme. Look there to see what's available and avoid the need to invent a bunch of styles from scratch. Not that I think we need any more themes ... in fact, departing from the current thread a bit, what we really need to do is apply the same type of factor analysis to the theme code itself. Having just worked on a bunch of them there is just tremendous duplication and overlap of code which in turn makes maintenance a nightmare.
 
Gremmie
PostPosted: Thu Feb 08, 2007 8:30 am Reply with quote

Just curious what you guys decided to do about the double head problem for the next RavenNuke?
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Thu Feb 08, 2007 10:05 am Reply with quote

We just didn't have time to put that in place. The laundry list was huge as it was and we had to draw a line in the sand or we would have gone on forever. Basically, we stayed away from the forum in v2.10.00. We concentrated on everything else, though.
 
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Public Testing of RavenNuke(tm) v2.10.00

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©