English 中文(简体)
创建Moodle 2 主题
原标题:Creating a Moodle 2 theme

我创造了一个新的Moodle主题, 就像Moodle文件所暗示的那样。

在 config.php 文件中,我这样定义了布局 :

$THEME->layouts = array(
    // Most pages - if we encounter an unknown or a missing page type, this one is used.
     base  => array(
         theme  =>  nop ,
         file  =>  general.php ,
         regions  => array( side-pre ,  side-post ),
         defaultregion  =>  side-post 
    ),
     standard  => array(
         theme  =>  nop ,
         file  =>  general.php ,
         regions  => array( side-pre ,  side-post ),
         defaultregion  =>  side-post 
    )
);

创建它后, 我选择了它, 在 Moodle 管理区, 并清理缓存 。 在 管理主题选择页面中, 我可以看到这个主题的颜色、 样式和新界面, 但是, 在 Moodle 的其他地区( 其它页面) 我看不到它 。

有人知道为什么会发生这种怪事吗?

谢谢

最佳回答

我可以在配置.php 文件中添加这个代码来解决它。

$THEME->layouts = array(    // Most pages - if we encounter an unknown or a missing page type, this one is used.
     base  => array(
         theme  =>  nop ,
         file  =>  general.php ,
         regions  => array( side-pre ,  side-post ),
         defaultregion  =>  side-post 
    ),
     standard  => array(
         theme  =>  nop ,
         file  =>  general.php ,
         regions  => array( side-pre ,  side-post ),
         defaultregion  =>  side-post 
    ),
     frontpage  => array(
         theme  =>  nop ,
         file  =>  general.php ,
         regions  => array( side-pre ,  side-post ),
         defaultregion  =>  side-post 
    ) );
问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签