PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
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 Back to top

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
Former Moderator in Good Standing


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

PostPosted: Tue Jan 30, 2007 10:01 am Reply with quote Back to top

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).
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

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

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 Visit poster's website
fkelly
Moderator


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

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

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
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Tue Jan 30, 2007 11:58 am Reply with quote Back to top

Sounds like a plan!
View user's profile Send private message Send e-mail Visit poster's website
Gremmie
Former Moderator in Good Standing


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

PostPosted: Tue Jan 30, 2007 12:01 pm Reply with quote Back to top

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.
View user's profile Send private message
fkelly
Moderator


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

PostPosted: Tue Jan 30, 2007 3:20 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


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

PostPosted: Thu Feb 08, 2007 8:30 am Reply with quote Back to top

Just curious what you guys decided to do about the double head problem for the next RavenNuke?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16986
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum