From d30867b0bf97beb8cb3dfa07514e6774ed45d1b3 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 25 Jan 2005 14:28:47 +0000 Subject: [PATCH] Removed some THEME stuff --- mod/forum/lib.php | 55 ++++++++++++++++----------------------- mod/forum/post.php | 2 +- mod/forum/report.php | 4 +-- mod/forum/subscribers.php | 10 +++---- 4 files changed, 31 insertions(+), 40 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index c609f8babc..219a300768 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -195,7 +195,7 @@ function forum_cron () { /// Finds all posts that have yet to be mailed out, and mails them /// out to all subscribers - global $CFG, $USER, $THEME; + global $CFG, $USER; static $strforums = NULL; if ($strforums === NULL) { @@ -417,12 +417,7 @@ function forum_cron () { $headerdata->userprefs = ''.get_string('digestmailprefs', 'forum').''; $posthtml = "stylesheet."\" />\n"; - $posthtml .= "cellcontent2\">"; - $posthtml .= "\n\n"; + $posthtml .= ""; $posthtml .= '

'.get_string('digestmailheader', 'forum', $headerdata).'



'; foreach($thesediscussions as $discussionid) { @@ -597,11 +592,7 @@ function forum_make_mail_html($course, $forum, $discussion, $post, $userfrom, $u $posthtml = ''; $posthtml .= "stylesheet."\" />\n"; - $posthtml .= "\n\n"; + $posthtml .= "\n\n"; $posthtml .= "

". "wwwroot/course/view.php?id=$course->id\">$course->shortname » ". @@ -1334,7 +1325,7 @@ function forum_make_mail_post(&$post, $user, $touser, $course, // Given the data about a posting, builds up the HTML to display it and // returns the HTML in a string. This is designed for sending via HTML email. - global $THEME, $CFG; + global $CFG; static $formattedtext; // Cached version of formatted text for a post static $formattedtextid; // The ID number of the post @@ -1348,14 +1339,14 @@ function forum_make_mail_post(&$post, $user, $touser, $course, $output .= ''; - $output .= ""; if ($post->parent) { - $output .= ""; - $output .= "
cellcontent2\" width=\"35\" valign=\"top\" class=\"forumpostpicture\">"; + $output .= "
"; $output .= print_user_picture($user->id, $course->id, $user->picture, false, true); $output .= "cellheading\" class=\"forumpostheader\">"; + $output .= ""; } else { - $output .= "cellheading2\" class=\"forumpostheadertopic\">"; + $output .= ""; } $output .= "

"; $output .= "$post->subject
"; @@ -1367,9 +1358,9 @@ function forum_make_mail_post(&$post, $user, $touser, $course, $output .= get_string("bynameondate", "forum", $by); $output .= "

cellcontent2\" width=\"10\" class=\"forumpostside\">"; + $output .= "
"; $output .= " "; - $output .= "cellcontent\" class=\"forumpostmessage\">\n"; + $output .= "\n"; if ($post->attachment) { $post->course = $course->id; @@ -1424,7 +1415,7 @@ function forum_make_mail_post(&$post, $user, $touser, $course, function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link=false, $ratings=NULL, $footer="", $highlight="") { - global $THEME, $USER, $CFG; + global $USER, $CFG; static $stredit, $strdelete, $strreply, $strparent, $strprune, $strpruneheading, $threadedmode, $isteacher, $adminedit; @@ -1447,14 +1438,14 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link echo ''; } - echo ""; if ($post->parent) { - echo ""; - echo ""; // Topic - echo "\n"; // Picture - echo "\n"; // User name $fullname = fullname($post, isteacher($forum->course)); - echo "\n"; if ($forum->open or $forum->type == "teacher") { // Show the column with replies - echo "\n"; } - echo "
cellcontent2\" class=\"forumpostpicture\" width=\"35\" valign=\"top\">"; + echo "
"; print_user_picture($post->userid, $courseid, $post->picture); echo "cellheading\" class=\"forumpostheader\" width=\"100%\">"; + echo ""; } else { - echo "cellheading2\" class=\"forumpostheadertopic\" width=\"100%\">"; + echo ""; } if (!empty($CFG->filterall)) { /// Put the subject through the filters @@ -1470,13 +1461,13 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link print_string("bynameondate", "forum", $by); echo "

cellcontent2\" valign=\"top\" class=\"forumpostside\" width=\"10\">"; + echo "
"; if ($group = user_group($courseid, $post->userid)) { print_group_picture($group, $courseid, false, false, true); } else { echo " "; } - echo "cellcontent\" class=\"forumpostmessage\">\n"; + echo "\n"; if ($post->attachment) { $post->course = $courseid; @@ -1594,7 +1585,7 @@ function forum_print_discussion_header(&$post, $forum, $datestring="") { /// that calls this one /// forum_print_latest_discussions() - global $THEME, $USER, $CFG; + global $USER, $CFG; if (!empty($CFG->filterall)) { $post->subject = filter_text("$post->subject", $forum->course); @@ -1603,28 +1594,28 @@ function forum_print_discussion_header(&$post, $forum, $datestring="") { echo "
cellheading2\" class=\"forumpostheadertopic\" width=\"100%\">"; + echo ""; echo "wwwroot/mod/forum/discuss.php?d=$post->discussion\">$post->subject"; echo "cellcontent2\" class=\"forumpostheaderpicture\" width=\"35\">"; + echo ""; print_user_picture($post->userid, $forum->course, $post->picture); echo "cellcontent2\" class=\"forumpostheadername\" align=\"left\" nowrap=\"nowrap\">"; + echo ""; echo "wwwroot/user/view.php?id=$post->userid&course=$forum->course\">$fullname"; echo "cellcontent2\" class=\"forumpostheaderreplies\" align=\"center\" nowrap=\"nowrap\">"; + echo ""; echo "wwwroot/mod/forum/discuss.php?d=$post->discussion\">$post->replies"; echo "cellcontent2\" class=\"forumpostheaderdate\" align=\"right\" nowrap=\"nowrap\">"; + echo ""; $usedate = (empty($post->timemodified)) ? $post->modified : $post->timemodified; // Just in case $parenturl = (empty($post->lastpostid)) ? '' : '&parent='.$post->lastpostid; $usermodified->firstname = $post->umfirstname; @@ -2786,7 +2777,7 @@ function forum_get_recent_mod_activity(&$activities, &$index, $sincetime, $cours function forum_print_recent_mod_activity($activity, $course, $detail=false) { - global $CFG, $THEME; + global $CFG; echo ''; @@ -2798,7 +2789,7 @@ function forum_print_recent_mod_activity($activity, $course, $detail=false) { $closeformat = ""; } - echo "cellcontent2\">"; + echo ''; } else { - echo "cellcontent\">"; + echo ''; } echo "
cellcontent2\" class=\"forumpostpicture\" width=\"35\" valign=\"top\">"; + echo "
"; print_user_picture($activity->user->userid, $course, $activity->user->picture); echo "$openformat"; diff --git a/mod/forum/post.php b/mod/forum/post.php index 7c4ae87b47..90745a831e 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -526,7 +526,7 @@ } echo ""; - print_simple_box_start("center", "", "$THEME->cellheading"); + print_simple_box_start("center"); require("post.html"); print_simple_box_end(); diff --git a/mod/forum/report.php b/mod/forum/report.php index 1d907b99ac..b385745296 100644 --- a/mod/forum/report.php +++ b/mod/forum/report.php @@ -52,9 +52,9 @@ echo "id&sort=r.time\">$strtime"; foreach ($ratings as $rating) { if (isteacher($discussion->course, $rating->id)) { - echo "
"; print_user_picture($rating->id, $forum->course, $rating->picture); diff --git a/mod/forum/subscribers.php b/mod/forum/subscribers.php index 674fa85798..ed10e05d0b 100644 --- a/mod/forum/subscribers.php +++ b/mod/forum/subscribers.php @@ -70,13 +70,13 @@ echo ''; foreach ($users as $user) { - echo ""; + echo ''; } echo "
"; + echo '
'; print_user_picture($user->id, $course->id, $user->picture); - echo "cellcontent\">"; + echo ''; echo fullname($user); - echo "cellcontent\">"; - echo "$user->email"; - echo "
'; + echo $user->email; + echo '
"; } -- 2.39.5