Page 1 of 1

Formatting others than articles and static pages not working

Posted: Thu Sep 22, 2005 5:52 pm
by Thomas
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?

Re: Formatting others than articles and static pages not wor

Posted: Thu Sep 22, 2005 6:07 pm
by garvinhicking
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

Posted: Thu Sep 22, 2005 6:54 pm
by Thomas
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.

Posted: Thu Sep 22, 2005 10:32 pm
by garvinhicking
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