View or mark unread posts

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
CVinde
Registered User
Posts: 6
Joined: Tue Feb 26, 2008 9:52 pm

Re: View or mark unread posts

Post by CVinde » Sun Mar 02, 2008 11:38 am

Well the problem with "View new posts" is that when a post is read, it doesn't disappeares. And there is no button like "reset my View new posts" My users have to logout and login again :(

There is no mod that has this feature? is there?

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq » Sun Mar 02, 2008 11:46 am

CVinde wrote:Well the problem with "View new posts" is that when a post is read, it doesn't disappeares. And there is no button like "reset my View new posts" My users have to logout and login again :(

There is no mod that has this feature? is there?
The author's notes in this mod tell you how to get rid of the new posts link altogether, because it is highly confusing to users to have a view unread posts link and a view new posts link on the same board. If you install this mod, I would advise getting rid of the view new posts link to avoid confusion (in which case your problem goes away). By the way, this mod does have a 'mark all posts read' feature so a user can 'clean' his board.

CVinde
Registered User
Posts: 6
Joined: Tue Feb 26, 2008 9:52 pm

Re: View or mark unread posts

Post by CVinde » Sun Mar 02, 2008 11:58 am

okay, the issue was not about having both pages, but if this mod solved the problem with a constant increasing number of "new post"

The final Q: if i have two unread post, and i read on of them, what happens then with the list? is the one i read disapearing? or is i just turning to another color?

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq » Sun Mar 02, 2008 12:04 pm

CVinde wrote:if i have two unread post, and i read on of them, what happens then with the list? is the one i read disapearing? or is i just turnung to another color?
If you already read it, it would naturally not show up on the unread list at all. And the mod does not change the behavior of the orange unread flags in regular phpbb3: once you read the post it no longer has an orange unread post flag (unless the user intentionally marks the post as unread after reading it)

Paph
Registered User
Posts: 362
Joined: Tue Dec 25, 2007 7:58 am
Location: Georgia - USA
Contact:

Re: View or mark unread posts

Post by Paph » Sun Mar 02, 2008 12:22 pm

CVinde wrote:okay, the issue was not about having both pages, but if this mod solved the problem with a constant increasing number of "new post"

The final Q: if i have two unread post, and i read on of them, what happens then with the list? is the one i read disapearing? or is i just turning to another color?
Reading a post does not remove it from the list but it does change the icon from 'Unread' to 'Read' during that session.
Of course, as Alan says, if a post is read then the next time the user logs in it won't be on the list, unless it's marked as 'Unread'.
Hawk

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq » Sun Mar 02, 2008 12:33 pm

Paph wrote:
CVinde wrote:okay, the issue was not about having both pages, but if this mod solved the problem with a constant increasing number of "new post"

The final Q: if i have two unread post, and i read on of them, what happens then with the list? is the one i read disapearing? or is i just turning to another color?
Reading a post does not remove it from the list but it does change the icon from 'Unread' to 'Read' during that session.
Of course, as Alan says, if a post is read then the next time the user logs in it won't be on the list, unless it's marked as 'Unread'.
I may be wrong, but I think CVinde was asking whether reading a post removes it from the list of unread posts you get when you click the View unread posts link (and of course it does). But you are (of course) correct that reading a post does not remove it from viewtopic.

CVinde
Registered User
Posts: 6
Joined: Tue Feb 26, 2008 9:52 pm

Re: View or mark unread posts

Post by CVinde » Sun Mar 02, 2008 5:41 pm

Reading a post does not remove it from the list but it does change the icon from 'Unread' to 'Read' during that session.
Of course, as Alan says, if a post is read then the next time the user logs in it won't be on the list, unless it's marked as 'Unread'.
But do people have to logout?
Because thats my problem with the "View new post", I have made the session length to some days, due to "remember me" problems, therefore the "View new post" is never reset.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq » Sun Mar 02, 2008 6:43 pm

CVinde wrote:But do people have to logout?
No. As I said earlier, if you read a post it is no longer unread, period. So it no longer shows up in the unread post list and is no longer flagged as orange (unless a user intentionally clicks to re-mark it unread).

HySpeed
Registered User
Posts: 9
Joined: Mon Dec 08, 2003 9:25 pm

Re: View or mark unread posts

Post by HySpeed » Sat Mar 08, 2008 10:13 pm

HySpeed wrote:I have had several of my members ask about this feature, so I plan to install your mod.
However, I don't have a need for the 'mark unread', and we use a modified / custom style, so I'll have to make the visual edits myself.

Do you have a collection of just the 'unread posts' changes so I can focus on those?

Thanks
Any interest in making an 'unread posts' only version?

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq » Sun Mar 09, 2008 12:07 am

HySpeed wrote:
HySpeed wrote:I have had several of my members ask about this feature, so I plan to install your mod.
However, I don't have a need for the 'mark unread', and we use a modified / custom style, so I'll have to make the visual edits myself.

Do you have a collection of just the 'unread posts' changes so I can focus on those?

