Some questions

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Some questions

Post by Fabien »

Hi,

I am trying to creat a template for S9Y and I got weird results. So I have some (very stupid) questions:
1. When I look at the code generated for a page, I see a lot of classes that are not defined in the CSS. Normal?
2. If yes, what is mandatory?
3. All the templates I looked used the same names for the div (mainpane, sidebar) and the same div structure. The others pages of my site use a more complicated structure that I want to mimic on my blog. Is it possible? Are the names of the divs used somewhere in the programs and are they mandatory?

Thanks for your indulgence.
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Post by Fabien »

Another question. When I look at the code of the page generated, the page is linked to a css named serendipity.css. What is it? How is it created? What is in it?

If I use the CSS of my site without any modification, the result is different on the serendipity page and on the others one. So, it's clear that my ccs is modified by serendipity or partially used.

Thanks, Fabien
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Some questions

Post by yellowled »

Fabien wrote:1. When I look at the code generated for a page, I see a lot of classes that are not defined in the CSS. Normal?
Yes. You can never have too many classes, but you don't have to use them all. Having a lot of classes gives you the option to style almost anything individually. If you don't need to do that, just leave that particular class or id alone in the CSS :)
Fabien wrote:3. All the templates I looked used the same names for the div (mainpane, sidebar) and the same div structure. The others pages of my site use a more complicated structure that I want to mimic on my blog. Is it possible? Are the names of the divs used somewhere in the programs and are they mandatory?
Basically, you can use a different div structure by editing the .tpl files of your template or copying from the default template and editing them if your current template doesn't provide a particular .tpl file. The most likely candidates are (based on my experience with porting template to s9y, which often presents the same problem): index.tpl, entries.tpl, sidebar.tpl.

However, some plugins and/or parts of s9y seem to "look for" certain parts - I can't really give you more detail on this, but I guess Garvin can :)

YL
Thanks for your indulgence.[/quote]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Some questions

Post by garvinhicking »

Hi!

That's true, some s9y plugin use that DIV names. The best thing to make sure if you use one of them is to search all your s9y files for the name of that DIV.

But there are no critical functions that depend on the same DIV name.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Post by Fabien »

Thank you for your answers.

And what about this serendipity.css (my second message)?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Serendipity.css is a virtual file created by your template/XXX/style.css file, routed through serendipity.css.php. It also contains CSS codes emitted by event plugins.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Post by Fabien »

So it's possible that there is some conflict between the code generated by some event plugins and my style.css file??? How to verify what is exactly in this virtual file?

By the way, another question? Is it possible to test a template without changing the default template seen by visitors?

Thanks, Fabien
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, plugins like the "Markup: CSS Printing" would use their own CSS styles to allow you to print entries. If you rename DIV classes, the print plugin would no longer format the appropriate DIVS, since you don'T have them.

You would need to evaluate each markup plugin that you use and check out what HTML/DIV tags they refer to.
By the way, another question? Is it possible to test a template without changing the default template seen by visitors?
You can install the template chooser plugin(s).

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Re: Some questions

Post by abdussamad »

Fabien wrote:Hi,

I am trying to creat a template for S9Y and I got weird results. So I have some (very stupid) questions:
1. When I look at the code generated for a page, I see a lot of classes that are not defined in the CSS. Normal?
2. If yes, what is mandatory?
3. All the templates I looked used the same names for the div (mainpane, sidebar) and the same div structure. The others pages of my site use a more complicated structure that I want to mimic on my blog. Is it possible? Are the names of the divs used somewhere in the programs and are they mandatory?

Thanks for your indulgence.
The default s9y theme has a lot of divs. They are there to make it easier for those partial to css to customise the theme. Unfortunately the downside is that if you are trying to port a template they get in the way. My suggestion when porting a template is to go through the various tpl files and replace the s9y divs with your own template's.

Discard those that are not necessary. When you've done that you'll find that almost everything looks alright. About the only s9y specific styling you'll have to do is for the image-in-posts divs and the calendar related stuff.
Fabien
Regular
Posts: 204
Joined: Wed Mar 15, 2006 1:02 pm
Location: Paris (France)
Contact:

Post by Fabien »

Thank you for your help. I have choosen to get some external assistance.

Cheers, Fabien
Post Reply