FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Marking messages read in database
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Marking messages read in database [message #25338] Tue, 07 June 2005 10:49 Go to next message
Art Wolf is currently offline  Art Wolf   Ireland
Messages: 16
Registered: May 2005
Location: Dublin, Ireland
Karma: 0
Junior Member
I'm trying to find where in the database messages are marked as being read.

We are using a command line unix system so all users currently use slrn (via NNTP). What I'm wanting to do is allow a user to read in their ~/.jnewsrc file and sych it with FUDforum. Because the messages are kept by their id from the Xref field doing this automatically seemed impractical as it would slow down page loading by a huge amount :/
Re: Marking messages read in database [message #25340 is a reply to message #25338] Tue, 07 June 2005 13:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The messages are marked read via the "fud26_read" table .

FUDforum Core Developer
Re: Marking messages read in database [message #25371 is a reply to message #25340] Tue, 07 June 2005 18:49 Go to previous messageGo to next message
Art Wolf is currently offline  Art Wolf   Ireland
Messages: 16
Registered: May 2005
Location: Dublin, Ireland
Karma: 0
Junior Member
Hmm now I see.

You automatically mark the latest message and set the previous messages as read automatically.

This makes things easier for me, I think Smile as .jnewsrc keeps the mark of the messages like

group.rss.bbc.world: 1-3967,3970,3975

Cheers
Re: Marking messages read in database [message #25408 is a reply to message #25371] Wed, 08 June 2005 11:35 Go to previous messageGo to next message
Art Wolf is currently offline  Art Wolf   Ireland
Messages: 16
Registered: May 2005
Location: Dublin, Ireland
Karma: 0
Junior Member
Another quick question please ^_^;;

I've parsed the msg ids and am trying to add these to the fud26_msg table along with everything else. I could only find the insert statement in imsg_edt.inc.t

I added a variable to fud_msg - $msg_number and in nntp.inc I have

$tmp_msg_number = explode(":", $this->headers['xref']);
$this->msg_number = $tmp_msg_number[1];

to parse the number out. Directly after $msg_post = new fud_msg_edit; I have

$msg_post->msg_number = $this->msg_number;

In fud_msg_edit's add function I extended the insert to insert also into msg_number with the value $this->msg_number.

I have also ofcourse altered the table fud26_msg to have a column msg_number.

Problem with running nntp.php is that msg_number column always returns null. So my only thoughts are that either $msg_post->msg_number = $this->msg_number; is not saving it to the variable which is referenced in the add function or there is another INSERT method that I've missed :/

Any hints would be most appreciated ^_^;
Re: Marking messages read in database [message #25428 is a reply to message #25408] Wed, 08 June 2005 14:22 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Shouldn't you be using the $tmp_msg_number[0] value?

FUDforum Core Developer
Re: Marking messages read in database [message #25433 is a reply to message #25428] Wed, 08 June 2005 14:31 Go to previous messageGo to next message
Art Wolf is currently offline  Art Wolf   Ireland
Messages: 16
Registered: May 2005
Location: Dublin, Ireland
Karma: 0
Junior Member
Ah the format of Xref for our nntp server is

Xref: nntp-server group:messageID
i.e.
Xref: carbon redbrick.rss.bbc.world:4013

So exploding on the ':' will put
carbon redbrick.rss.bbc.world -> [0]
4013 -> [1]

and its the 4013 that Im looking for
Re: Marking messages read in database [message #25435 is a reply to message #25433] Wed, 08 June 2005 14:32 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Ok, well add some debug code into the import script, make sure that the correct value is retrieved and is indeed passed along to imsg_edt.

FUDforum Core Developer
Re: Marking messages read in database [message #25436 is a reply to message #25435] Wed, 08 June 2005 14:35 Go to previous messageGo to next message
Art Wolf is currently offline  Art Wolf   Ireland
Messages: 16
Registered: May 2005
Location: Dublin, Ireland
Karma: 0
Junior Member
I have print statements in nntp.inc which print out the number but for some reason I cant get anything to print out of imsg_edt :/

Altering the insert in the add function to put in certain values does not have any effect either.
Re: Marking messages read in database [message #25437 is a reply to message #25436] Wed, 08 June 2005 14:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Did you rebuild the theme after editing imsg_edt.inc.t with your changes?

FUDforum Core Developer
Re: Marking messages read in database [message #25440 is a reply to message #25437] Wed, 08 June 2005 14:49 Go to previous message
Art Wolf is currently offline  Art Wolf   Ireland
Messages: 16
Registered: May 2005
Location: Dublin, Ireland
Karma: 0
Junior Member
Damn I hadnt! - cheers ^_^;;
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Posting URLs
Next Topic: Make a field in the registration form required
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 03:07:36 GMT 2024

Total time taken to generate the page: 0.02399 seconds