Hiding Time Stamps on Forums?

Hiding Time Stamps on Forums?

by Daniel Lynds -
Number of replies: 3

Hey all:


I'm trying to hide all time stamps visible to students in a course - how/where might I go about this?


Thanks in advance for all your help!

Average of ratings: -
In reply to Daniel Lynds

Re: Hiding Time Stamps on Forums?

by Sam Mudle -

One way is to add custom css to your theme.  For example using your browser developer tools inspector, the last post date is

.lastpost a {display:none;}
.author a {display:none;}

These might hide the author name as well -- my css-fu is not that great, but that's were i'd start.

Another way is grepping through the forum source and commenting out the date strings.


In reply to Sam Mudle

Re: Hiding Time Stamps on Forums?

by Daniel Lynds -

Thanks! 


That worked for last post by inserting in theme advanced custom settings.


That marked out last post, but I'm also wondering how to delete the time on all posts in a forum.


Any advice?

In reply to Daniel Lynds

Re: Hiding Time Stamps on Forums?

by Sam Mudle -

Ah, ok,  

The timestamp in the forum posts is surrounded by a div tag with class author.

<div class = "author">
  <a href="the profile link">
    name of user
  </a>
  Thursday, 25 April 2018, 2:09 PM
</div>

the problem is that the time stamp is not surrounded by it's own tag, so I can't apply the style to just it. The best I can do without a code hack is just this:

.author {display:none;}

The problem is that this will nuke the name as well. If you are not ok with that, tell me what version of moodle you are using, and I'll give you code to hack and tell the php not to render the time stamp.