Thanks
Any interest in making an 'unread posts' only version?
The edits are so separate that it should be pretty easy to break out (and I'll try to look at it and let you know how to do it some time over the next few days), but I am curious: why do you care one way or another? Even if you think the pm part of this is not useful, why do you affirmatively want to take it out and why are you willing to do something more complicated to keep it out? Just wondering...

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

unread posts only version (skips pm changes)...

Post by asinshesq » Sun Mar 09, 2008 12:51 am

HySpeed wrote:
HySpeed wrote:I have had several of my members ask about this feature, so I plan to install your mod.
However, I don't have a need for the 'mark unread', and we use a modified / custom style, so I'll have to make the visual edits myself.

Do you have a collection of just the 'unread posts' changes so I can focus on those?

Thanks
Any interest in making an 'unread posts' only version?
Ok, if you don't want the part of this mod that relates to pms, you can skip the edits to the following files:

includes/constants.php
includes/functions_privmsgs.php
includes/ucp/ucp_pm.php
includes/ucp/ucp_pm_viewfolder.php
styles/prosilver/template/ucp_pm_viewmessage.html
styles/subsilver2/template/ucp_pm_viewmessage.html

And, if you want to be crazy about it, you could also optionally leave out the lines in language/en/common.php that refer to pms and the following code in includes/functions_view_or_mark_unread_posts.php:

Code: Select all

/**
* marks a private message unread when the user clicks the mark pm as unread link
* when viewing the private message.  Takes a single parameter, which is the msg_id of the pm
* being marked as unread
*/
function mark_unread_pm($msg_id)
{
	global $db, $user, $phpbb_root_path, $phpEx;

	// redirect the user to the index if the user is not logged in or if user is a bot
	if (($user->data['user_id'] == ANONYMOUS) || $user->data['is_bot'])
	{
		redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
	}

	$user->setup('ucp');

	// find out what folder we are talking about so we can confine our actions to that folder
	$folder_id = request_var('f', PRIVMSGS_INBOX);

	$sql = 'SELECT msg_id
		FROM ' . PRIVMSGS_TO_TABLE . '
		WHERE msg_id = ' . $msg_id . '
			AND user_id = ' . $user->data['user_id'] . '
			AND pm_deleted = 0
			AND folder_id =' . $folder_id;
	$result = $db->sql_query($sql);

	if ($row = $db->sql_fetchrow($result))
	{
		// there is a pm in the relevant mailbox that matches that msg_id
		// so go ahead and mark it unread
		$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
			SET pm_unread = 1
			WHERE msg_id = ' . $msg_id . '
				AND user_id = ' . $user->data['user_id'] . '
				AND pm_deleted = 0
				AND folder_id =' . $folder_id;
		$db->sql_query($sql);
		include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
		update_pm_counts();
	}
	else
	{
		// if we get here, there is no pm in this user's inbox that matches that msg_id
		trigger_error('NO_MESSAGE');
	}
	$db->sql_freeresult($result);

	$meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox');
	meta_refresh(3, $meta_info);
	$message = $user->lang['PM_MARKED_UNREAD'] . '<br /><br />';
	$message .= '<a href="' . $meta_info . '">' . $user->lang['RETURN_INBOX'] . '</a><br /><br />';
	$message .= sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
	trigger_error($message);
}

sovietpop
Registered User
Posts: 14
Joined: Fri Nov 16, 2007 5:15 pm

Re: View or mark unread posts

Post by sovietpop » Sun Mar 09, 2008 10:22 am

ahh, seeing as I am having a problem with the pm end of this mod, maybe I should try and do this too.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq » Sun Mar 09, 2008 11:53 am

sovietpop wrote:ahh, seeing as I am having a problem with the pm end of this mod, maybe I should try and do this too.
Up to you. As I said in my pm to you, your problem is that you tried to use dreamweaver rather than a plain text editor to edit those files and got the usual result that dreamweaver messed up your files. If you have your backup files, go back to them and it's up to you whether to use a regular text editor to install the mod in those files or skip those files.

Tazmanian
Registered User
Posts: 218
Joined: Wed Jan 25, 2006 7:02 pm
Location: Belgium
Contact:

Re: View or mark unread posts

Post by Tazmanian » Sun Mar 09, 2008 5:04 pm

Hello,

i think there is a little bug when somebody post a global announcement.

Look at the printscreen. There is an unread (new) global announcement but the link to the view unread post shows 'there are no new messages'. However when I click on it, it does show the unread post.

http://users.telenet.be/ysoers/markunreadposts.jpg

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq » Sun Mar 09, 2008 9:27 pm

Tazmanian wrote:Hello,

i think there is a little bug when somebody post a global announcement.

Look at the printscreen. There is an unread (new) global announcement but the link to the view unread post shows 'there are no new messages'. However when I click on it, it does show the unread post.

http://users.telenet.be/ysoers/markunreadposts.jpg
Thanks. I never noticed that before, but note that it's the same behavior you get in an unmodded phpbb3 board. On an unmodded board, the forum where a global announcement is posted does not show up as new post (because as a technical matter the post has a forum_id 0f 0 rather than a forum_id for a particular forum), but it does show up as new in viewforum and does appear in the list of new posts when you click the view new posts link.

I'll consider whether to change that behavior for this mod in a future version when I get some time.

Locked

Return to “[3.0.x] MOD Database Releases”