Forest BB

The digital grapevine of The Forest.
It is currently Tue Sep 30, 2014 10:23 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Mon Dec 28, 2009 6:00 pm 
Offline
User avatar

Joined: Thu Sep 16, 2004 2:10 pm
Posts: 1557
what is the difference?

also, before when you clicked on "view unread posts" it took you to the posts in the thread you hadn't read yet. now it just takes you to the first post on the thread.

I HATE CHAAANGEEEEEE
x

_________________
"We all tend to idealise kindness and tolerance, then wonder why we find ourselves infested with losers and nutcases." Sebastian Horsley


Top
 Profile  
 
PostPosted: Wed Dec 30, 2009 7:17 pm 
Offline
User avatar

Joined: Fri Aug 27, 2004 2:26 pm
Posts: 427
Location: cyberspace. Berlin
something went wierd: i find no active posts...

_________________
"If something is boring after two minutes, try it for four. If still boring, then eight. Then sixteen. Then thirty-two. Eventually one discovers that it is not boring at all." --John Cage.


Top
 Profile  
 
PostPosted: Thu Dec 31, 2009 1:53 am 
Offline
User avatar

Joined: Wed Apr 18, 2007 12:02 pm
Posts: 1798
Location: Edinburgh, UK
these are due to the recent upgrade. shall try get the problems squished as soon as i have suitable time/place!

_________________
hey, if you don't like it, post on the BB (so you can ask about participating for better) | MilkMiruku


Top
 Profile  
 
PostPosted: Wed Jan 06, 2010 10:16 pm 
Offline
User avatar

Joined: Mon Jan 22, 2007 5:50 pm
Posts: 944
Try clicking on the little yellow icon next to the topic title in the unread posts list. It will take you straight to the latest unread post in that thread. I know it's a nuisance, but its the best we can do for now xx


Top
 Profile  
 
PostPosted: Thu Jan 07, 2010 12:52 am 
Offline
User avatar

Joined: Fri Apr 08, 2005 12:50 am
Posts: 2638
Location: heartland
if it aint broke.. etc... ;)

_________________
Maybe it could work? But it will be a kaleidoscopic blend of mysterious shadows and rainbow hued-dreams seen through compassionate tears.


Top
 Profile  
 
PostPosted: Thu Jan 21, 2010 2:12 am 
Offline
User avatar

Joined: Wed Apr 18, 2007 12:02 pm
Posts: 1798
Location: Edinburgh, UK
thanks so much to mike for fixing this! though is it me or is the icon graphic for 'New posts' not appearing on the 'View unread posts' page?

_________________
hey, if you don't like it, post on the BB (so you can ask about participating for better) | MilkMiruku


Top
 Profile  
 
PostPosted: Thu Jan 21, 2010 12:48 pm 
Offline
User avatar

Joined: Sun Nov 23, 2008 10:16 am
Posts: 1111
Location: Edinburgh!
I see it.

_________________
Mike

Dawnsio 'mlaen i'r gwres prynhawn a rwy'n addo erbyn yfori byddai wedi mynd, hwyl fawr i pawb, hwyl fawr i pawb...


Top
 Profile  
 
PostPosted: Thu Jan 21, 2010 10:49 pm 
Offline
User avatar

Joined: Mon Jan 22, 2007 5:50 pm
Posts: 944
I see it too. Nice work Mike!


Top
 Profile  
 
PostPosted: Sat Jan 23, 2010 3:49 pm 
Offline
User avatar

Joined: Sun Nov 23, 2008 10:16 am
Posts: 1111
Location: Edinburgh!
PHP Hackery FTW!

_________________
Mike

Dawnsio 'mlaen i'r gwres prynhawn a rwy'n addo erbyn yfori byddai wedi mynd, hwyl fawr i pawb, hwyl fawr i pawb...


Top
 Profile  
 
PostPosted: Sat Jan 23, 2010 5:14 pm 
Offline
User avatar

Joined: Wed Apr 18, 2007 12:02 pm
Posts: 1798
Location: Edinburgh, UK
wayay and wooots

_________________
hey, if you don't like it, post on the BB (so you can ask about participating for better) | MilkMiruku


Top
 Profile  
 
PostPosted: Fri Feb 05, 2010 6:15 pm 
Offline
User avatar

Joined: Mon Jan 22, 2007 5:50 pm
Posts: 944
Mike! Knowing what you know about the workings of this here thing, any chance you can fix it to display "You have no unread posts" instead of "View unread posts" when you have no unread posts. Would be worth doing if it's an easy hack?


