theme); $stradministration = get_string("administration"); $strconfiguration = get_string("configuration"); $strthemes = get_string("themes"); $strpreview = get_string("preview"); $strchoose = get_string("choose"); $strinfo = get_string("info"); $strtheme = get_string("theme"); $strthemesaved = get_string("themesaved"); $strscreenshot = get_string("screenshot"); $stroldtheme = get_string("oldtheme"); if ($choose and confirm_sesskey()) { if (!is_dir($choose)) { error("This theme is not installed!"); } if (set_config("theme", $choose)) { theme_setup($choose); print_header("$site->shortname: $strthemes", $site->fullname, "wwwroot/$CFG->admin/index.php\">$stradministration -> ". "wwwroot/$CFG->admin/configure.php\">$strconfiguration -> $strthemes"); print_heading(get_string("themesaved")); print_continue("$CFG->wwwroot/"); if (file_exists("$choose/README.html")) { print_simple_box_start("center"); readfile("$choose/README.html"); print_simple_box_end(); } else if (file_exists("$choose/README.txt")) { print_simple_box_start("center"); $file = file("$choose/README.txt"); echo format_text(implode('', $file), FORMAT_MOODLE); print_simple_box_end(); } print_footer(); exit; } else { error("Could not set the theme!"); } } print_header("$site->shortname: $strthemes", $site->fullname, "wwwroot/$CFG->admin/index.php\">$stradministration -> ". "wwwroot/$CFG->admin/configure.php\">$strconfiguration -> $strthemes"); print_heading($strthemes); $themes = get_list_of_plugins("theme"); $sesskey = !empty($USER->id) ? $USER->sesskey : ''; echo ""; echo ""; foreach ($themes as $theme) { unset($THEME); if (!file_exists("$CFG->dirroot/theme/$theme/config.php")) { // bad folder continue; } include_once("$CFG->dirroot/theme/$theme/config.php"); $readme = ''; $screenshot = ''; $screenshotpath = ''; if (file_exists("$theme/README.html")) { $readme = '
  • '. link_to_popup_window('/theme/'.$theme.'/README.html', $theme, $strinfo, 400, 500, '', 'none', true).'
  • '; } else if (file_exists("$theme/README.txt")) { $readme = '
  • '. link_to_popup_window('/theme/'.$theme.'/README.txt', $theme, $strinfo, 400, 500, '', 'none', true).'
  • '; } if (file_exists("$theme/screenshot.png")) { $screenshotpath = "$theme/screenshot.png"; } else if (file_exists("$theme/screenshot.jpg")) { $screenshotpath = "$theme/screenshot.jpg"; } echo ""; echo ""; } else { echo ""; } if ($CFG->theme == $theme) { echo ''; echo ""; } echo "
    $strtheme$strinfo
    "; if ($screenshotpath) { $screenshot = "
  • $strscreenshot
  • "; echo "
    '; } else { echo ''; } if (isset($THEME->sheets)) { echo '

    '.$theme.'

    '; } else { echo '

    '.$theme.' (Moodle 1.4)

    '; } echo '
      '; if ($screenshot or $readme) { echo "
    • $strpreview
    • "; } echo $screenshot.$readme; echo '
    '; $options = null; $options['choose'] = $theme; $options['sesskey'] = $sesskey; print_single_button('index.php', $options, $strchoose); echo '
    "; echo "
    "; $options["frame"] = "developer.html"; $options["sub"] = "themes"; print_single_button("$CFG->wwwroot/doc/index.php", $options, get_string("howtomakethemes")); echo "
    "; print_footer(); ?>