CSS sheets in CMSMS 2.0

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
biffs

CSS sheets in CMSMS 2.0

Post by biffs »

I'm not sure if this has been brought up before, but I was wondering if the stylesheets in 2.0 will be moved out of the database and into static files editable backend.

I really hate having css in the database, mainly because I can't edit it in Dreamweaver.  I have to make changes, click apply, etc..... really not cool.

Is there a module that does this job for 1.0? 
cyberman

Re: CSS sheets in CMSMS 2.0

Post by cyberman »

biffs wrote: Is there a module that does this job for 1.0? 
Have you tried template externalizer?

http://dev.cmsmadesimple.org/projects/externalizer/
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm
Location: Helsinki, Finland

Re: CSS sheets in CMSMS 2.0

Post by KO »

You can remove you stylesheet with your current version if you want to do that. Just use normal stylesheet calls in you template and not {stylesheet} tag. Like:

Code: Select all

<link rel="stylesheet" type="text/css" href="http://yourdomain/yourstyle.css">
in head section. simple.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: CSS sheets in CMSMS 2.0

Post by kermit »

KO wrote: You can remove you stylesheet with your current version if you want to do that. Just use normal stylesheet calls in you template and not {stylesheet} tag. Like:

Code: Select all

<link rel="stylesheet" type="text/css" href="http://yourdomain/yourstyle.css">
in head section. simple.
i've been doing this all along for my own sites (speeds up cmsms page generation, and allows for browser caching of css), the downside is losing the convenience of the css editing on the back-end..  which is pretty handy for a quick fix.... and having pretty much everything IN the database makes it easier for backups, server migrations, etc... 

a simple text editor function in the back-end file manager would probably be sufficient to replace the back-end css editing capability.

biffs..  lately, i've just been using the web developer toolbar's "edit css" function and copying changes made (and already tested 'live') into a local copy of the external file.. which is then uploaded via ftp (sometimes run through csstidy first). since dreamweaver's rendering isn't always perfect, and once a template is "done" i rarely fire up dreamweaver to edit it, this is the best thing i've come up with so far for css editing.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: CSS sheets in CMSMS 2.0

Post by RonnyK »

Externalizer in combination with Cache, gives you the advantage that all data is stored in DB, maintable through 'externalizer' and speed is taken care of with the tag 'Cache'. All you have to do is install the function and replace the calling of {stylesheet} to {cstylesheet} and {content} with {ccontent}

http://dev.cmsmadesimple.org/projects/cache

Ronny
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm
Location: Helsinki, Finland

Re: CSS sheets in CMSMS 2.0

Post by KO »

I do the same as kermit. Firefox + webdeveloper combination + few other other handy css tools for seeing css behaviour. Edit local file when i'm happy and then FTP it down to server. Then checking out with IE to verify. If you want to include user styles in page editor like FCK you have to copy those styles to stylesheet that is attached to that template. Still you do not need to use {stylesheet} tag.

But ofcourse this {stylesheet} is nice as well and it has it's benefits.

Keijo
Vin

Re: CSS sheets in CMSMS 2.0

Post by Vin »

Nice uses, but the original question got lost... how will be css andled in the v2.0?
alby

Re: CSS sheets in CMSMS 2.0

Post by alby »

KO wrote: ........
If you want to include user styles in page editor like FCK you have to copy those styles to stylesheet that is attached to that template. Still you do not need to use {stylesheet} tag.
........
Is there a similar method for TinyMCE?

Alby
biffs

Re: CSS sheets in CMSMS 2.0

Post by biffs »

Vin wrote: Nice uses, but the original question got lost... how will be css andled in the v2.0?
thank you!  Yes, I was wondering if external stylesheets would be included in 2.0 opposed to the database.  I really can't think of one justifiable reason to have the {stylesheet} tag that cannot be done using external sheets.  In fact, the {stylesheet} tag could be used the same way in 2.0, but instead of grabbing all the css info from the database and creating the css file, it just loads the appropriate pre-made css files.  (ie, one for print, menu, news, layout, etc)

Stylesheets can easily be modified in the backend using a simple php file editor (quickxplore among others).  In fact, I've integrated FileManager (http://www.gerd-tentler.de/tools/filemanager/) into the admin section just for this purpose.

Anyways, is there a change going to happen in 2.0?
biffs

Re: CSS sheets in CMSMS 2.0

Post by biffs »

cyberman wrote:
biffs wrote: Is there a module that does this job for 1.0? 
Have you tried template externalizer?

http://dev.cmsmadesimple.org/projects/externalizer/
Not what I'm looking for.
This module allows you to use any text editor to edit CMS templates and stylesheets. It exports them to temporary files on the server and watches these files for modifications which are automatically imported into the database and take immediate effect.
I dont want them stored in the database at all.

And all you others commenting about the web developer tool bar for FF - I know, I love that thing.  It does so much and I love the live edit CSS feature.
Vin

Re: CSS sheets in CMSMS 2.0

Post by Vin »

Kermit has already asked this question in Tips and Tricks » Speed up your site.. lose {stylesheet} topic (http://forum.cmsmadesimple.org/index.php/topic,10630.0.html), but I'm not sure whether Ted read it or whether he sent a PM to him...
biffs

Re: CSS sheets in CMSMS 2.0

Post by biffs »

Vin wrote: Kermit has already asked this question in Tips and Tricks » Speed up your site.. lose {stylesheet} topic (http://forum.cmsmadesimple.org/index.php/topic,10630.0.html), but I'm not sure whether Ted read it or whether he sent a PM to him...
Thanks for pointing that out.
Post Reply

Return to “Developers Discussion”