Welcome Guest, Not a member yet? Register   Sign In
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS

[eluser]Phil Sturgeon[/eluser]
I'll iPhone Skype you for a few minutes on my next smoke break. Will be about 30 minutes.

In the mean time I would have thought the layout library will be where its at.

[eluser]globule[/eluser]
Got an idea : in order to load modules CSS files only when they are used, you can extend the output class with a"addCSS" function... can't you ?

[eluser]Yorick Peterse[/eluser]
[quote author="globule" date="1246448712"]Got an idea : in order to load modules CSS files only when they are used, you can extend the output class with a"addCSS" function... can't you ?[/quote]

Not needed when all the modules use the same layout, you'd only have to style them once.

[eluser]Phil Sturgeon[/eluser]
I see where you are coming from now Yorick. The modules will have a standard wrapper for the header, title, etc but not sure how the content itself will be styled. Can you hop on MSN so I can iPhone pester you or something?

I will be pubbing and kayaking this evening (not sure which order, could get dangerous!) so wont be near Skype unless I can hack a random Wi-Fi.

The next release of PyroCMS will be v0.9.6 btw as we have seen some brilliant steps forward since the start of the v0.9.5.x series. It is still not quite enough for 1.0 until I have finished my page manager improvements and Yorick has improved theme-ability.

[eluser]globule[/eluser]
[quote author="Phil Sturgeon" date="1246472219"]The next release of PyroCMS will be v0.9.6 btw as we have seen some brilliant steps forward since the start of the v0.9.5.x series. It is still not quite enough for 1.0 until I have finished my page manager improvements and Yorick has improved theme-ability.[/quote]
Great !

I am curently building a webserver to start a project based on Pyro.
French translation will come soon (70%)

[eluser]Yorick Peterse[/eluser]
[quote author="Phil Sturgeon" date="1246472219"]I see where you are coming from now Yorick. The modules will have a standard wrapper for the header, title, etc but not sure how the content itself will be styled. Can you hop on MSN so I can iPhone pester you or something?

I will be pubbing and kayaking this evening (not sure which order, could get dangerous!) so wont be near Skype unless I can hack a random Wi-Fi.

The next release of PyroCMS will be v0.9.6 btw as we have seen some brilliant steps forward since the start of the v0.9.5.x series. It is still not quite enough for 1.0 until I have finished my page manager improvements and Yorick has improved theme-ability.[/quote]

yorickpeterse[the weird letter a]gmail[just a single dot]com

Won't be online between 19:30 and 10 PM (Dutch time) due to my taekwondo training.

[eluser]Phil Sturgeon[/eluser]
Me you (and BenneX) at 10 BST (GMT + 1) if you are still about then. Meet in http://tinychat.com/pyrocms.

[eluser]Yorick Peterse[/eluser]
Phil went to the pub again, damn alcoholic Tongue

Anyway, I'd say we all meet Friday evening again or something like that.

[eluser]Phil Sturgeon[/eluser]
You don't think I'll be going to the pub on Friday? :coolhmm:

Last night we basically discussed how we can make modules, themes and CSS all get along. I think in the end we got half way there but I wandered off to think before we made a decision.

Option 1 - Module wrappers

A module is wrapped by a single view which has variables like $module_content, $module_header, $module_title, $module_footer etc and all modules just output to them. These are wrapped in standard <div class="module_title"> tags which can be styled in a theme.

Optionally, theme developers can make a separate wrapper file for a specific module to handle it in a different way.

This forces modules to follow the styling rules which can make life easier on the designers but will massively squash creativity and flexibility in modules.

Option 2 - CSS guidelines

Taking ideas from this approach I (in my mind) took the pro's and avoided the cons.

For starters, we wrap all module content in #module_title and #module_wrapper. Within the actual wrapper anything goes and module developers are free to do as they wish.

I think, all modules should contain layout specific CSS but leave out colors, fonts, etc. If they do that, they are fools and nobody will use their module. I would rather let developers have the option to be idiots than force them into making restricted code *cough*iPhone SDK*cough*.

Then, with the modules laied out theme designers can style up colors, fonts, sizes, etc for all general text, #module_title and #module_wrapper etc which will apply to pages and modules. Then if they want to override anything in the module CSS they can just use !important rules.

finally, we will give theme designers and module developers one other kick-ass tool. By outputting the segment array to the body tag as a class name, we can let them write specific CSS for a certain module, certain method or even if they want to go nuts, write custom CSS for a specific URL parameter like user/1. Madness!

Code:
&lt;body class="&lt;?php echo implode(' ', $this-&gt;uri->segments_array(); ?&gt;

This will produce a list of classes like below:

Quote:&lt;body class="news category pyrocms"&gt;

Doing this we can create CSS for any module and theme in the site.

Feedback please? I am obviously leaning towards option 2 but can I get some feedback on how to improve either? A few people joined tinychat but left pretty quickly as it was just me a Yorick hammering out ideas. Sorry!

[eluser]Yorick Peterse[/eluser]
Quote:Feedback please? I am obviously leaning towards option 2 but can I get some feedback on how to improve either? A few people joined tinychat but left pretty quickly as it was just me a Yorick hammering out ideas. Sorry!

Awesome isn't it ? Tongue

Anyway, now that I actually understand your idea i'd say option two is the best.




Theme © iAndrew 2016 - Forum software by © MyBB