MyBB Community Forums

Full Version: View Unread Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
lukasamd,

I found a problem in the code that was causing an extra Unread Posts link to be shown each time the plugin was uninstalled and reinstalled.

In the file "unreadPosts.tpl.php", the deactivate function has:

find_replace_templatesets('header_welcomeblock_member', '#' . preg_quote('<!-- UNREADPOSTS_LINK -->') . '#', '');

but it seems it should be:

find_replace_templatesets('header_welcomeblock_member_search', '#' . preg_quote('<!-- UNREADPOSTS_LINK -->') . '#', '');

Otherwise each uninstall leaves another copy of <!-- UNREADPOSTS_LINK --> in the template, which then gets replaced by an Unread Posts link when it's reinstalled, giving multiple Unread Posts links.
I like this capability and it's one my members have requested as we move from SMF to MyBB. However, it doesn't seem to work properly in my preferred theme. (Emerald). The arrow shows up indicating new posts in a thread, but the link to view all unread posts (i.e. have them gathered on one new page) doesn't appear.

What code do I need to insert that? Where do I need to put it?
Version 1.10:
- PHP 7.2 fixes
So steps how to update from older version - deactivate -> copy new files -> activate? Is it enough?
In last versions, just replace files by new versions.
(2018-03-29, 07:05 AM)lukasamd Wrote: [ -> ]In last versions, just replace files by new versions.
Hello, I could use some help with your plugin. I can't get it to work with Ignored Forums, as even if I did ignore them, threads with new posts in them would still be in the search results. How can this be fixed? Thanks.
(2018-05-16, 07:36 AM)rfssjz Wrote: [ -> ]Hello, everyone. I remember someone dropping this code at a different MyBB forum that officially hosts the Ignored Forums plugin, and I know one issue that I've always had with View Unread Posts is that it ignores one's own settings to ignore certain forums. For example, if Forum A is ignored and gets new posts, while Forum B isn't and still gets new posts, then when someone clicks View Unread Posts, content from both Forum A (ignored) and Forum B (not ignored) will be listed in the results.

Here is the code that I was referring to, in which you add to the Ignored Forums' plugin file:
if($mybb->input['action'] != 'getnew' && $mybb->input['action'] != 'getdaily' && $mybb->input['action'] != 'unread') return;
See the last part of the code, where it says "unread"? Even after changing it to "unreads", nothing changes.

Therefore, I decided to replace View New Posts (header) with View Unread Posts, and just have "getnew" take prominence. It works fine, but I would like to know how to make threads already read by the user not show up in the results, even if they hadn't yet marked the forums as read.

Is it possible to get Ignored Forums and View Unread Posts (search string "unreads") to work together? That's always annoyed me.

Thanks in advance.
Maybe this is an old problem, but I could not find it in thread and maybe you easily could answer it. 
It is an installation problem. 

I uploaded the .php files to the inc/plugins-directory. 
[Image: SeF0UaE.png]
I uploaded the functions_indicators.php to the inc-directory.
And put the language files on its place in the language directory. 

After doing this and looking at mybb at the section plugins for activation, there is nothing anymore, no plugins at all, and the ones I have have disappeared. 
[Image: YbOahxi.png]

After removing the file unreadPosts.php, the existing plugins re-appear again. 
[Image: JsWtABZ.png]

Did I do something wrong? Forget something? 
Someone has a tip?  

Caroline
p.s. I am not a programmer, just a good willing amateur, with some tech-knowledge.  Big Grin

p.s. Additional information. 
I have added the plugin to another MyBB site that I control and over there it works without any problem. Activation and installs immediately.  Huh  Feeling confused.  Both MyBB-forums run on the 1.8.14 version. They have different templates, so I changed to the default template in the not working system, but that does not help. It must be something very subtle. The "killer" is the file unreadPosts.php... but what does happen?
Hi,
I have updated plugin from 1.6 version (ehm I know, I didn't upload it from time..).

I have uninstalled and reinstalled the latest version. All work but there are still old unread posts, how can I reset all now? So all users will start again from 0 unread posts.

I was afraid that copying only the files the plugin didn't work anymore , since I have not updated it since a long time ..
Members have noted the following issue

Quote:The number in brackets next to View Unread Posts is incorrect when viewing an unread post

Quote:Just happened again, so I carefully noted what happened, just in case it helps diagnosis.
  • When viewing a thread I noticed that <View Unread Posts(3)> was displayed on the title bar.
  • I clicked on <View Unread Posts(3)> on the title bar. One unread thread was displayed that contained two unread posts. <View Unread Posts(2)> was now displayed on the title bar.
  • I clicked on the unread thread. Two unread posts were displayed and were labelled Unread Post #1 and Unread Post #2. <View Unread Posts(5)> was now displayed on the title bar.
  • I clicked on <View Unread Posts(5)> on the title bar. An empty list was displayed and <View Unread Posts(0)> was displayed on the title bar.
Note that no threads were created during the above scenario. I could even use the browsers backwards and forwards buttons to check that I had noted the sequence correctly.
This issue has just been noted, but I have been informed by another member that  it is something they have seen before
Any ideas?
Bump? ^^
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49