自定义 Moodle 登录页面
Customising Moodle login page
我想自定义 Moodle 登录页面。这就是为什么我想将 "Username" 之类的关键字更改为 "uid",并将关键字 "password" 更改为 "Userpassword"。
我使用的是 Moodle 版本:2.7,主题:干净。
建议我更改这些关键字的一些步骤。
您可以通过菜单更改语言字符串
站点管理 -> 语言 -> 语言自定义 -> 选择语言 -> 搜索字符串
在幕后,这将在 moodledata/lang/
中创建一个本地版本
例如:moodledata/lang/en_local/moodle.php
这比修改核心代码要好
或者您可以直接创建上述文件并添加需要修改的字符串,例如;
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Local language pack from http://yourwebsite.com
*
* @package core
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['password'] = 'Userpassword';
$string['username'] = 'uid';
我想自定义 Moodle 登录页面。这就是为什么我想将 "Username" 之类的关键字更改为 "uid",并将关键字 "password" 更改为 "Userpassword"。
我使用的是 Moodle 版本:2.7,主题:干净。
建议我更改这些关键字的一些步骤。
您可以通过菜单更改语言字符串
站点管理 -> 语言 -> 语言自定义 -> 选择语言 -> 搜索字符串
在幕后,这将在 moodledata/lang/
例如:moodledata/lang/en_local/moodle.php
这比修改核心代码要好
或者您可以直接创建上述文件并添加需要修改的字符串,例如;
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Local language pack from http://yourwebsite.com
*
* @package core
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['password'] = 'Userpassword';
$string['username'] = 'uid';