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 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?
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)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?
Reading a post does not remove it from the list but it does change the icon from 'Unread' to 'Read' during that session.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?
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.Paph wrote:Reading a post does not remove it from the list but it does change the icon from 'Unread' to 'Read' during that session.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?
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?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'.
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).CVinde wrote:But do people have to logout?
Any interest in making an 'unread posts' only version?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
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...HySpeed wrote:Any interest in making an 'unread posts' only version?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
Ok, if you don't want the part of this mod that relates to pms, you can skip the edits to the following files:HySpeed wrote:Any interest in making an 'unread posts' only version?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
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);
}
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.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.
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.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