]> git.mjollnir.org Git - moodle.git/commitdiff
Better tooltip help on post attachments
authormoodler <moodler>
Fri, 9 May 2003 06:03:47 +0000 (06:03 +0000)
committermoodler <moodler>
Fri, 9 May 2003 06:03:47 +0000 (06:03 +0000)
lang/en/moodle.php
mod/forum/lib.php

index 6547a8e643af8d213e0615906cbfefcd849ec613..a69b511b59adda1f90ed2bc880eb54db6c925383 100644 (file)
@@ -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";
index 6cd5f691ab2ca8e0da88612cc6d6171c7ae07886..74da1cf6b40c36e41a240779026b113113261301 100644 (file)
@@ -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 = "<IMG BORDER=0 SRC=\"$CFG->wwwroot/files/pix/$icon\" HEIGHT=16 WIDTH=16 ALT=\"File\">";
+                $image = "<img border=0 src=\"$CFG->wwwroot/files/pix/$icon\" height=16 width=16 alt=\"$strpopupwindow\">";
 
                 if ($return == "html") {
-                    $output .= "<A HREF=\"$CFG->wwwroot/$ffurl\">$image</A> ";
-                    $output .= "<A HREF=\"$CFG->wwwroot/$ffurl\">$file</A><BR>";
+                    $output .= "<a href=\"$CFG->wwwroot/$ffurl\">$image</a> ";
+                    $output .= "<a href=\"$CFG->wwwroot/$ffurl\">$file</a><br />";
 
                 } else if ($return == "text") {
                     $output .= "$strattachment $file:\n$CFG->wwwroot/$ffurl\n";
 
                 } else {
                     link_to_popup_window("/$ffurl", "attachment", $image, 500, 500, $strattachment);
-                    echo "<A HREF=\"$CFG->wwwroot/$ffurl\">$file</A>";
-                    echo "<BR>";
+                    echo "<a href=\"$CFG->wwwroot/$ffurl\">$file</a>";
+                    echo "<br />";
                 }
             }
         }