Skip to content

Commit

Permalink
Added styles for forum posts
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Dec 10, 2002
1 parent c6f0c3a commit d34189e
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 20 deletions.
34 changes: 14 additions & 20 deletions mod/forum/lib.php
Expand Up @@ -568,21 +568,19 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
global $THEME, $USER, $CFG;

if ($post->parent) {
echo "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1><TR><TD BGCOLOR=#888888>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 CLASS=\"forumpost\">";
} else {
echo "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=100%><TR><TD BGCOLOR=#888888>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 CLASS=\"forumpost\" WIDTH=100%>";
}

echo "<TR><TD BGCOLOR=\"$THEME->cellcontent2\" WIDTH=35 VALIGN=TOP>";
echo "<TR><TD BGCOLOR=\"$THEME->cellcontent2\" CLASS=\"forumpostpicture\" WIDTH=35 VALIGN=TOP>";
print_user_picture($post->userid, $courseid, $post->picture);
echo "</TD>";

if ($post->parent) {
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading\" WIDTH=\"100%\">";
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading\" CLASS=\"forumpostheader\" WIDTH=\"100%\">";
} else {
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading2\" WIDTH=\"100%*\">";
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading2\" CLASS=\"forumpostheadertopic\" WIDTH=\"100%*\">";
}
echo "<P>";
echo "<FONT SIZE=3><B>$post->subject</B></FONT><BR>";
Expand All @@ -591,9 +589,9 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
$by->date = userdate($post->created);
print_string("bynameondate", "forum", $by);
echo "</FONT></P></TD></TR>";
echo "<TR><TD BGCOLOR=\"$THEME->cellcontent2\" WIDTH=10>";
echo "<TR><TD BGCOLOR=\"$THEME->cellcontent2\" CLASS=\"forumpostside\" WIDTH=10>";
echo "&nbsp;";
echo "</TD><TD BGCOLOR=\"$THEME->cellcontent\">\n";
echo "</TD><TD BGCOLOR=\"$THEME->cellcontent\" CLASS=\"forumpostmessage\">\n";

if ($post->attachment) {
$post->course = $courseid;
Expand Down Expand Up @@ -664,7 +662,6 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
echo "<P>$footer</P>";
}
echo "</DIV>";
echo "</TD></TR></TABLE>";
echo "</TD></TR>\n</TABLE>\n\n";
}

Expand All @@ -673,21 +670,19 @@ function forum_print_post_header(&$post, $courseid, $ownpost=false, $reply=false
global $THEME, $USER, $CFG;

if ($post->parent) {
echo "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1><TR><TD BGCOLOR=#888888>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 CLASS=\"forumpost\">";
} else {
echo "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=100%><TR><TD BGCOLOR=#888888>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>";
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 CLASS=\"forumpost\" WIDTH=100%>";
}

echo "<TR><TD BGCOLOR=\"$THEME->cellcontent2\" WIDTH=35 VALIGN=TOP>";
echo "<TR><TD BGCOLOR=\"$THEME->cellcontent2\" CLASS=\"forumpostpicture\" WIDTH=35 VALIGN=TOP>";
print_user_picture($post->userid, $courseid, $post->picture);
echo "</TD>";

if ($post->parent) {
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading\">";
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading\" CLASS=\"forumpostheader\">";
} else {
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading2\">";
echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading2\" CLASS=\"forumpostheadertopic\">";
}
echo "<P>";
echo "<FONT SIZE=3><B>$post->subject</B></FONT><BR>";
Expand All @@ -698,9 +693,9 @@ function forum_print_post_header(&$post, $courseid, $ownpost=false, $reply=false
echo "</FONT></P></TD>";

if ($post->parent) {
echo "<TD VALIGN=BOTTOM BGCOLOR=\"$THEME->cellheading\">";
echo "<TD VALIGN=BOTTOM BGCOLOR=\"$THEME->cellheading\" CLASS=\"forumpostheader\">";
} else {
echo "<TD VALIGN=BOTTOM BGCOLOR=\"$THEME->cellheading2\">";
echo "<TD VALIGN=BOTTOM BGCOLOR=\"$THEME->cellheading2\" CLASS=\"forumpostheadertopic\">";
}
echo "<P ALIGN=right><FONT SIZE=-1>";

Expand All @@ -713,7 +708,6 @@ function forum_print_post_header(&$post, $courseid, $ownpost=false, $reply=false
echo "<A HREF=\"$CFG->wwwroot/mod/forum/discuss.php?d=$post->discussion\"><B>".get_string("discussthistopic", "forum")."</B></A> ($replystring)&nbsp;&nbsp;";
}
echo "</P>";
echo "</TD></TR></TABLE>";
echo "</TD></TR>\n</TABLE>\n\n";
}

Expand Down
21 changes: 21 additions & 0 deletions theme/standard/styles.php
Expand Up @@ -117,3 +117,24 @@

.topicsoutline {
}

.forumpost {
border-width: 1px;
border-color: <?PHP echo $THEME->borders?>;
border-style: solid;
}

.forumpostheader {
}

.forumpostheadertopic {
}

.forumpostpicture {
}

.forumpostside {
}

.forumpostmessage {
}
21 changes: 21 additions & 0 deletions theme/standardblue/styles.php
Expand Up @@ -117,3 +117,24 @@

.topicsoutline {
}

.forumpost {
border-width: 1px;
border-color: <?PHP echo $THEME->borders?>;
border-style: solid;
}

.forumpostheader {
}

.forumpostheadertopic {
}

.forumpostpicture {
}

.forumpostside {
}

.forumpostmessage {
}
21 changes: 21 additions & 0 deletions theme/standardgreen/styles.php
Expand Up @@ -117,3 +117,24 @@

.topicsoutline {
}

.forumpost {
border-width: 1px;
border-color: <?PHP echo $THEME->borders?>;
border-style: solid;
}

.forumpostheader {
}

.forumpostheadertopic {
}

.forumpostpicture {
}

.forumpostside {
}

.forumpostmessage {
}
21 changes: 21 additions & 0 deletions theme/standardlogo/styles.php
Expand Up @@ -117,3 +117,24 @@

.topicsoutline {
}

.forumpost {
border-width: 1px;
border-color: <?PHP echo $THEME->borders?>;
border-style: solid;
}

.forumpostheader {
}

.forumpostheadertopic {
}

.forumpostpicture {
}

.forumpostside {
}

.forumpostmessage {
}
21 changes: 21 additions & 0 deletions theme/standardred/styles.php
Expand Up @@ -117,3 +117,24 @@

.topicsoutline {
}

.forumpost {
border-width: 1px;
border-color: <?PHP echo $THEME->borders?>;
border-style: solid;
}

.forumpostheader {
}

.forumpostheadertopic {
}

.forumpostpicture {
}

.forumpostside {
}

.forumpostmessage {
}

0 comments on commit d34189e

Please sign in to comment.