From: moodler Date: Fri, 9 May 2003 06:03:47 +0000 (+0000) Subject: Better tooltip help on post attachments X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6afe855886f451ad0854f10b4714a59fd2c129cd;p=moodle.git Better tooltip help on post attachments --- diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 6547a8e643..a69b511b59 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -476,6 +476,7 @@ $string['passwordsenttext'] = " $string['people'] = "People"; $string['personalprofile'] = "Personal profile"; $string['phone'] = "Phone"; +$string['popupwindow'] = "Open file in new window"; $string['potentialadmins'] = "Potential admins"; $string['potentialcreators'] = "Potential course creators"; $string['potentialteachers'] = "Potential teachers"; diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 6cd5f691ab..74da1cf6b4 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1178,6 +1178,7 @@ function forum_print_attachments($post, $return=NULL) { if ($basedir = forum_file_area($post)) { if ($files = get_directory_list($basedir)) { $strattachment = get_string("attachment", "forum"); + $strpopupwindow = get_string("popupwindow"); foreach ($files as $file) { $icon = mimeinfo("icon", $file); if ($CFG->slasharguments) { @@ -1185,19 +1186,19 @@ function forum_print_attachments($post, $return=NULL) { } else { $ffurl = "file.php?file=/$filearea/$file"; } - $image = "wwwroot/files/pix/$icon\" HEIGHT=16 WIDTH=16 ALT=\"File\">"; + $image = "wwwroot/files/pix/$icon\" height=16 width=16 alt=\"$strpopupwindow\">"; if ($return == "html") { - $output .= "wwwroot/$ffurl\">$image "; - $output .= "wwwroot/$ffurl\">$file
"; + $output .= "wwwroot/$ffurl\">$image "; + $output .= "wwwroot/$ffurl\">$file
"; } else if ($return == "text") { $output .= "$strattachment $file:\n$CFG->wwwroot/$ffurl\n"; } else { link_to_popup_window("/$ffurl", "attachment", $image, 500, 500, $strattachment); - echo "wwwroot/$ffurl\">$file"; - echo "
"; + echo "wwwroot/$ffurl\">$file"; + echo "
"; } } }