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 :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Already Read entries [message #162033] Mon, 15 March 2010 06:03 Go to next message
alopezie is currently offline  alopezie   Germany
Messages: 106
Registered: September 2003
Karma: 1
Senior Member
After Update from 2.7.6 to 3.0 we noticed the following problem:

In treeview the read entries are not marked as read (in difference to the old version)

So if you go through the thread you need to "Update" the page with the browser to see what has been read already. Should happen directly after reading ...


Alopezie.de - das Forum zum Thema Haarausfall
Re: Already Read entries [message #162037 is a reply to message #162033] Mon, 15 March 2010 18:59 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 09:16 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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.
Aw: Re: Already Read entries [message #162077 is a reply to message #162069] Wed, 17 March 2010 17:08 Go to previous messageGo to next message
alopezie is currently offline  alopezie   Germany
Messages: 106
Registered: September 2003
Karma: 1
Senior Member
Unfortunately this is beyond my capabilities. Never done anything with JS / Ajax.

Alopezie.de - das Forum zum Thema Haarausfall
Re: Aw: Re: Already Read entries [message #162106 is a reply to message #162077] Fri, 19 March 2010 05:47 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Please apply this patch, rebuild your themes and let me know if it solves the problem:
http://sourceforge.net/apps/trac/fudforum/changeset/4925
Aw: Already Read entries [message #162109 is a reply to message #162033] Fri, 19 March 2010 13:17 Go to previous messageGo to next message
alopezie is currently offline  alopezie   Germany
Messages: 106
Registered: September 2003
Karma: 1
Senior Member
Works perfectly.

Thx a lot.


Alopezie.de - das Forum zum Thema Haarausfall
Aw: Already Read entries [message #167356 is a reply to message #162109] Sat, 09 June 2012 15:38 Go to previous messageGo to next message
alopezie is currently offline  alopezie   Germany
Messages: 106
Registered: September 2003
Karma: 1
Senior Member
After upgrading to 3.0.4. RC2 this feature shows another problem :

- when going through the tree all seen entries are correctly marked
- when leaving the thread or reloading the forum does not save this information, so coming back everything is "unread"


Alopezie.de - das Forum zum Thema Haarausfall
Aw: Already Read entries [message #167441 is a reply to message #167356] Wed, 20 June 2012 05:18 Go to previous messageGo to next message
alopezie is currently offline  alopezie   Germany
Messages: 106
Registered: September 2003
Karma: 1
Senior Member
I replaced the new JS files with the old ones, but problem still existed. A bit strange. What to do ??

Alopezie.de - das Forum zum Thema Haarausfall
Re: Aw: Already Read entries [message #187051 is a reply to message #167356] Thu, 28 January 2016 11:20 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
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 14:29 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
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 18:11 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 11:15 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
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 11:15]

Report message to a moderator

Re: Aw: Already Read entries [message #187062 is a reply to message #187055] Mon, 01 February 2016 18:30 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 08:20 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
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 13:28 Go to previous messageGo to next message
andynormancx is currently offline  andynormancx   United Kingdom
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
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 14:34]

Report message to a moderator

Re: Aw: Already Read entries [message #187106 is a reply to message #187104] Tue, 05 April 2016 14:36 Go to previous message
andynormancx is currently offline  andynormancx   
Messages: 6
Registered: January 2016
Karma: 0
Junior Member
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Thu Mar 28 16:21:54 GMT 2024

Total time taken to generate the page: 0.02726 seconds