简体   繁体   中英

Chamilo 2.1 - How to create new themes properly?

I am new to Chamilo 2.1, which is an open-source LMS.

I initially posted this question in the official chamilo support forum some days ago. But as long as nobody knew or cared to answer there, I'm reposting it here in hope that maybe someone could have knowledge on the matter, willing to share. [ original post ]

I would like to know if there is a 'proper' way to create a new theme in addition to the current ones (aqua, ruby).

What I've gathered from my search in their forums, nobody yet has attempted creating a new theme, but only modifying the basic one (aqua). That is, as they say, by altering the css inside aqua theme, and probably find the address of the header image and replace it with one of their choice with the same name.

Haven't tried yet the above, but, well it doesn't sound like the correct approach. Moreover, I would like to keep aqua theme, too, not to destroy it.

An idea I had, based on that thought, was duplicating the 'aqua' folder inside ./common/libraries/resources/ and renaming it to 'aqua2'. Though 'aqua2' was present and selectable in the administration settings panel as a choice (under aqua and ruby), when activating it, it didn't really work...

But trying to dig inside Chamilo 2.1 folders, I managed to find a file called 'theme_generator.php' under ./common/libraries/php/util/theme_generator. I saw it does a bunch of stuff creating folders, copying aqua theme files etc, but does it really do what I think it does? Is it called somewhere from inside the web interface? (i don't know any php by the way, i'm just doing css stuff).

I would appreciate any feedback or help on the matter. Thanks in advance

There is no theme manager yet in the already released versions of chamilo lcms connect (2.1 and 3.0) and afaik there isn't one planned for the next release either.

Chamilo lcms connect is a collection of packages, some have to be installed (the core) some are optional.

Every package handles its own themes, images, translations, etc. So if you want a new theme you indeed need to copy/rename all the aqua folders in all the packages you want to use.

In our production system we did do it like that but we did not copy/implement the CSS in most of those folders, we just provide the (empty) files and import the CSS from the aqua CSS files.

You do need to have both a CSS folder with the necessary CSS files and an image folder for your theme in every package you will use, or your theme will not work.

You will probably only have to change the CSS file in the common package since there the main colors and headers and footers are set.

I can imagine in the future there will be an automated script to do this for you but for the moment, ore maybe there will be a mechanisms to default to the aqua theme when files are not found, but for now developers are focusing on other things so you will have to figure it out for yourself.

chamilo lcms connect (2.1, 3.0) and chamilo lms (1.*) do not share any code and handle things differently.

There is no documentation (as far as I know) as to how to write a new theme. You might want to try the IRC channel during the week to get more attention, or write to dev at lists.chamilo.org (I'll approve your mail so you don't have to subscribe).

Just as a bit of additional info, Chamilo 1.8 and 2.1 are not the same product, they will be renamed Chamilo LMS and Chamilo Connect Core respectively. Both are managed by the Chamilo association, but two different teams are working on them (with obviously frequent communication).

I have not used Chamilo 2.1, but I am experienced in Chamilo 1.8.8.4. I have changed the theme by copying an already existing theme and changed it to my liking by modifying the css. There i can manipulate the colors. I changed the header-logo.png in the css/nameoftheme/images directory. Make sure that the image is not larger than 316 by 84 pixels, or the image will not show.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM