Formatting others than articles and static pages not working

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
User avatar
Thomas
Regular
Posts: 130
Joined: Tue Sep 21, 2004 2:00 pm
Location: Stockerau/NÖ/A
Contact:

Formatting others than articles and static pages not working

Post by Thomas » Thu Sep 22, 2005 5:52 pm

Hi,

I created my own custom theme for my website and encountered a problem which I cannot explain myself.
Articles (usual content in the blog) and static pages are formatted as they should be, but polls, for instance, are not shown as they should be. Even when "Format as article" is marked in the plugin menu.
Take a look at http://www.benqo.net/pages/poll.html

What did I wrong in the template?

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Formatting others than articles and static pages not wor

Post by garvinhicking » Thu Sep 22, 2005 6:07 pm

You'll need to look into the sourcecode; the poll plugin uses different "serendipity_Entry_Date" classes than your template.

"Format as article" simply means to wrap the content of a staticpage/voting/contactform with the DEFAULT serendipity DIV-Tags, so that the usual CSS applies.

If you have modified the wraping containers, you'll need to edit the *.tpl files of the plugin you want to use so that they also use your custom container names.

The reason is that plugins can NOT use the entries.tpl file, and they have no means to find out how you format your entry.

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/

User avatar
Thomas
Regular
Posts: 130
Joined: Tue Sep 21, 2004 2:00 pm
Location: Stockerau/NÖ/A
Contact:

Post by Thomas » Thu Sep 22, 2005 6:54 pm

Well, the poll plugin does not provide a template file.

A more comfortable way might be to assign the default origial S9y classes as well to the corresponding classes now used.

BTW, the files lang_de.inc.php and UTF-8/lang_de.inc.php contain an error. There's no ending ?> tag in both of them.

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Thu Sep 22, 2005 10:32 pm

Oh, I forgot that the poll plugin is not yet smartifyied. So yes, your CSS assignment would be easiest (or edit the poll plugin, the HTML code there is not hard to find)

The missing "?>" is not a problem, this is optional and the benefit from omitting it is that additional linebreaks at the end of the file (caused by windows editors) won't have the effect of the well-known PHP error "CAnnot add header information...".

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/

Post Reply