UBB.Dev
Posted By: JoshPet New Since Last Visit - 10/28/2002 4:11 AM
Anyone ever give thought to or manage to do a "new Since Last Visit" link?

Where in the database does it keep track of what's "new" for users?
Posted By: JustDave Re: New Since Last Visit - 10/28/2002 4:46 AM
I have given this some thought. lol

One field is needed for a unix timestamp in the users table, call it U_NewPosts.

A page would be generated pulling in all threads that they have access to that are newer than this time stamp. Once a user has read all that they want to read they can upate the page and have a current timestamp set and all of the previous threads will not be displayed because they are now older than the timestamp.

If there is no value for the timestamp have it set to 24 hours ago and load the threads accordingly.


This is actually a pretty simple script to write up and I think it would be handy as I have heard of something simular if not this exact thing being requested here and there.



This has been on my list but feel free to whip it out.
Posted By: JoshPet Re: New Since Last Visit - 10/28/2002 5:08 AM
What does w3t_Last store??????

I guess that's the last post they read in each forum?????

This one seems a bit over my head still.....

How would you get the timestamp into the w3t_Users table?

Maybe after that I could do it.... no promises. LOL
Posted By: JustDave Re: New Since Last Visit - 10/28/2002 6:30 AM
That's the nice thing about doing it this way. w3t_Last doesn't matter. The user themselves are in controll of updating their lists.

As far as the field goes it's something like ALTER w3t_Users ADD U_NewThreads INT(11)

Posted By: JoshPet Re: New Since Last Visit - 10/28/2002 6:37 AM
Right to add the field.

I meant... how would you timestamp into that field.

Where would you have it write that info.. how often. Taken from w3t_Online?....
that's the part that confuses me.

Posted By: JoshPet Re: New Since Last Visit - 10/28/2002 6:56 AM
I use the who's online hack on every page....

I'm guessing you could have the ubbt.inc.php file write the timestamp to the users table in there. Or would that be too much?

You can't count on people logging out each time to make it work.
Posted By: ExcelsiorDDZ Re: New Since Last Visit - 10/29/2002 7:55 PM
Maybe a 'next unread thread' type button?
Posted By: JustDave Re: New Since Last Visit - 10/29/2002 8:05 PM
It would only write to that field if the member choses to update their list. If they have read all they wanted to in the list they then click update and the current timestamp is added to their information and all threads added after this will be displayed next time they view it.

You will also need to paginate because this list could become quite long. Have the number of displayed threads use their prefs also like postlist.php
Posted By: JoshPet Re: New Since Last Visit - 10/30/2002 3:47 AM
So instead of "new since your last visit" more like "new since you last looked at this list".

That makes sense.

I wonder if you read posts from there if they would get marked as read?

I think I read rick post that postlist updates that.



Maybe it would be best to make a "all new posts" link.... although that still baffles me as to how and where in the database that's tracked.



Oh well.... an idea worth kicking around. Not sure if it's practical to implement as a hack.

Maybe it'll end up on Rick's radar one of these days.
Posted By: JustDave Re: New Since Last Visit - 10/30/2002 4:05 AM
More like "new since you last reset this"

Your right in that it's postlist.php that does the actual tracking though. So basicly what you would want is a postlist.php script that grabs from all forums that you have access to and not just one forum at a time.

The route I suggest is less intrusive into the database and much easier to impliment. I guess it's up to you on a course of action.
Posted By: sigridsholm Re: New Since Last Visit - 10/30/2002 2:33 PM
Why not, New since last Mark All Read.
Posted By: ExcelsiorDDZ Re: New Since Last Visit - 10/30/2002 8:22 PM
New Posts since -=insert date here=- ? And there is a cool new Javascript thing over at hotscripts that would toss a calendar up when you click to enter the date to allow you to select a date in calendar mode.

I know its sounds confusing.
Posted By: PhotoPost Re: New Since Last Visit - 12/20/2002 10:59 PM
I wouldnt mind seeing this. Couldnt we also take the w3t_Last which was the greatest for the user and assume that was the last visit? Then we list all threads since that most recent visit to a forum.
Posted By: Dalar Re: New Since Last Visit - 04/22/2003 6:08 AM
[]sigridsholm said:
Why not, New since last Mark All Read. <img src="/threads/php/images/graemlins/smile.gif" alt="" /> [/]

Wouldn't that be the same as full post tracking (in theory)? If it's showing all new since Mark All Read, then it's just doing what it normally does, unless it isn't unflagging posts after you read them.
Posted By: JoshPet Re: New Since Last Visit - 04/22/2003 6:09 AM
I think they want to display a list of all new posts on one page.
Posted By: Dalar Re: New Since Last Visit - 04/22/2003 7:27 AM
Ahhhh.

That's actually kinda related to something I've been thinking about working on. If I ever get around to it, you'll be certain to hear of it
© UBB.Developers