Ask Your Question
1

How easy does Askbot make it to customize its HTML?

asked Apr 22 '10

Pekka gravatar image Pekka
500 19 26 34

updated Apr 22 '10

Does Askbot have a half-way clean basis to customize the site's appearance? What I'm seeing from outside looks good, all the elements have distinct classes and IDs, which makes most things possible already.

Is the HTML code separated from the application's code base? Is it easy to switch templates? Could somebody familiar with the project maybe point me to an example of where the HTML is stored in the github repo?

Thanks in advance.

1 Answer

Sort by ยป oldest newest most voted
1
Pekka has selected this answer as correct

answered Apr 22 '10

Evgeny gravatar image Evgeny flag of Chile
6665 31 49 95
http://askbot.org/

updated Apr 25 '10

edit: there are two caveats though - (1) it's best to localize customizations to css whenever possible, because there will be changes in url parameters, template tags and template variables; (2) there is a bug in the javascript skin media resolution - because of it at this point you should copy entire base skin (currently there is only "default") - templates and media - into your own.

Hi Pekka, HTML is stored in the django templates and is easy to modify.

The newer look is only available at the experimental branch called "common-question-view" (I'll add instructions on how to get it a bit later - generally it's git clone, fetch that branch and check it out) now in the master branch. I also seems to work well in IE7-8 but with some issues in version 6 (works well with FF & Chrome).

Instructions for creating new skins are described here (btw - the general system is probably the same as in OSQA at this point).

Skins are switched by setting ASKBOT_DEFAULT_SKIN to a particular name by editing file settings_local.py.

You will not have big issues maintaining your own templates unless you decide to depend on some from skin 'default' - so it will be best if you copy "default" to your own within the same directory though - forum/skins. At this point skins cannot be placed to an arbitrary directory - but it may be possible with re-configuring django a bit - I'll doublecheck on this today-tomorrow.

The plan for near future is to minify HTML in the default skin and come up with a good naming convention for id and class names of "business" elements - so that users could easily maintain their own templates and stylesheets without confusions. Javascript within skin media will also change - as element finding sometimes heavily depends on descendant selectors.

So it will be best to copy "default" skin entirely (both media and templates) into a new one if you are not willing to wait until default skin is considered ready.

Cheers.

-Evgeny.

link

Comments

Great Evgeny, thanks! Pekka (Apr 23 '10)

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: Apr 22 '10

Seen: 656 times

Last updated: Apr 25 '10