mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 09:55:33 +02:00
Merge branch '44206-27' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
faefe571c5
theme/magazine
@ -1,4 +1,26 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Magazine theme configuration.
|
||||
*
|
||||
* @package theme_magazine
|
||||
* @copyright 2010 John Stabinger (http://newschoollearning.com/)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
@ -1,4 +1,27 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Language strings for the magazine theme.
|
||||
*
|
||||
* @package theme_magazine
|
||||
* @copyright 2010 John Stabinger (http://newschoollearning.com/)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Magazine';
|
||||
$string['region-side-post'] = 'Right';
|
||||
$string['region-side-pre'] = 'Left';
|
||||
|
@ -1,4 +1,28 @@
|
||||
<?php echo $OUTPUT->doctype() ?>
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* The embedded layout.
|
||||
*
|
||||
* @package theme_magazine
|
||||
* @copyright 2010 John Stabinger (http://newschoollearning.com/)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
<head>
|
||||
<title><?php echo $PAGE->title ?></title>
|
||||
|
@ -1,4 +1,27 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* The frontpage layout.
|
||||
*
|
||||
* @package theme_magazine
|
||||
* @copyright 2010 John Stabinger (http://newschoollearning.com/)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$hasheading = ($PAGE->heading);
|
||||
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||
$hasfooter = (empty($PAGE->layout_options['nofooter']));
|
||||
|
@ -1,4 +1,26 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* The default layout.
|
||||
*
|
||||
* @package theme_magazine
|
||||
* @copyright 2010 John Stabinger (http://newschoollearning.com/)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
$hasheading = ($PAGE->heading);
|
||||
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||
$hasfooter = (empty($PAGE->layout_options['nofooter']));
|
||||
|
@ -1,4 +1,26 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* This file contains functions specific to the needs of the Magazine theme.
|
||||
*
|
||||
* @package theme_magazine
|
||||
* @copyright 2010 John Stabinger (http://newschoollearning.com/)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* Makes our changes to the CSS
|
||||
@ -9,7 +31,7 @@
|
||||
*/
|
||||
function magazine_process_css($css, $theme) {
|
||||
|
||||
// Set the link color
|
||||
// Set the link color.
|
||||
if (!empty($theme->settings->linkcolor)) {
|
||||
$linkcolor = $theme->settings->linkcolor;
|
||||
} else {
|
||||
@ -17,80 +39,82 @@ function magazine_process_css($css, $theme) {
|
||||
}
|
||||
$css = magazine_set_linkcolor($css, $linkcolor);
|
||||
|
||||
// Set the link hover color
|
||||
// Set the link hover color.
|
||||
if (!empty($theme->settings->linkhover)) {
|
||||
$linkhover = $theme->settings->linkhover;
|
||||
} else {
|
||||
$linkhover = null;
|
||||
}
|
||||
$css = magazine_set_linkhover($css, $linkhover);
|
||||
|
||||
// Set the main color
|
||||
|
||||
// Set the main color.
|
||||
if (!empty($theme->settings->maincolor)) {
|
||||
$maincolor = $theme->settings->maincolor;
|
||||
} else {
|
||||
$maincolor = null;
|
||||
}
|
||||
$css = magazine_set_maincolor($css, $maincolor);
|
||||
|
||||
// Set the main accent color
|
||||
|
||||
// Set the main accent color.
|
||||
if (!empty($theme->settings->maincoloraccent)) {
|
||||
$maincoloraccent = $theme->settings->maincoloraccent;
|
||||
} else {
|
||||
$maincoloraccent = null;
|
||||
}
|
||||
$css = magazine_set_maincoloraccent($css, $maincoloraccent);
|
||||
|
||||
// Set the main headings color
|
||||
|
||||
// Set the main headings color.
|
||||
if (!empty($theme->settings->headingcolor)) {
|
||||
$headingcolor = $theme->settings->headingcolor;
|
||||
} else {
|
||||
$headingcolor = null;
|
||||
}
|
||||
$css = magazine_set_headingcolor($css, $headingcolor);
|
||||
|
||||
// Set the block headings color
|
||||
|
||||
// Set the block headings color.
|
||||
if (!empty($theme->settings->blockcolor)) {
|
||||
$blockcolor = $theme->settings->blockcolor;
|
||||
} else {
|
||||
$blockcolor = null;
|
||||
}
|
||||
$css = magazine_set_blockcolor($css, $blockcolor);
|
||||
|
||||
// Set the forum background color
|
||||
|
||||
// Set the forum background color.
|
||||
if (!empty($theme->settings->forumback)) {
|
||||
$forumback = $theme->settings->forumback;
|
||||
} else {
|
||||
$forumback = null;
|
||||
}
|
||||
$css = magazine_set_forumback($css, $forumback);
|
||||
|
||||
// Set the body background image
|
||||
|
||||
// Set the body background image.
|
||||
if (!empty($theme->settings->background)) {
|
||||
$background = $theme->settings->background;
|
||||
} else {
|
||||
$background = null;
|
||||
}
|
||||
$css = magazine_set_background($css, $background, $theme);
|
||||
|
||||
// Set the logo image
|
||||
|
||||
// Set the logo image.
|
||||
if (!empty($theme->settings->logo)) {
|
||||
$logo = $theme->settings->logo;
|
||||
} else {
|
||||
$logo = null;
|
||||
}
|
||||
$css = magazine_set_logo($css, $logo, $theme);
|
||||
|
||||
|
||||
// Return the CSS
|
||||
// Return the CSS.
|
||||
return $css;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the link color variable in CSS
|
||||
* Sets the link color variable in CSS.
|
||||
*
|
||||
* @param string $css
|
||||
* @param string $linkcolor
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_linkcolor($css, $linkcolor) {
|
||||
$tag = '[[setting:linkcolor]]';
|
||||
@ -102,6 +126,12 @@ function magazine_set_linkcolor($css, $linkcolor) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the link hover colour in CSS.
|
||||
* @param string $css
|
||||
* @param string $linkhover
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_linkhover($css, $linkhover) {
|
||||
$tag = '[[setting:linkhover]]';
|
||||
$replacement = $linkhover;
|
||||
@ -112,6 +142,12 @@ function magazine_set_linkhover($css, $linkhover) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the main colour used by the Magazine theme.
|
||||
* @param string $css
|
||||
* @param string $maincolor
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_maincolor($css, $maincolor) {
|
||||
$tag = '[[setting:maincolor]]';
|
||||
$replacement = $maincolor;
|
||||
@ -122,6 +158,12 @@ function magazine_set_maincolor($css, $maincolor) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the colour for accents within the Magazine theme.
|
||||
* @param string $css
|
||||
* @param string $maincoloraccent
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_maincoloraccent($css, $maincoloraccent) {
|
||||
$tag = '[[setting:maincoloraccent]]';
|
||||
$replacement = $maincoloraccent;
|
||||
@ -132,6 +174,12 @@ function magazine_set_maincoloraccent($css, $maincoloraccent) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the heading colour in CSS.
|
||||
* @param string $css
|
||||
* @param string $headingcolor
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_headingcolor($css, $headingcolor) {
|
||||
$tag = '[[setting:headingcolor]]';
|
||||
$replacement = $headingcolor;
|
||||
@ -142,6 +190,12 @@ function magazine_set_headingcolor($css, $headingcolor) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block colour in CSS.
|
||||
* @param string $css
|
||||
* @param string $blockcolor
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_blockcolor($css, $blockcolor) {
|
||||
$tag = '[[setting:blockcolor]]';
|
||||
$replacement = $blockcolor;
|
||||
@ -152,6 +206,12 @@ function magazine_set_blockcolor($css, $blockcolor) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the forum back colour in CSS.
|
||||
* @param string $css
|
||||
* @param string $forumback
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_forumback($css, $forumback) {
|
||||
$tag = '[[setting:forumback]]';
|
||||
$replacement = $forumback;
|
||||
@ -162,6 +222,13 @@ function magazine_set_forumback($css, $forumback) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the background for the Magazine theme.
|
||||
* @param string $css
|
||||
* @param string $background
|
||||
* @param theme_config $theme
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_background($css, $background, $theme) {
|
||||
$tag = '[[setting:background]]';
|
||||
$replacement = $background;
|
||||
@ -172,6 +239,14 @@ function magazine_set_background($css, $background, $theme) {
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the logo for the Magazine theme.
|
||||
*
|
||||
* @param string $css
|
||||
* @param string $logo
|
||||
* @param theme_config $theme
|
||||
* @return string
|
||||
*/
|
||||
function magazine_set_logo($css, $logo, $theme) {
|
||||
$tag = '[[setting:logo]]';
|
||||
$replacement = $logo;
|
||||
|
@ -1,10 +1,32 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Settings for the magazine theme.
|
||||
*
|
||||
* @package theme_magazine
|
||||
* @copyright 2010 John Stabinger (http://newschoollearning.com/)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
if ($ADMIN->fulltree) {
|
||||
|
||||
// Background image setting
|
||||
// Background image setting.
|
||||
$name = 'theme_magazine/background';
|
||||
$title = get_string('background','theme_magazine');
|
||||
$description = get_string('backgrounddesc', 'theme_magazine');
|
||||
@ -12,7 +34,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// logo image setting
|
||||
// logo image setting.
|
||||
$name = 'theme_magazine/logo';
|
||||
$title = get_string('logo','theme_magazine');
|
||||
$description = get_string('logodesc', 'theme_magazine');
|
||||
@ -20,7 +42,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// link color setting
|
||||
// link color setting.
|
||||
$name = 'theme_magazine/linkcolor';
|
||||
$title = get_string('linkcolor','theme_magazine');
|
||||
$description = get_string('linkcolordesc', 'theme_magazine');
|
||||
@ -30,7 +52,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// link hover color setting
|
||||
// link hover color setting.
|
||||
$name = 'theme_magazine/linkhover';
|
||||
$title = get_string('linkhover','theme_magazine');
|
||||
$description = get_string('linkhoverdesc', 'theme_magazine');
|
||||
@ -40,7 +62,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// main color setting
|
||||
// main color setting.
|
||||
$name = 'theme_magazine/maincolor';
|
||||
$title = get_string('maincolor','theme_magazine');
|
||||
$description = get_string('maincolordesc', 'theme_magazine');
|
||||
@ -50,7 +72,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// main color accent setting
|
||||
// main color accent setting.
|
||||
$name = 'theme_magazine/maincoloraccent';
|
||||
$title = get_string('maincoloraccent','theme_magazine');
|
||||
$description = get_string('maincoloraccentdesc', 'theme_magazine');
|
||||
@ -60,7 +82,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// heading color setting
|
||||
// heading color setting.
|
||||
$name = 'theme_magazine/headingcolor';
|
||||
$title = get_string('headingcolor','theme_magazine');
|
||||
$description = get_string('headingcolordesc', 'theme_magazine');
|
||||
@ -70,7 +92,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// block heading color setting
|
||||
// block heading color setting.
|
||||
$name = 'theme_magazine/blockcolor';
|
||||
$title = get_string('blockcolor','theme_magazine');
|
||||
$description = get_string('blockcolordesc', 'theme_magazine');
|
||||
@ -80,7 +102,7 @@ if ($ADMIN->fulltree) {
|
||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||
$settings->add($setting);
|
||||
|
||||
// forum subject background color setting
|
||||
// forum subject background color setting.
|
||||
$name = 'theme_magazine/forumback';
|
||||
$title = get_string('forumback','theme_magazine');
|
||||
$description = get_string('forumbackdesc', 'theme_magazine');
|
||||
|
@ -24,9 +24,9 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2013110500; // The current module version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2013110500; // Requires this Moodle version
|
||||
$plugin->component = 'theme_magazine'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->version = 2013110500; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2013110500; // Requires this Moodle version.
|
||||
$plugin->component = 'theme_magazine'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->dependencies = array(
|
||||
'theme_canvas' => 2013110500,
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user