简体   繁体   English

Chamilo 2.1-如何正确创建新主题?

[英]Chamilo 2.1 - How to create new themes properly?

I am new to Chamilo 2.1, which is an open-source LMS. 我不熟悉Chamilo 2.1,它是一个开源LMS。

I initially posted this question in the official chamilo support forum some days ago. 我最初几天前在官方chamilo支持论坛上发布了这个问题。 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). 从他们在论坛中的搜索中收集到的信息,还没有人尝试创建新主题,而只是修改了基本主题(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. 就是说,正如他们所说,通过更改Aqua主题内的css,可能会找到标头图像的地址,并将其替换为他们选择的同名图像之一。

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'. 基于这种想法,我的想法是复制./common/libraries/resources/中的'aqua'文件夹并将其重命名为'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... 尽管在管理设置面板中存在并可以选择“ aqua2”(在aqua和ruby下),但是在激活它时,它实际上并没有工作...

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. 但是尝试在Chamilo 2.1文件夹中进行挖掘,我设法在./common/libraries/php/util/theme_generator下找到了一个名为“ theme_generator.php”的文件。 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? 我看到它做了很多工作,例如创建文件夹,复制Aqua主题文件等,但是它确实可以实现我认为的功能吗? Is it called somewhere from inside the web interface? 它是从Web界面内部调用的吗? (i don't know any php by the way, i'm just doing css stuff). (我不知道任何PHP,我只是在做CSS的东西)。

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(2.1和3.0)的已经发布的版本中还没有主题管理器,而afaik也没有计划在下一个版本中使用。

Chamilo lcms connect is a collection of packages, some have to be installed (the core) some are optional. Chamilo lcms connect是软件包的集合,一些必须安装(核心),一些是可选的。

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. 每个软件包都处理自己的主题,图像,翻译等。因此,如果您想要一个新主题,则确实需要复制/重命名所有要使用的软件包中的所有Aqua文件夹。

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. 在生产系统中,我们是这样做的,但是我们没有在大多数文件夹中复制/实现CSS,我们仅提供(空)文件,并从aqua CSS文件导入CSS。

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. 您确实需要在要使用的每个程序包中同时拥有一个包含必要CSS文件的CSS文件夹和一个用于主题的图像文件夹,否则您的主题将无法正常工作。

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. 您可能只需要更改通用包中的CSS文件,因为在那里设置了主要的颜色,页眉和页脚。

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. 我可以想象,将来会有一个自动化脚本为您执行此操作,但是目前,也许当找不到文件时,可能会有一种机制默认使用aqua主题,但是目前开发人员正在专注于其他事情因此您必须自己弄清楚。

chamilo lcms connect (2.1, 3.0) and chamilo lms (1.*) do not share any code and handle things differently. chamilo lcms connect(2.1,3.0)和chamilo lms(1. *)不会共享任何代码,并且处理方式也不同。

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). 您可能希望在一周内尝试IRC频道以获得更多关注,或 list.chamilo.org上写信给dev(我会批准您的邮件,因此您无需订阅)。

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. 就像其他信息一样,Chamilo 1.8和2.1不是同一产品,它们将分别重命名为Chamilo LMS和Chamilo Connect Core。 Both are managed by the Chamilo association, but two different teams are working on them (with obviously frequent communication). 两者都是由Chamilo协会管理的,但是两个不同的团队正在为他们工作(显然需要经常沟通)。

I have not used Chamilo 2.1, but I am experienced in Chamilo 1.8.8.4. 我没有使用Chamilo 2.1,但是我对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. 我通过复制一个已经存在的主题来更改主题,并通过修改CSS使其符合我的喜好。 There i can manipulate the colors. 在那里我可以操纵颜色。 I changed the header-logo.png in the css/nameoftheme/images directory. 我更改了css/nameoftheme/images目录中的header-logo.png Make sure that the image is not larger than 316 by 84 pixels, or the image will not show. 确保图像不大于316 x 84像素,否则图像将不会显示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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