diff --git a/theme/magazine/config.php b/theme/magazine/config.php index 1e4fc8a8b52..e219986ff1b 100644 --- a/theme/magazine/config.php +++ b/theme/magazine/config.php @@ -1,4 +1,26 @@ . + +/** + * 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(); diff --git a/theme/magazine/lang/en/theme_magazine.php b/theme/magazine/lang/en/theme_magazine.php index 6388767fbd6..c4331619cf0 100644 --- a/theme/magazine/lang/en/theme_magazine.php +++ b/theme/magazine/lang/en/theme_magazine.php @@ -1,4 +1,27 @@ . + +/** + * 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'; diff --git a/theme/magazine/layout/embedded.php b/theme/magazine/layout/embedded.php index 53e94c8732e..2ba6947a70f 100644 --- a/theme/magazine/layout/embedded.php +++ b/theme/magazine/layout/embedded.php @@ -1,4 +1,28 @@ -doctype() ?> +. + +/** + * 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() ?> htmlattributes() ?>> <?php echo $PAGE->title ?> diff --git a/theme/magazine/layout/frontpage.php b/theme/magazine/layout/frontpage.php index f197cc46337..1977f87af43 100644 --- a/theme/magazine/layout/frontpage.php +++ b/theme/magazine/layout/frontpage.php @@ -1,4 +1,27 @@ . + +/** + * 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'])); diff --git a/theme/magazine/layout/general.php b/theme/magazine/layout/general.php index 7afc75d76b6..c016a3f41c0 100644 --- a/theme/magazine/layout/general.php +++ b/theme/magazine/layout/general.php @@ -1,4 +1,26 @@ . + +/** + * 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'])); diff --git a/theme/magazine/lib.php b/theme/magazine/lib.php index 402cada60f8..b7750f3ad70 100644 --- a/theme/magazine/lib.php +++ b/theme/magazine/lib.php @@ -1,4 +1,26 @@ . + +/** + * 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; diff --git a/theme/magazine/settings.php b/theme/magazine/settings.php index 7ea5870acde..c6712f82e9b 100644 --- a/theme/magazine/settings.php +++ b/theme/magazine/settings.php @@ -1,10 +1,32 @@ . + +/** + * 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'); diff --git a/theme/magazine/version.php b/theme/magazine/version.php index fa4d45ed844..bbd8b49d256 100644 --- a/theme/magazine/version.php +++ b/theme/magazine/version.php @@ -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, );