]> git.mjollnir.org Git - moodle.git/commitdiff
Some modification so that the encyclopedia format looks
authormoodler <moodler>
Fri, 17 Oct 2003 08:19:56 +0000 (08:19 +0000)
committermoodler <moodler>
Fri, 17 Oct 2003 08:19:56 +0000 (08:19 +0000)
more like forum posts (in fact it uses the same styles)

mod/glossary/formats/3.php
mod/glossary/showentry.php

index ea58b9609f12f8397c1939a2855d1d69956feedb..e836313700f7df517c80097632ed3d8f97f92502 100644 (file)
@@ -1,36 +1,31 @@
 <?PHP  // $Id$
 require_once("lib.php");
 
-function glossary_print_entry_by_format($course, $cm, $glossary, $entry,$currentview="",$cat="") {
+function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $currentview="",$cat="") {
     global $THEME, $CFG, $USER;
 
-//    if ($entry->timemarked < $entry->modified) {
-        $colour = $THEME->cellheading2;
-//    } else {
-//        $colour = $THEME->cellheading;
-//    }
+    $colour = $THEME->cellheading2;
 
     $user = get_record("user", "id", $entry->userid);
-    $strby = get_string("writtenby","glossary");
+    $strby = get_string("writtenby", "glossary");
 
-    echo "<table width=95% border=0><tr><td>";
+    echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
 
-    echo "\n<TABLE BORDER=1 width=100% CELLSPACING=0 valign=top cellpadding=10>";
-
-    echo "\n<TR>";
-    echo "\n<TD ROWSPAN=2 BGCOLOR=\"$colour\" WIDTH=35 VALIGN=TOP>";
+    echo "\n<tr>";
+    echo "\n<td rowspan=2 bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
     if ($entry) {
-          print_user_picture($user->id, $course->id, $user->picture);
+        print_user_picture($user->id, $course->id, $user->picture);
     }
-    echo "</TD>";
-    echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">";
+    echo "</td>";
+    echo "<td nowrap width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
     if ($entry) {
-        echo "<b>$entry->concept</b><br><FONT SIZE=2>$strby $user->firstname $user->lastname</font>";
-        echo "&nbsp;&nbsp;<FONT SIZE=1>(".get_string("lastedited").": ".userdate($entry->timemodified).")</FONT></small>";
+        echo "<b>$entry->concept</b><br />";
+        echo "<font size=\"2\">$strby $user->firstname $user->lastname</font>";
+        echo "&nbsp;&nbsp;<font size=1>(".get_string("lastedited").": ".userdate($entry->timemodified).")</font></small>";
     }
-    echo "</TR>";
+    echo "</tr>";
 
-    echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
+    echo "\n<tr><td width=100% bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
     if ($entry) {
         if ($entry->attachment) {
             $entry->course = $course->id;
@@ -52,11 +47,9 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry,$current
         print_string("noentry", "glossary");
          echo "</center>";
     }
-    echo "</TD></TR>";
-
-    echo "</TABLE>\n";
+    echo "</td></tr>";
 
-    echo "</td></tr></table>";
+    echo "</table>\n";
 }
 
 ?>
index 0b36d94f2551b744b8a1bfd84fe23eb2757cdd5f..4377dfbbb774633eea1dbae36111ec18a4a6ad9d 100644 (file)
@@ -18,8 +18,8 @@
 
         $colour = $THEME->cellheading2;
 
-        echo "\n<center><table width=95% border=0><TR>";
-        echo "<TD WIDTH=100% BGCOLOR=\"#FFFFFF\">";
+        echo "\n<center><table width=95% border=0><tr>";
+        echo "<td width=100%\">";
         if ( $entries ) {
             foreach ( $entries as $entry ) {
 
@@ -37,7 +37,7 @@
             }
         }
         echo "</td>";
-        echo "</TR></table></center>";
+        echo "</tr></table></center>";
     }
 
 ?>