Top
 Profile  
 
PostPosted: Sun Feb 07, 2010 3:33 pm 
Offline
User avatar

Joined: Sun Nov 23, 2008 10:16 am
Posts: 1111
Location: Edinburgh!
Not so easy, I think, since the unread posts is just a filter on the search query and so is only run when you click the link.

I might be able to isolate the function that specifically looks for unread posts and put it into the main page. Failing that, I can probably write a quick query to check for new posts since last visit and change the main page.

I'll give it a go at some point and see what I can do.

_________________
Mike

Dawnsio 'mlaen i'r gwres prynhawn a rwy'n addo erbyn yfori byddai wedi mynd, hwyl fawr i pawb, hwyl fawr i pawb...


Top
 Profile  
 
PostPosted: Sun Feb 07, 2010 5:59 pm 
Offline
User avatar

Joined: Wed Apr 18, 2007 12:02 pm
Posts: 1798
Location: Edinburgh, UK
one idea might be to check whether the addon module providing this functionality is applied correctly currently. possibly just reinstalling it afresh might fix things.

_________________
hey, if you don't like it, post on the BB (so you can ask about participating for better) | MilkMiruku


Top
 Profile  
 
PostPosted: Sun Feb 07, 2010 6:32 pm 
Offline
User avatar

Joined: Mon Jan 22, 2007 5:50 pm
Posts: 944
milk wrote:
one idea might be to check whether the addon module providing this functionality is applied correctly currently. possibly just reinstalling it afresh might fix things.

I did this already. Feel free to do again, but it takes quite a bit of time!

I just noticed that the mod has been updated to v.1.0.7 so maybe there's something to help us there. It comes with "upgrade scripts". I don't have time to look closer at the moment.

Technical notes from latest version, so should be current infos:

Quote:
1. Summary of the database entries phpbb3 makes to track unread posts via the database

a. clicking "mark forums read" link on index page:

- sets user_lastmark for the user in the users table to the current time

- wipes out all entries for the user in the forums_track table

- wipes out all entries for the user in the topics_track table

b. clicking "mark topics read" link on viewforum page for a forum:

- sets mark_time for the user and that forum
in the forums_track table to the current time

- wipes out all entries for the user and that forum
in the topics_track table

c. opening up existing topic that is already read

- does nothing

d. opening up an existing topic that is unread:

- via the markread() function, sets mark_time for the user and that topic
in the topics_track table to the post_time for the last post of the last page
in the topic that the user read

- if there are no other unread topics in the relevant forum,
then via the update_forum_tracking_info() function:

- sets mark_time for the user and that forum
in the forums_track table to the post_time for the last post
in the relevant forum

- wipes out all entries for the user and the relevant forum
in the topics_track table

e. new topic or reply to existing topic:

- via the markread() function, sets mark_time for the user and that topic
in the topics_track table to the post_time for the new topic or reply

- if there are no other unread topics in the relevant forum,
then via the update_forum_tracking_info() function:

- sets mark_time for the user and the relevant forum
in the forums_track table to the post_time for
the last post in the relevant forum

- wipes out all entries for the user and the relevant forum
in the topics_track table

2. Summary of how phpbb3 uses those database entries to determine whether forums, topics or posts are unread

When a user is on the index page, phpbb3 determines whether a forum is unread
by checking to see whether the forum_last_post_time for the forum is greater (i.e. later) than
the mark_time entry for the user and the forum in the forums_track table.
If there is no entry for the user and the forum in the forums_track table, phpbb3 instead
checks to see if forum_last_post_time for the forum is greater (i.e. later) than the
user_lastmark entry for the user in the users table.
If forum_last_post_time for the forum is greater than the applicable mark_time or user_lastmark entry,
the forum is considered unread. The code for all this checking is in the display_forums() function that
appears in includes/functions_display.php.

When a user is on viewforum, phpbb3 determines whether a topic is unread
by checking to see whether the topic_last_post_time for the topic is greater (i.e. later) than
the mark_time entry for the user and the topic in the topics_track table.
If there is no entry for the user and the topic in the topics_track table, phpbb3 instead
checks to see if topic_last_post_time for the topic is greater (i.e. later) than the
mark_time entry for the user and the relevant forum in the forums_track table.
And if there is no entry for the user and the relevant forum in the forums_track table, phpbb3 instead
checks to see if topic_last_post_time for the topic is greater (i.e. later) than the
user_lastmark entry for the user in the users table.
If topic_last_post_time for the topic is greater than the applicable mark_time or user_lastmark entry,
the topic is considered unread. The code for all this checking is in the get_topic_tracking()
function that appears in includes/functions.php.
(Note: viewforum separately uses the display_forums() function to determine whether subforums underneath
the current forum have unread posts.)

