Search

I'm building a forum and I'm wondering if there is a way to build a read/unread topic system for members using Symphony's functionalities.

What I mean is, I know the forum ensemble has this feature, but I believe it uses a custom data source (and maybe other custom coding, but I'm not sure). It'd be interesting to know how it's being done on this forum as well.

You could use the Member Claims extension, if the topic hasn't been viewed yet, fire off a $.post() with jquery once the topic page has loaded.

That doesn't really keep track of new or unread comments though, just the actual topic itself.

Alternatively you can have a field with memberid + date/time field. And you do an ajax request every time with the time last viewed. Then pull the data from the last modified thread and compare to the value in this section. Not the cleanest way but would work.

I started one about a year ago (Member Replies) but the queries got out of hand and the requirement went away, so I left it.

I see. Thanks for the tips. I'll look into them. It makes sense to work with the date fields.

@nickdunn Did the extension you started function? I'm running into a case where I need this, and it doesn't seem to be marking the topics as read. No matter what, the XML is returned like below:

<replies has-read-before="no" total-replies="34" unread-replies="34">
    <latest id="1427" time="15:42">2012-09-20</latest>
</replies>

You said you left it, so just curious if it was actually working at that time.

Pretty sure it was a working proof of concept. You've got to select the "mark as read" option through the data source for it to become read. But I haven't looked at this for a year so the code scares me now.

Huh, I double checked and I definitely have the mark as read option set up correctly. The latest/@id is correct to the XML output too. No errors, just not updating it as read, I'll have to do some investigating to see if I can pinpoint why.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details