diff --git a/admin/auth.php b/admin/auth.php index 41d12ab6122..dd73e0ae1d0 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -91,7 +91,7 @@ "$stradministration -> $strauthenticationoptions", "$focus"); echo "
"; - echo ""; + echo "main_frame}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">"; print_string("chooseauthmethod","auth"); choose_from_menu ($options, "auth", $auth, "","top.location='auth.php?auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", ""); diff --git a/config-dist.php b/config-dist.php index 9836dd99e5c..fb09e7d0f1b 100644 --- a/config-dist.php +++ b/config-dist.php @@ -113,4 +113,6 @@ require_once("$CFG->dirroot/lib/setup.php"); // Do not change this // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES, // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE. + +$CFG->main_frame = '_top'; ?> diff --git a/lib/weblib.php b/lib/weblib.php index db868a645ca..f6c0153a769 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -364,7 +364,7 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos $nothing = get_string("choose")."..."; } - $output = ""; + $output = "main_frame}\" NAME=$formname>"; $output .= "\n"; if ($nothing != "") { @@ -653,10 +653,10 @@ function print_footer ($course=NULL) { $course = get_site(); $homepage = true; } else { - $homelink = "wwwroot/course/view.php?id=$course->id\">$course->shortname"; + $homelink = "main_frame}\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname"; } } else { - $homelink = "wwwroot\">".get_string("home").""; + $homelink = "main_frame}\" HREF=\"$CFG->wwwroot\">".get_string("home").""; $course = get_site(); } @@ -690,7 +690,7 @@ function print_navigation ($navigation) { if (! $site = get_site()) { $site->shortname = get_string("home");; } - echo "wwwroot/\">$site->shortname -> $navigation"; + echo "main_frame}\" HREF=\"$CFG->wwwroot/\">$site->shortname -> $navigation"; } } @@ -1141,6 +1141,16 @@ function notice_yesno ($message, $linkyes, $linkno) { print_simple_box_end(); } +/* This is an alternate beginning to the redirect function +function redirect($url, $message="", $delay=false) { +// Uses META tags to redirect the user, after printing a notice + if(!empty($message) && $delay == false): + $delay = 10; + else: + $delay = 0; + endif; +*/ + function redirect($url, $message="", $delay=0) { // Uses META tags to redirect the user, after printing a notice diff --git a/mod/resource/view.php b/mod/resource/view.php index 00842ee4a96..e008e783531 100644 --- a/mod/resource/view.php +++ b/mod/resource/view.php @@ -23,10 +23,10 @@ if ($course->category) { require_login($course->id); - $navigation = "id\">$course->shortname -> - id\">$strresources ->"; + $navigation = "main_frame}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname -> + main_frame}\" HREF=\"index.php?id=$course->id\">$strresources ->"; } else { - $navigation = "id\">$strresources ->"; + $navigation = "main_frame}\" HREF=\"index.php?id=$course->id\">$strresources ->"; } @@ -54,7 +54,7 @@ case WEBPAGE: if (!empty($frameset)) { print_header("$course->shortname: $resource->name", "$course->fullname", - "$navigation reference\" TITLE=\"$resource->reference\">$resource->name", + "$navigation main_frame}\" HREF=\"$resource->reference\" TITLE=\"$resource->reference\">$resource->name", "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm)); echo "".text_to_html($resource->summary, true, false).""; @@ -69,18 +69,22 @@ break; case UPLOADEDFILE: + if ($CFG->slasharguments) { + $ffurl = "file.php/$course->id/$resource->reference"; + } else { + $ffurl = "file.php?file=/$course->id/$resource->reference"; + } + if (!empty($frameset)) { print_header("$course->shortname: $resource->name", "$course->fullname", "$navigation $resource->name", "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm)); echo "".text_to_html($resource->summary, true, false).""; - + echo "If you cannot see the file in your + browser, and were not prompted to save the file, please try the + following link (you may need to right click and choose + "Save As"):wwwroot}/$ffurl\">{$resource->name}"; } else { add_to_log($course->id, "resource", "view", "view.php?id=$cm->id", "$resource->id"); - if ($CFG->slasharguments) { - $ffurl = "file.php/$course->id/$resource->reference"; - } else { - $ffurl = "file.php?file=/$course->id/$resource->reference"; - } echo "$course->shortname: $resource->name\n"; echo ""; echo "id&frameset=true\">"; diff --git a/mod/survey/report.php b/mod/survey/report.php index 47f442caa8f..0ff965cfc09 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -61,12 +61,12 @@ switch ($action) { case "top": if ($course->category) { - $navigation = "id\">$course->shortname -> - id\">$strsurveys -> - id\">$survey->name -> "; + $navigation = "main_frame}\" HREF=\"../../course/view.php?id=$course->id\">$course->shortname -> + main_frame}\" HREF=\"index.php?id=$course->id\">$strsurveys -> + main_frame}\" HREF=\"view.php?id=$cm->id\">$survey->name -> "; } else { - $navigation = "id\">$strsurveys -> - id\">$survey->name -> "; + $navigation = "main_frame}\" HREF=\"index.php?id=$course->id\">$strsurveys -> + main_frame}\" HREF=\"view.php?id=$cm->id\">$survey->name -> "; } print_header("$course->shortname: $survey->name", "$course->fullname", "$navigation $strreport"); break; diff --git a/theme/oceanblue/header.html_logo b/theme/oceanblue/header.html_logo index 731dfef70d5..d45b1d323be 100644 --- a/theme/oceanblue/header.html_logo +++ b/theme/oceanblue/header.html_logo @@ -14,7 +14,7 @@ - + =$menu ?> diff --git a/theme/poweraid/header.html b/theme/poweraid/header.html index 6280253dd4f..f28c100caa6 100644 --- a/theme/poweraid/header.html +++ b/theme/poweraid/header.html @@ -58,7 +58,7 @@ -wwwroot/theme/$CFG->theme/$THEME->frontlogo" ?>" border="0" /> +main_frame}\" HREF=" echo $CFG->wwwroot?>">wwwroot/theme/$CFG->theme/$THEME->frontlogo" ?>" border="0" /> @@ -99,7 +99,7 @@ -wwwroot/theme/$CFG->theme/$THEME->smalllogo" ?>" border="0" /> +wwwroot/theme/$CFG->theme/$THEME->smalllogo" ?>" border="0" />