Customizing Habari

0 views
Skip to first unread message

Seneca The Younger

unread,
Dec 14, 2009, 6:50:06 PM12/14/09
to habari-users
Hello good friends and cohorts,

I've been trying to customize habari on and off now for a few months.
I've had experience in css, html and php in the past, yet for some
reason I haven't been able to figure out how to customize a theme.

I haven't found any very well commented themes and the howto on the
wiki is too basic.

Maybe my css, php skills aren't up to par, and this I am working on,
but does anyone have constructive suggestions on how to go about
creating my own theme?

The CSS on http://awhitebox.com/ seems to be very clean and efficient,
though I don't have access to his php theme.

I'm mostly having a hard time figuring out how css is working with php
to render pages. If I could figure out how the php renders the html so
as to use css to organize it, I would be in good shape....

Any help would be greatly appreciated...

Michael C. Harris

unread,
Dec 14, 2009, 7:51:22 PM12/14/09
to habari...@googlegroups.com
2009/12/15 Seneca The Younger <marcus...@gmail.com>:
>
> I've been trying to customize habari on and off now for a few months.
> I've had experience in css, html and php in the past, yet for some
> reason I haven't been able to figure out how to customize a theme.

Welcome to Habari, and sorry creating a theme has been difficult.

> I haven't found any very well commented themes and the howto on the
> wiki is too basic.

This page, http://wiki.habariproject.org/en/Themes, is a hub for other theming
pages, so you might find helpful things there.

> Maybe my css, php skills aren't up to par, and this I am working on,
> but does anyone have constructive suggestions on how to go about
> creating my own theme?
>
> I'm mostly having a hard time figuring out how css is working with php
> to render pages. If I could figure out how the php renders the html so
> as to use css to organize it, I would be in good shape....

Create a directory for your theme in user/themes. Let's call it seneca.

In the seneca directory, create the theme.php and theme.xml files (just copy
them from one of the core themes, such as mzingi, and change names etc to your
theme's name). You can customise stuff in there later.

If you have a static HTML file with the design you want, copy that into the
seneca directory and rename it home.php. Copy your CSS file in as well, and
call it style.css.

In the HTML head element in home.php, link to your CSS file like this:
<link rel="stylesheet" type="text/css" media="screen" href="<?php
Site::out_url( 'theme' ); ?>/style.css">

You now have a basic theme. There are a bunch of other templates that you might
want to create, such as for displaying single posts, but that's the basics.

Hope that helps.

--
Michael C. Harris, School of CS&IT, RMIT University
http://twofishcreative.com/michael/blog
IRC: michaeltwofish #habari

Seneca The Younger

unread,
Dec 15, 2009, 3:28:49 AM12/15/09
to habari-users
Thanks for the response Michael.

I'll give what you suggest a try. Sounds too easy to be true,
especially after I've spent so much time on it, but hopefully I was
just over complicating things.

Thanks again, I'll report back.

On Dec 14, 4:51 pm, "Michael C. Harris" <michael.twof...@gmail.com>
wrote:
> 2009/12/15 Seneca The Younger <marcus.koo...@gmail.com>:
>
>
>
> > I've been trying to customize habari on and off now for a few months.
> > I've had experience in css, html and php in the past, yet for some
> > reason I haven't been able to figure out how to customize a theme.
>
> Welcome to Habari, and sorry creating a theme has been difficult.
>
> > I haven't found any very well commented themes and the howto on the
> > wiki is too basic.
>
> This page,http://wiki.habariproject.org/en/Themes, is a hub for other theming

Seneca The Younger

unread,
Dec 30, 2009, 2:05:53 AM12/30/09
to habari-users
It's true, I was making (unintentionally) a mountain out of a
molehill. Habari, with a little knowledge of php and css is quite easy
to customize!

How the hell did it take me so long to figure out how? It seems that
what's right in front of ones face, often is the hardest thing to see.

Thank you for Habari users like Michael C. Harris.

Thanks again Michael. Kudos.

Seneca The Younger

On Dec 15, 12:28 am, Seneca The Younger <marcus.koo...@gmail.com>
wrote:

Seneca The Younger

unread,
Dec 30, 2009, 2:08:02 AM12/30/09
to habari-users
P.S. The site I've been working on is http://propeller-heads.com

Please send any suggestions or thoughts about my design, I'm desperate
of feedback.

Seneca The Younger

On Dec 29, 11:05 pm, Seneca The Younger <marcus.koo...@gmail.com>

Reply all
Reply to author
Forward
0 new messages