Permalink
Browse files

_ added the DIV framework for new CSS

  • Loading branch information...
1 parent 00666d4 commit 680afe2e262b7a8574842ba722a09eeb23e86eeb urs_hunkler committed Jan 19, 2005
Showing with 58 additions and 21 deletions.
  1. +5 −0 mod/forum/discuss.php
  2. +9 −3 mod/forum/index.php
  3. +7 −2 mod/forum/post.php
  4. +12 −0 mod/forum/search.php
  5. +19 −13 mod/forum/subscribers.php
  6. +6 −3 mod/forum/view.php
View
@@ -105,9 +105,13 @@
print_header("$course->shortname: $discussion->name", "$course->fullname",
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
$navmiddle -> $navtail", "", "", true, $searchform, navmenu($course, $cm));
+
+ echo '<div id="forum-discuss" class="forum">'; // forum-discuss wrapper start
} else {
print_header("$course->shortname: $discussion->name", "$course->fullname",
"$navmiddle -> $navtail", "", "", true, $searchform, navmenu($course, $cm));
+
+ echo '<div id="forum-discuss" class="forum">'; // forum-discuss wrapper start
}
@@ -194,6 +198,7 @@
forum_print_discussion($course, $forum, $discussion, $post, $displaymode, $canreply);
+ echo '</div>'; // forum-discuss wrapper end
print_footer($course);
View
@@ -50,7 +50,7 @@
$generaltable->align[] = "center";
}
- if ($show_rss = (($can_subscribe || $course->id == SITEID) &&
+ if ($show_rss = (($can_subscribe || $course->id == SITEID) &&
isset($CFG->enablerssfeeds) && isset($CFG->forum_enablerssfeeds) &&
$CFG->enablerssfeeds && $CFG->forum_enablerssfeeds)) {
$generaltable->head[] = $strrss;
@@ -202,7 +202,7 @@
$learningtable->align[] = "center";
}
- if ($show_rss = (($can_subscribe || $course->id == SITEID) &&
+ if ($show_rss = (($can_subscribe || $course->id == SITEID) &&
isset($CFG->enablerssfeeds) && isset($CFG->forum_enablerssfeeds) &&
$CFG->enablerssfeeds && $CFG->forum_enablerssfeeds)) {
$learningtable->head[] = $strrss;
@@ -268,7 +268,7 @@
$rsslink = rss_get_link($course->id, $userid, "forum", $forum->id, $tooltiptext);
}
}
-
+
if ($can_subscribe) {
if (forum_is_forcesubscribed($forum->id)) {
$sublink = get_string("yes");
@@ -315,9 +315,13 @@
print_header("$course->shortname: $strforums", "$course->fullname",
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $strforums",
"", "", true, $searchform, navmenu($course));
+
+ echo '<div id="forum-index" class="forum">'; // forum-index wrapper start
} else {
print_header("$course->shortname: $strforums", "$course->fullname", "$strforums",
"", "", true, $searchform, navmenu($course));
+
+ echo '<div id="forum-index" class="forum">'; // forum-index wrapper start
}
if ($generalforums) {
@@ -330,6 +334,8 @@
print_table($learningtable);
}
+ echo '</div>'; // forum-index wrapper end
+
print_footer($course);
?>
View
@@ -99,7 +99,7 @@
$message = '';
if ($discussion->id = forum_add_discussion($discussion,$message)) {
- add_to_log($course->id, "forum", "add discussion",
+ add_to_log($course->id, "forum", "add discussion",
"discuss.php?d=$discussion->id", "$discussion->id", $cm->id);
$timemessage = 2;
@@ -462,7 +462,7 @@
error("Could not find top parent of post $post->id");
}
} else {
- $toppost->subject = ($forum->type == "news") ? get_string("addanewtopic", "forum") :
+ $toppost->subject = ($forum->type == "news") ? get_string("addanewtopic", "forum") :
get_string("addanewdiscussion", "forum");
}
@@ -497,10 +497,13 @@
print_header("$course->shortname: $discussion->name: $toppost->subject", "$course->fullname",
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
$navmiddle -> $navtail", $formstart, "", true, "", navmenu($course, $cm));
+
+ echo '<div id="forum-post" class="forum">'; // forum-post wrapper start
} else {
print_header("$course->shortname: $discussion->name: $toppost->subject", "$course->fullname",
"$navmiddle -> $navtail", "$formstart", "", true, "", navmenu($course, $cm));
+ echo '<div id="forum-post" class="forum">'; // forum-post wrapper start
}
if (!empty($parent)) {
@@ -531,6 +534,8 @@
use_html_editor("message");
}
+ echo '</div>'; // forum-post wrapper end
+
print_footer($course);
View
@@ -42,6 +42,8 @@
"<a href=\"index.php?id=$course->id\">$strforums</a> -> $strsearch", "search.search",
"", "", "&nbsp;", navmenu($course), true);
+ echo '<div id="forum-search" class="forum">'; // forum-search wrapper start
+
print_simple_box_start("center");
echo "<center>";
echo "<br />";
@@ -62,6 +64,9 @@
"<a href=\"index.php?id=$course->id\">$strforums</a> ->
<a href=\"search.php?id=$course->id\">$strsearch</a> -> \"$search\"", "search.search",
"", "", "&nbsp;", navmenu($course), true);
+
+ echo '<div id="forum-search" class="forum">'; // forum-search wrapper start
+
print_heading(get_string("nopostscontaining", "forum", $search));
print_simple_box_start("center");
@@ -73,6 +78,9 @@
echo "</p>";
echo "</center>";
print_simple_box_end();
+
+ echo '</div>'; // forum-search wrapper end
+
print_footer($course);
exit;
}
@@ -82,6 +90,8 @@
<a href=\"search.php?id=$course->id\">$strsearch</a> -> \"$search\"", "search.search",
"", "", $searchform, navmenu($course), true);
+ echo '<div id="forum-search" class="forum">'; // forum-search wrapper start
+
print_heading("$strsearchresults: $totalcount");
echo "<center>";
@@ -121,6 +131,8 @@
echo "</center>";
}
+ echo '</div>'; // forum-search wrapper end
+
print_footer($course);
?>
View
@@ -5,7 +5,7 @@
require_variable($id); // forum
optional_variable($group); // change of group
-
+
optional_variable($edit); // Turn editing on and off
if (! $forum = get_record("forum", "id", $id)) {
@@ -29,7 +29,7 @@
unset($SESSION->fromdiscussion);
add_to_log($course->id, "forum", "view subscribers", "subscribers.php?id=$forum->id", $forum->id, $cm->id);
-
+
if (isset($_GET['edit'])) {
if($edit == "on") {
$USER->subscriptionsediting = true;
@@ -43,12 +43,14 @@
$strsubscribers = get_string("subscribers", "forum");
$strforums = get_string("forums", "forum");
- $navigation = "<a href=\"index.php?id=$course->id\">$strforums</a> ->
+ $navigation = "<a href=\"index.php?id=$course->id\">$strforums</a> ->
<a href=\"view.php?f=$forum->id\">$forum->name</a> -> $strsubscribers";
- print_header_simple("$strsubscribers", "", "$navigation",
+ print_header_simple("$strsubscribers", "", "$navigation",
"", "", true, forum_update_subscriptions_button($course->id, $id), true);
+ echo '<div id="forum-subscribers" class="forum">'; // forum-subscribers wrapper start
+
/// Check to see if groups are being used in this forum
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
$currentgroup = setup_and_print_groups($course, $groupmode, "subscribers.php?id=$forum->id");
@@ -57,15 +59,15 @@
}
if (empty($USER->subscriptionsediting)) { /// Display an overview of subscribers
-
+
if (! $users = forum_subscribed_users($course, $forum, $currentgroup) ) {
-
+
print_heading(get_string("nosubscribers", "forum"));
-
+
} else {
-
+
print_heading(get_string("subscribersto","forum", "'$forum->name'"));
-
+
echo '<table align="center" cellpadding="5" cellspacing="5">';
foreach ($users as $user) {
echo "<tr><td>";
@@ -78,7 +80,9 @@
}
echo "</table>";
}
-
+
+ echo '</div>'; // forum-subscribers wrapper end
+
print_footer($course);
exit;
}
@@ -124,21 +128,21 @@
if (!$subscribers = forum_subscribed_users($course, $forum, $currentgroup)) {
$subscribers = array();
}
-
+
$subscriberarray = array();
foreach ($subscribers as $subscriber) {
$subscriberarray[] = $subscriber->id;
}
$subscriberlist = implode(',', $subscriberarray);
-
+
unset($subscriberarray);
/// Get search results excluding any users already subscribed
if (!empty($frm->searchtext) and $previoussearch) {
$searchusers = search_users($course->id, $currentgroup, $frm->searchtext, 'firstname ASC, lastname ASC', $subscriberlist);
}
-
+
/// If no search results then get potential subscribers for this forum excluding users already subscribed
if (empty($searchusers)) {
if ($currentgroup) {
@@ -161,6 +165,8 @@
print_simple_box_end();
+ echo '</div>'; // forum-subscribers wrapper end
+
print_footer();
?>
View
@@ -52,15 +52,15 @@
if (!$buttontext) {
$buttontext = forum_print_search_form($course, $search, true, "plain");
- }
+ }
if ($CFG->forcelogin) {
require_login();
}
if ($course->category) {
require_login($course->id);
- }
+ }
$navigation = "<a href=\"index.php?id=$course->id\">$strforums</a> ->";
if ($forum->type == "teacher") {
@@ -78,6 +78,8 @@
print_header_simple("$forum->name", "",
"$navigation $forum->name", "", "", true, $buttontext, navmenu($course, $cm));
+ echo '<div id="forum-view" class="forum">'; // forum-view wrapper start
+
if (!$cm->visible and !isteacher($course->id)) {
notice(get_string("activityiscurrentlyhidden"));
}
@@ -167,7 +169,7 @@
echo '</tr><tr><td align="right">';
if ($forum->rsstype == 1) {
$tooltiptext = get_string("rsssubscriberssdiscussions","forum",$forum->name);
- } else {
+ } else {
$tooltiptext = get_string("rsssubscriberssposts","forum",$forum->name);
}
if (empty($USER->id)) {
@@ -242,6 +244,7 @@
break;
}
+ echo '</div>'; // forum-view wrapper end
print_footer($course);

0 comments on commit 680afe2

Please sign in to comment.