When a user is on viewtopic, phpbb3 determines whether a post is unread
by checking to see whether its post_time is greater (i.e. later) than
the mark_time entry for the user and the relevant topic in the topics_track table.
If there is no entry for the user and the relevant topic in the topics_track table, phpbb3 instead
checks to see if the post_time is greater (i.e. later) than the
mark_time entry for the user and the relevant forum in the forums_track table.
And if there is no entry for the user and the relevant forum in the forums_track table, phpbb3 instead
checks to see if the post_time is greater (i.e. later) than the
user_lastmark entry for the user in the users table.
If the post_time for the post is greater than the applicable mark_time or user_lastmark entry,
the post is considered unread. The code for all this checking is in the get_topic_tracking()
function (or in some cases the get_complete_topic_tracking() function) that appears in includes/functions.php.

3. Summary of how phpbb3 compiles a list of unread topics when a user clicks the link to view unread topics

When a user clicks the link to view unread topics, search.php calls get_unread_topics() that appears
in includes/functions.php. get_unread_topics() looks for every topic where the topic_last_post_time
is greater than the mark_time entry for the user and the topic in the topics track table or, if there is no
such mark_time, the mark_time entry for the user and the relevant forum in the forums track table or, if
there is no such mark_time, the user_lastmark entry for the user in the users table. phpbb3 sorts the list
by topic_last_post_time in descending order and by default limits the list to 1000 topics.

4. Summary of how the view or mark unread posts mod determines whether there are any unread posts

The view or mark unread posts mod uses the same efficient approach as the function display_forums() uses
to determine if there are any forums with unread topics (see first paragraph under (2) above).
It then toggles the text for the link to unread posts between 'View unread posts'
(if there are any unread forums or global announcements) and 'You have no unread posts' (if there are not).
The code for checking for unreads is in the check_unread_posts() function that appears in
includes/functions_view_or_mark_unread_posts.php. Note that in order to save a query, the code skips
the check if the user is on the index page and phpbb3 has already done the checking.

5. Summary of how the view or mark unread posts mod allows users to mark posts as unread

The most difficult part of the view or mark unread posts mod is the code that allows users
to mark posts as unread. That code is in the mark_post_unread() function that appears in
includes/functions_view_or_mark_unread_posts.php.
That code does the following when a user clicks to mark a post unread:

a. sets mark_time for the user and the relevant topic in the topics_track table
to the post_time of the post minus 1 (so that phpbb3 will think the post is unread)

b. sets a variable called "$forum_tracking_info" to equal the mark_time entry for the user
and relevant forum in the forum_tracks table; if there is no such entry, sets
$forum_tracking_info to be the user_lastmark entry for the user in the users table

c. if the post_time of the post is smaller (earlier) than $forum_tracking_info, then:

- sets mark_time for the user and the relevant forum in the forums_track table
to the post_time for the post minus 1 (so that phpbb3 will think the forum is unread)

- but before doing that, adds a new topics_track entry
(with mark_time = forum_tracking_info) for each other topic in the forum or in forum_id 0
that meets all of the following tests

- does not already have a topics_track entry for the user and forum

- has a topic_last_post_time less than or equal to the then current forum_tracking_info
(which shows that it has already been read)

- has a last post time greater than the new mark_time that will be used for the forums_track table

The purpose of adding these new topics_track entries is to make sure that phpbb3
will continue to treat already read topics as already read rather than incorrectly
thinking they are unread because their topic_last_post_time is after the new
mark_time for the relevant forum


Top
 Profile  
 
PostPosted: Sun Feb 07, 2010 9:25 pm 
Offline
User avatar

Joined: Sun Nov 23, 2008 10:16 am
Posts: 1111
Location: Edinburgh!
After reading all that, I think it can be added with a simple query.

All we have to do is check whether there are any posts with a post time greater than the user's last visited time and remove the "view unread posts" link if there aren't.

I'll have a bash at it sometime this week.

_________________
Mike

Dawnsio 'mlaen i'r gwres prynhawn a rwy'n addo erbyn yfori byddai wedi mynd, hwyl fawr i pawb, hwyl fawr i pawb...


Top
 Profile  
 
PostPosted: Mon Feb 08, 2010 9:34 am 
Offline
User avatar

Joined: Mon Jan 22, 2007 5:50 pm
Posts: 944
Cool, nice.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group