Removed more tables from forum display :-) Strrrrrict!
This commit is contained in:
+3
-7
@@ -4073,16 +4073,12 @@ function print_group_menu($groups, $groupmode, $currentgroup, $urlroot, $showall
|
||||
$groupsmenu[$key] = $groupname;
|
||||
}
|
||||
|
||||
$output .= '<table><tr><td align="right">';
|
||||
if ($groupmode == VISIBLEGROUPS) {
|
||||
$output .= get_string('groupsvisible');
|
||||
$grouplabel = get_string('groupsvisible').':';
|
||||
} else {
|
||||
$output .= get_string('groupsseparate');
|
||||
$grouplabel = get_string('groupsseparate').':';
|
||||
}
|
||||
$output .= ':';
|
||||
$output .= '</td><td style="white-space:nowrap;" align="left">';
|
||||
$output .= popup_form($urlroot.'&group=', $groupsmenu, 'selectgroup', $currentgroup, '', '', '', true, 'self');
|
||||
$output .= '</td></tr></table>';
|
||||
$output .= popup_form($urlroot.'&group=', $groupsmenu, 'selectgroup', $currentgroup, '', '', '', true, 'self', $grouplabel);
|
||||
|
||||
if ($return) {
|
||||
return $output;
|
||||
|
||||
+10
-10
@@ -377,11 +377,11 @@ function forum_cron() {
|
||||
$posthtml, '', '', $CFG->forum_replytouser)) {
|
||||
mtrace("Error: mod/forum/cron.php: Could not send out mail for id $post->id to user $userto->id".
|
||||
" ($userto->email) .. not trying again.");
|
||||
add_to_log($course->id, 'forum', 'mail error', "discuss.php?d=$discussion->id#$post->id",
|
||||
add_to_log($course->id, 'forum', 'mail error', "discuss.php?d=$discussion->id#p$post->id",
|
||||
substr(format_string($post->subject,true),0,30), $cm->id, $userto->id);
|
||||
$errorcount++;
|
||||
} else if ($mailresult === 'emailstop') {
|
||||
add_to_log($course->id, 'forum', 'mail blocked', "discuss.php?d=$discussion->id#$post->id",
|
||||
add_to_log($course->id, 'forum', 'mail blocked', "discuss.php?d=$discussion->id#p$post->id",
|
||||
substr(format_string($post->subject,true),0,30), $cm->id, $userto->id);
|
||||
} else {
|
||||
$mailcount++;
|
||||
@@ -557,7 +557,7 @@ function forum_cron() {
|
||||
$posttext .= "\n---------------------------------------------------------------------";
|
||||
|
||||
$by->name = "<a target=\"_blank\" href=\"$CFG->wwwroot/user/view.php?id=$userfrom->id&course=$course->id\">$by->name</a>";
|
||||
$posthtml .= '<div><a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$discussion->id.'#'.$post->id.'">'.format_string($post->subject,true).'</a> '.get_string("bynameondate", "forum", $by).'</div>';
|
||||
$posthtml .= '<div><a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$discussion->id.'#p'.$post->id.'">'.format_string($post->subject,true).'</a> '.get_string("bynameondate", "forum", $by).'</div>';
|
||||
|
||||
} else {
|
||||
// The full treatment
|
||||
@@ -669,7 +669,7 @@ function forum_make_mail_text($course, $forum, $discussion, $post, $userfrom, $u
|
||||
$posttext .= "\n---------------------------------------------------------------------\n";
|
||||
$posttext .= format_string($post->subject,true);
|
||||
if ($bare) {
|
||||
$posttext .= " ($CFG->wwwroot/mod/forum/discuss.php?d=$discussion->id#$post->id)";
|
||||
$posttext .= " ($CFG->wwwroot/mod/forum/discuss.php?d=$discussion->id#p$post->id)";
|
||||
}
|
||||
$posttext .= "\n".$strbynameondate."\n";
|
||||
$posttext .= "---------------------------------------------------------------------\n";
|
||||
@@ -1838,7 +1838,7 @@ function forum_make_mail_post(&$post, $user, $touser, $course,
|
||||
/// Context link to post if required
|
||||
if ($link) {
|
||||
$output .= '<div class="link">';
|
||||
$output .= '<a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'#'.$post->id.'">'.
|
||||
$output .= '<a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'#p'.$post->id.'">'.
|
||||
get_string('postincontext', 'forum').'</a>';
|
||||
$output .= '</div>';
|
||||
}
|
||||
@@ -1874,7 +1874,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
|
||||
// just viewing, return
|
||||
return;
|
||||
}
|
||||
echo '<a name="'.$post->id.'"></a>';
|
||||
echo '<a id="p'.$post->id.'"></a>';
|
||||
echo '<table cellspacing="0" class="forumpost">';
|
||||
echo '<tr class="header"><td class="picture left">';
|
||||
// print_user_picture($post->userid, $courseid, $post->picture);
|
||||
@@ -1935,7 +1935,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
|
||||
$read_style = '';
|
||||
}
|
||||
|
||||
echo '<a name="'.$post->id.'"></a>';
|
||||
echo '<a id="p'.$post->id.'"></a>';
|
||||
echo '<table cellspacing="0" class="forumpost'.$read_style.'">';
|
||||
|
||||
echo '<tr class="header"><td class="picture left">';
|
||||
@@ -2021,7 +2021,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
|
||||
$post->discussion.'&parent='.$post->id.$mcmd.'">'.$mtxt.'</a>';
|
||||
} else {
|
||||
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
|
||||
$post->discussion.$mcmd.'#'.$post->id.'">'.$mtxt.'</a>';
|
||||
$post->discussion.$mcmd.'#p'.$post->id.'">'.$mtxt.'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2032,7 +2032,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
|
||||
$post->discussion.'&parent='.$post->parent.'">'.$strparent.'</a>';
|
||||
} else {
|
||||
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
|
||||
$post->discussion.'#'.$post->parent.'">'.$strparent.'</a>';
|
||||
$post->discussion.'#p'.$post->parent.'">'.$strparent.'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3638,7 +3638,7 @@ function forum_print_recent_mod_activity($activity, $course, $detail=false) {
|
||||
"height=\"16\" width=\"16\" alt=\"".strip_tags(format_string($activity->name,true))."\" /> ";
|
||||
}
|
||||
echo "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d=" . $activity->content->discussion
|
||||
. "#" . $activity->content->id . "\">";
|
||||
. "#p" . $activity->content->id . "\">";
|
||||
|
||||
echo format_string($activity->content->subject,true);
|
||||
echo "</a>$closeformat";
|
||||
|
||||
+18
-11
@@ -117,7 +117,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
echo '<table width="100%" border="0" cellpadding="3" cellspacing="0"><tr valign="top">';
|
||||
|
||||
print_box_start('forumcontrol');
|
||||
|
||||
/// 2 ways to do this, 1. we can changed the setup_and_print_groups functions
|
||||
/// in moodlelib, taking in 1 more parameter, and tell the function when to
|
||||
@@ -130,9 +131,9 @@
|
||||
|
||||
//the following query really needs to change
|
||||
if ($groups = groups_get_groups_names($course->id)) { //TODO:
|
||||
echo '<td>';
|
||||
print_box_start('groupmenu');
|
||||
print_group_menu($groups, $groupmode, $currentgroup, "$CFG->wwwroot/mod/forum/view.php?id=$cm->id");
|
||||
echo '</td>';
|
||||
print_box_end(); // groupmenu
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,15 +147,16 @@
|
||||
foreach ($p as $index => $object){
|
||||
$validgroups[$object->id] = $object->name;
|
||||
}
|
||||
echo '<td>';
|
||||
/// Print them in the menu
|
||||
print_box_start('groupmenu');
|
||||
print_group_menu($validgroups, $groupmode, $currentgroup, "view.php?id=$cm->id",0);
|
||||
echo '</td>';
|
||||
print_box_end(); // groupmenu
|
||||
}
|
||||
}
|
||||
|
||||
print_box_start('subscription');
|
||||
|
||||
if (!empty($USER->id) && !has_capability('moodle/legacy:guest', $context, NULL, false)) {
|
||||
echo '<td align="right" class="subscription">';
|
||||
$SESSION->fromdiscussion = "$FULLME";
|
||||
if (forum_is_forcesubscribed($forum->id)) {
|
||||
$streveryoneissubscribed = get_string('everyoneissubscribed', 'forum');
|
||||
@@ -208,17 +210,16 @@
|
||||
$trackedlink = '<a title="'.get_string('trackforum', 'forum').'" href="settracking.php?id='.
|
||||
$forum->id.'&returnpage=view.php">'.get_string('forumtrackednot', 'forum').'</a>';
|
||||
}
|
||||
echo "<br />";
|
||||
echo '<br />';
|
||||
echo "<span class=\"helplink\">$trackedlink</span>";
|
||||
}
|
||||
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
/// If rss are activated at site and forum level and this forum has rss defined, show link
|
||||
if (isset($CFG->enablerssfeeds) && isset($CFG->forum_enablerssfeeds) &&
|
||||
$CFG->enablerssfeeds && $CFG->forum_enablerssfeeds && $forum->rsstype and $forum->rssarticles) {
|
||||
echo '</tr><tr><td align="right">';
|
||||
|
||||
if ($forum->rsstype == 1) {
|
||||
$tooltiptext = get_string("rsssubscriberssdiscussions","forum",format_string($forum->name));
|
||||
} else {
|
||||
@@ -229,11 +230,17 @@
|
||||
} else {
|
||||
$userid = $USER->id;
|
||||
}
|
||||
print_box_start('rsslink');
|
||||
rss_print_link($course->id, $userid, "forum", $forum->id, $tooltiptext);
|
||||
echo '</td>';
|
||||
print_box_end(); // subscription
|
||||
|
||||
}
|
||||
print_box_end(); // subscription
|
||||
|
||||
print_box_end(); // forumcontrol
|
||||
|
||||
print_box(' ', 'clearer');
|
||||
|
||||
echo '</tr></table>';
|
||||
|
||||
if (!empty($forum->blockafter) && !empty($forum->blockperiod)) {
|
||||
$a->blockafter = $forum->blockafter;
|
||||
|
||||
@@ -2160,6 +2160,19 @@ body#mod-forum-search .introcontent {
|
||||
.noticeboxcontent {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
#mod-forum-view .forumcontrol .groupmenu {
|
||||
float: left;
|
||||
text-align:left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#mod-forum-view .forumcontrol .subscription {
|
||||
float: right;
|
||||
text-align:right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#mod-forum-view .unread {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
|
||||
Reference in New Issue
Block a user