Take out double-spacing in "threaded" forum view...

Take out double-spacing in "threaded" forum view...

by George Kao -
Number of replies: 4

How can I go about eliminating the double-spacing between the subject headings while "displaying replies in threaded form"?  This will save a lot of scrolling.

Is my question making sense?

This issue was brought up by one of my faculty members during his orientation to Moodle.  Fresh perspectives can be invaluable.

Average of ratings: -
In reply to George Kao

Re: Take out double-spacing in "threaded" forum view...

by George Kao -

Can anyone provide any hints for this?

I went into mod/forum/discuss.php but didn't know what to look for... mixed

Thanks for any suggestions.

In reply to George Kao

Re: Take out double-spacing in "threaded" forum view...

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
The code that prints that out is in '/mod/forum/lib.php' in the function 'forum_print_posts_threaded'. You would need to take out the <p> tags surrounding each thread item, but that will still leave double spaces between each top-level item - they are each a separate unordered list.

You could probably do some CSS tricks around the whole thing - change the <ul> and <p> spacing for example. That would probably be easier and use less cutomization. But are you sure this is really going to buy you a lot? No matter what, when you've got an active forum there will be scrolling.

mike
In reply to Mike Churchward

Re: Take out double-spacing in "threaded" forum view...

by George Kao -

Thanks for the suggestions, Mike. 

The reason I want to do this is because I'm trying to transition a whole school (small right now, but still an institution) from Blackboard-brainwashed to Moodle-enthusiasts.  I want to show them that Moodle forums gives them multiple forum views including what they're already used to on Blackboard, namely, the threaded discussion view minus the double-spacing between the subject headings.

Sounds like it may be a complicated thing to do...  mixed

In reply to George Kao

Re: Take out double-spacing in "threaded" forum view...

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
There's a hack that will do this...

In the 'forum_print_threaded_posts' function in '/mod/forum/lib.php', you can add a <div> block around the threaded area that reduces the line height.

Look for the lines:

   if ($posts = forum_get_child_posts($parent)) {
        foreach ($posts as $post) {
            echo "<ul>";

Then add the line "echo '<div style="line-height: .25em;">';" to just before the <ul> tag is output. Close that <div> tag just before the end loop.

Unfortunately, there is no identifying CSS classes or id's to take advantage of or you could do it in the theme.

mike