Cleaned up the remaining images:
authormoodler <moodler>
Mon, 28 Jul 2003 11:42:53 +0000 (11:42 +0000)
committermoodler <moodler>
Mon, 28 Jul 2003 11:42:53 +0000 (11:42 +0000)
 - moved user images to /pix/u folder, and changed format to .png to allow
   transparent images etc.  These can now be customised in themes.

 - removed legacy madewithmoodle logos

lib/weblib.php
pix/madewithmoodle2.gif [deleted file]
pix/madewithmoodle3.gif [deleted file]
pix/u/f1.png [new file with mode: 0755]
pix/u/f2.png [new file with mode: 0755]
theme/cordoroyblue/pix/u/f1.png [new file with mode: 0755]
theme/cordoroyblue/pix/u/f2.png [new file with mode: 0755]
user/default/f1.jpg [deleted file]
user/default/f2.jpg [deleted file]
user/pix.php

index e87e53e..f00c7e8 100644 (file)
@@ -718,7 +718,7 @@ function print_footer ($course=NULL) {
     if ($course) {
         if ($course == "home") {   // special case for site home page - please do not remove
             $homelink  = "<p align=\"center\"><a title=\"moodle $CFG->release ($CFG->version)\" href=\"http://moodle.org/\" target=\"_blank\">";
-            $homelink .= "<br><img width=\"130\" height=\"19\" src=\"pix/madewithmoodle2.gif\" border=0></a></p>";
+            $homelink .= "<br><img width=\"130\" height=\"19\" src=\"pix/madewithmoodle.gif\" border=0></a></p>";
             $course = get_site();
             $homepage = true;
         } else {
@@ -873,7 +873,7 @@ function print_file_picture($path, $courseid=0, $height="", $width="", $link="")
 }
 
 function print_user_picture($userid, $courseid, $picture, $large=false, $returnstring=false, $link=true) {
-    global $CFG;
+    global $CFG, $THEME;
 
     if ($link) {
         $output = "<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">";
@@ -881,20 +881,29 @@ function print_user_picture($userid, $courseid, $picture, $large=false, $returns
         $output = "";
     }
     if ($large) {
-        $file = "f1.jpg";
+        $file = "f1";
         $size = 100;
     } else {
-        $file = "f2.jpg";
+        $file = "f2";
         $size = 35;
     }
-    if ($picture) {
+    if ($picture) {  // Print custom user picture
         if ($CFG->slasharguments) {        // Use this method if possible for better caching
-            $output .= "<img align=absmiddle src=\"$CFG->wwwroot/user/pix.php/$userid/$file\" border=0 width=$size height=$size alt=\"\">";
+            $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/user/pix.php/$userid/$file.jpg\"".
+                       " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
         } else {
-            $output .= "<img align=absmiddle src=\"$CFG->wwwroot/user/pix.php?file=/$userid/$file\" border=0 width=$size height=$size alt=\"\">";
+            $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/user/pix.php?file=/$userid/$file.jpg\"".
+                       " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
         }
-    } else {
-        $output .= "<img align=absmiddle src=\"$CFG->wwwroot/user/default/$file\" border=0 width=$size height=$size alt=\"\">";
+    } else {         // Print default user pictures (use theme version if available)
+        if (empty($THEME->custompix)) {
+            $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/pix/u/$file.png\"".
+                       " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
+        } else {
+            $output .= "<img align=\"absmiddle\" src=\"$CFG->wwwroot/theme/$CFG->theme/pix/u/$file.png\"".
+                       " border=\"0\" width=\"$size\" height=\"$size\" alt=\"\">";
+        }
+
     }
     if ($link) {
         $output .= "</a>";
diff --git a/pix/madewithmoodle2.gif b/pix/madewithmoodle2.gif
deleted file mode 100644 (file)
index e19dda3..0000000
Binary files a/pix/madewithmoodle2.gif and /dev/null differ
diff --git a/pix/madewithmoodle3.gif b/pix/madewithmoodle3.gif
deleted file mode 100755 (executable)
index 07a7754..0000000
Binary files a/pix/madewithmoodle3.gif and /dev/null differ
diff --git a/pix/u/f1.png b/pix/u/f1.png
new file mode 100755 (executable)
index 0000000..38a7549
Binary files /dev/null and b/pix/u/f1.png differ
diff --git a/pix/u/f2.png b/pix/u/f2.png
new file mode 100755 (executable)
index 0000000..f9f69d7
Binary files /dev/null and b/pix/u/f2.png differ
diff --git a/theme/cordoroyblue/pix/u/f1.png b/theme/cordoroyblue/pix/u/f1.png
new file mode 100755 (executable)
index 0000000..38a7549
Binary files /dev/null and b/theme/cordoroyblue/pix/u/f1.png differ
diff --git a/theme/cordoroyblue/pix/u/f2.png b/theme/cordoroyblue/pix/u/f2.png
new file mode 100755 (executable)
index 0000000..f9f69d7
Binary files /dev/null and b/theme/cordoroyblue/pix/u/f2.png differ
diff --git a/user/default/f1.jpg b/user/default/f1.jpg
deleted file mode 100755 (executable)
index bf2b177..0000000
Binary files a/user/default/f1.jpg and /dev/null differ
diff --git a/user/default/f2.jpg b/user/default/f2.jpg
deleted file mode 100755 (executable)
index 5580c65..0000000
Binary files a/user/default/f2.jpg and /dev/null differ
index fd06d3c..073ba4c 100644 (file)
         $userid = (integer)$args[0];
         $image  = $args[1];
         $pathname = "$CFG->dataroot/users/$userid/$image";
+        $filetype = "image/jpeg";
     } else {
-        $pathname = "$CFG->dirroot/user/default/f1.jpg";
+        $pathname = "$CFG->dirroot/pix/u/f1.png";
+        $filetype = "image/png";
     }
 
     $lastmodified = filemtime($pathname);
@@ -37,7 +39,7 @@
         header("Pragma: ");
         header("Content-disposition: inline; filename=$image");
         header("Content-length: ".filesize($pathname));
-        header("Content-type: image/jpeg");
+        header("Content-type: $filetype");
         readfile("$pathname");
     }