Page 1 of 1

Questions over questions while creating a new theme

Posted: Fri Aug 12, 2005 12:32 am
by Thomas
Hi,

currently I try to convert my draft for my new website into a s9y template - but there are easier things out there in the world than doing this. Sorry.

I see a lot of variables used in the default index.tpl, but I cannot find any description of them. Nothing in special, this is a general thing.
Well, some of them are easy to guess and self-describing, but what I really miss is an overview of all available variables, coming from s9y and for use in templates. For instance, what's the best way to load an image from the themes directory, what's the variable name? What's the meaning of '$raw_data'?

Another problem is the different hooks and their meaning. For instance, I see a 'frontend_header' and 'frontend_footer'. What are they used for, which content might be placed there? And I know, there are a lot more hooks existing.

The current situation for developing a unique theme is not very satisfying, to be honest. Specially, when you try to use your own *.tpl files and not just the well-known style.css.

Just my 5 Eurocents. Regards, Thomas

Posted: Fri Aug 12, 2005 5:55 am
by MySchizoBuddy
yup a general overview of all the variables and what they mean would be nice

Posted: Fri Aug 12, 2005 12:38 pm
by garvinhicking
I can offer to tell you what which variable and plugin hook does, if someone does the work and collects all those variables...

Regards,
Garvin

Posted: Fri Aug 12, 2005 2:45 pm
by MySchizoBuddy
i can do that.
how will tell me. through email or post it here.

Posted: Fri Aug 12, 2005 3:31 pm
by wesley
Well, when I was trying to create the theme largely from beginning, I
started with the default template, then eventually got to adjusting most
of the parameters to what I had in mind for the design by, uh... poking
around. Change this variable, see what effect it gives, etc.

I think I understand what most of the parameters are supposed to do now,
but yeah, I guess a nice documentation would be incredibly useful if you
don't have the time to do what I did.

Posted: Fri Aug 12, 2005 4:31 pm
by Guest
garvinhicking wrote:I can offer to tell you what which variable and plugin hook does, if someone does the work and collects all those variables...
Hi Garv,

some of the variables/hooks in questions are already in my first post.

- $raw_data
- entry_header/footer
- frontend_header/footer

What I also miss is an overview of various CSS classes/ids, which are provided by some of the plugins. I think that discussion we already had previously.

I really know that the whole team is developing the new version under a high pressure and all of you are doing a great job, no criticism from that side, but the documentation lacks on some points.

Another issue are the plugins. In some points I miss a more detailed information on what they're doing and which additional CSS classes they provide.

Regards, Thomas

Posted: Fri Aug 12, 2005 6:20 pm
by wesley
$raw_data would contain, well, raw data, such as direct output of an entry
in a preview mode. You would still have the header part, but the usual
rendering of the entries and sidebar will likely be skipped altogether since
you'd be in raw_mode to use $raw_data.

the header/footers are easy for me to describe because I wrote plugins
that specifically use these hooks and added one of them for completeness.

entry_header hook places an item right at the beginning of entries. If
an HTML nugget is placed here, you will see it above the entry contents,
but below the title banner. In my blog, the 'navigation bar' is placed using
this particular hook. entry_footer, on the other hand, will place an item at
the end of the entries within <div class="serendipity_entryFooter">
region and will appear after the part where it shows how many entries
there are and what page you're in, etc. Basically, it will appear pretty
much at the last part within the 'main pane' area.

frontend_header places an item inside <head> </head> tag. This is for
placing something like <meta> tags. frontend_footer places an item at
the very last part of the page, even below the 'main pane'. The copyright
notice in my blog is placed using this hook.

Additional plugins usually lack documentation for providing what CSS
class it can use, and one would need to take a look at the PHP file to see
the usable classes.

Posted: Sat Aug 13, 2005 4:02 am
by MySchizoBuddy
I guess this thread can contain the explanation so any one can post (not just garvin but other developers of s9y) and I will keep on compiling it seperately. and once its done we can put it up in documentations

Posted: Sat Aug 13, 2005 5:43 pm
by garvinhicking
I've just created a new Wiki page: http://www.s9y.org/index.php?node=102

Everyone can edit this document and add changes. Also you can add elements which you currently have no idea what it's about. I (and others) can then add it.

I tried to create a sample foundation of this, everyone please feel free to edit.

Regards,
Garvin

Posted: Tue Aug 16, 2005 9:32 pm
by JrProd
@wesley : thanks for that explanation, I find it terribly useful ! :D
I wanted to ask those questions for some time, but haven't found any moment to do so. So thank you very much ! :)