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

Home » FUDforum Development » Bug Reports » Already Read entries (Labelling in Treeview)
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Message by alopezie is ignored  [reveal message]  [reveal all messages by alopezie]  [stop ignoring this user] Go to next message
Re: Already Read entries [message #162037 is a reply to message #162033] Mon, 15 March 2010 14:59 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3757
Registered: December 2004
Karma: 27
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
This is by design. The tree view was rewritten to use AJAX some time ago (before I got involved). The message body is refreshed while the rest of the page (including the message list) remains static.
Re: Already Read entries [message #162069 is a reply to message #162037] Wed, 17 March 2010 05:16 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3757
Registered: December 2004
Karma: 27
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Just a thought: we may be able to change the image with jQuery right after the AJAX call. If you would like to work on it, look at changeMsgFocus() in tree.tmpl.
Message by alopezie is ignored  [reveal message]  [reveal all messages by alopezie]  [stop ignoring this user] Go to previous messageGo to next message
Re: Aw: Re: Already Read entries [message #162106 is a reply to message #162077] Fri, 19 March 2010 01:47 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3757
Registered: December 2004
Karma: 27
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Please apply this patch, rebuild your themes and let me know if it solves the problem:
http://sourceforge.net/apps/trac/fudforum/changeset/4925
Message by alopezie is ignored  [reveal message]  [reveal all messages by alopezie]  [stop ignoring this user] Go to previous messageGo to next message
Message by alopezie is ignored  [reveal message]  [reveal all messages by alopezie]  [stop ignoring this user] Go to previous messageGo to next message
Message by alopezie is ignored  [reveal message]  [reveal all messages by alopezie]  [stop ignoring this user] Go to previous messageGo to next message
Re: Aw: Already Read entries [message #187051 is a reply to message #167356] Thu, 28 January 2016 06:20 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I've just upgraded from 2.7.7 to 3.0.5 and I'm having this problem too:

- messages show as read in the tree view
- after leaving the thread most of the ones that were read are not marked as read (I suspect just the first one you read is marked as read)
Re: Aw: Already Read entries [message #187053 is a reply to message #187051] Sat, 30 January 2016 09:29 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I'm thinking that the problem is in tree_msg.php.t and root_index.php.t

Back on 17/04/2011 a change was made to tree_msg.php.t, the following was removed:

        th_inc_view_count($msg_obj->thread_id);
	if (_uid && $msg_obj) {
		if ($msg_obj->last_forum_view < $msg_obj->post_stamp) {
			user_register_forum_view($msg_obj->forum_id);
		}
		if ($msg_obj->last_view < $msg_obj->post_stamp) {
			user_register_thread_view($msg_obj->thread_id, $msg_obj->post_stamp, $msg_obj->id);
		}
	}


at the same time a switch statement was added to root_index.php.t:

	switch ($t) {
		case 'msg':
			if (!isset($_GET['prevloaded'])) {
				th_inc_view_count($frm->id);
			}
			if (_uid && $obj2) {
				if ($frm->last_forum_view < $obj2->post_stamp) {
					user_register_forum_view($frm->forum_id);
				}
				if ($frm->last_view < $obj2->post_stamp) {
					user_register_thread_view($frm->id, $obj2->post_stamp, $obj2->id);
				}
			}
			break;
		case 'tree':
			th_inc_view_count($msg_obj->thread_id);
			if (_uid && $msg_obj) {
				if ($msg_obj->last_forum_view < $msg_obj->post_stamp) {
					user_register_forum_view($msg_obj->forum_id);
				}
				if ($msg_obj->last_view < $msg_obj->post_stamp) {
					user_register_thread_view($msg_obj->thread_id, $msg_obj->post_stamp, $msg_obj->id);
				}
			}
			break;
		case 'login':
			/* Clear expired sessions AND anonymous sessions older than 1 day. */
			q('DELETE FROM {SQL_TABLE_PREFIX}ses WHERE time_sec<'. (__request_timestamp__- ($FUD_OPT_3 & 1 ? $SESSION_TIMEOUT : $COOKIE_TIMEOUT)) .' OR (user_id>2000000000 AND time_sec<'. (__request_timestamp__- 86400) .')');
			break;
		case 'thread':
		case 'threadt':
			if (_uid) {
				user_register_forum_view($frm_id);
			}
			break;
	}


I've changed the switch statement to add an item for 'tree_msg' that falls through to 'tree'. That means that it then gets called when navigating the thread tree via AJAX.

I'm not sure whether this fix is 100% correct yet, it is possible that it is marking stuff read that it shouldn't be.
Re: Aw: Already Read entries [message #187054 is a reply to message #187053] Sat, 30 January 2016 13:11 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3757
Registered: December 2004
Karma: 27
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Please let us know if it's working, so we can apply you fix to the code base.

Best regards.
Frank
Re: Aw: Already Read entries [message #187055 is a reply to message #187054] Sun, 31 January 2016 06:15 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
That change definitely makes marking read work better in tree view (as it wasn't really working at all before).

However, I could claim it is a complete fix. It still isn't working as well as it did in 2.7.7

I don't yet understand enough about how the read table is supposed to work to know if there is anything more I can do to improve it. I don't really know my way around the FUDforum code.

[Updated on: Sun, 31 January 2016 06:15]

Report message to a moderator

Re: Aw: Already Read entries [message #187062 is a reply to message #187055] Mon, 01 February 2016 13:30 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3757
Registered: December 2004
Karma: 27
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Great news! Can you please post a patch or a detailed description of how to implement your fix?
Re: Aw: Already Read entries [message #187101 is a reply to message #187062] Fri, 01 April 2016 04:20 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Sadly it has become clear it really isn't a workable fix as I have it.
Re: Aw: Already Read entries [message #187104 is a reply to message #187101] Mon, 04 April 2016 09:28 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Ok, I have a better fix. In root_index.php.t, add the following to the switch statement:

                case 'tree_msg':
                        if (_uid && $msg_obj) {
                                th_inc_view_count($msg_obj->thread_id);
                                if ($msg_obj->last_forum_view < $msg_obj->post_stamp) {
                                        user_register_forum_view($msg_obj->forum_id);
                                }
                                if ($msg_obj->last_view < $msg_obj->post_stamp) {
                                        user_register_thread_view($msg_obj->thread_id, $msg_obj->post_stamp,
                                }
                        }
                        break;

[Updated on: Tue, 05 April 2016 10:34]

Report message to a moderator

Re: Aw: Already Read entries [message #187106 is a reply to message #187104] Tue, 05 April 2016 10:36 Go to previous message
andynormancx is currently offline  andynormancx   
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
And I guess the call to th_inc_view_count could be moved outside the if statement, not important for my forum as it isn't available to anonymous users.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Several bugs - willing to help with fix
Next Topic: Can not edit nor delete a Category & "SubCategory"
Goto Forum:
  

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

Current Time: Sun Apr 18 17:11:57 EDT 2021

Total time taken to generate the page: 0.00941 seconds