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
How can I display the results as posts instead of threads?

In unreadPosts.php I tried changing line 487 from

"resulttype" => "threads",

to

"resulttype" => "posts",

but then it no longer worked.
Hello,

since few days - after mybb update to 1.8.33 the plugin gives normaly users, an error, when they are logged and forum is closed. They get the message about closed forum in the line with usercp, after unread posts counter:

Quote:Freundesliste öffnen Neue Beiträge ansehen Heutige Beiträge ansehen Ungelesene Beiträge (500+) {"errors":["Dieses Forum ist zur Zeit geschlossen. Der Administrator hat folgenden Grund angegeben:
Das Forum ist wegen eines Updates vor\u00fcbergehend geschlossen. In K\u00fcrze geht es weiter.<\/em>"]} {"errors":["Dieses Forum ist zur Zeit geschlossen. Der Administrator hat folgenden Grund angegeben:
Das Forum ist wegen eines Updates vor\u00fcbergehend geschlossen. In K\u00fcrze geht es weiter.<\/em>"]} Private Nachrichten (0 ungelesen, 8 insgesamt)

as email I get this error message:

Quote:Your copy of MyBB running on Clever-Excel-Forum (https://www.clever-excel-forum.net) has experienced an error. Details of the error include:
---
Type: 2
File: xmlhttp.php (Line no. 1140)
Message
Cannot modify header information - headers already sent by (output started at /mnt/web016/e3/82/56775182/htdocs/net/inc/plugins/unreadPosts.php:327)
Back Trace: #0  errorHandler->email_error(2, Cannot modify header information - headers already sent by (output started at /mnt/web016/e3/82/56775182/htdocs/net/inc/plugins/unreadPosts.php:327), xmlhttp.php, 1140) called at [/mnt/web016/e3/82/56775182/htdocs/net/inc/class_error.php:229]
#1  errorHandler->error(2, Cannot modify header information - headers already sent by (output started at /mnt/web016/e3/82/56775182/htdocs/net/inc/plugins/unreadPosts.php:327), xmlhttp.php, 1140) called at [/mnt/web016/e3/82/56775182/htdocs/net/inc/class_error.php:153]
#2  errorHandler->error_callback(2, Cannot modify header information - headers already sent by (output started at /mnt/web016/e3/82/56775182/htdocs/net/inc/plugins/unreadPosts.php:327), /mnt/web016/e3/82/56775182/htdocs/net/xmlhttp.php, 1140, Array ([message] => Dieses Forum ist zur Zeit geschlossen. Der Administrator hat folgenden Grund angegeben:<br /><em>Dieses Forum ist zur Zeit wegen Wartungsarbeiten geschlossen. Bitte versuche es später noch einmal</em>,[charset] => UTF-8))
#3  header(Content-type: application/json; charset=UTF-8) called at [/mnt/web016/e3/82/56775182/htdocs/net/xmlhttp.php:1140]
#4  xmlhttp_error(Dieses Forum ist zur Zeit geschlossen. Der Administrator hat folgenden Grund angegeben:<br /><em>Dieses Forum ist zur Zeit wegen Wartungsarbeiten geschlossen. Bitte versuche es später noch einmal</em>) called at [/mnt/web016/e3/82/56775182/htdocs/net/xmlhttp.php:218]


For test I had created a new forum with this changes
File Permissions - MyBB Documentation 
and only with a second, normaly user, 

uploaded and installed the original plugin files, and I get the error message as normaly user in closed forum. 
When I deactivate the plugin, I don't get this error message and the message about the closed forum is correctly.


In 1.8.33 are two changes in forum_indicators.php, line 109 and 113. I wrote this changes in the plugin file, but the error is the same.
My PHP version is 7.4.x
I installed this plugin on my forum and it seems to work on default but the link and counter will not show up anywhere that I put the variable on either of my 2 custom themes? What could I be doing wrong?
From a quick look into the source code, I think you should be able to put <!-- UNREADPOSTS_LINK --> in almost any template.
https://github.com/lukasamd/MyBB-View_Un...#L592-L612
(2023-07-05, 04:50 AM)Omar G. Wrote: [ -> ]From a quick look into the source code, I think you should be able to put <!-- UNREADPOSTS_LINK --> in almost any template.
https://github.com/lukasamd/MyBB-View_Un...#L592-L612

ETA: I got it working!  Not sure how but it is working now, LOL!  Thanks Omar!
(2019-05-31, 10:56 AM)schmatzler Wrote: [ -> ]
(2019-04-18, 08:50 AM)Kyng Wrote: [ -> ]I checked my equivalent table, and the 'ipaddress' column here was a VARBINARY(16), which should be large enough to accommodate an IPv6 address!

So, does anyone know how I might be able to fix this?

When the IPv6 addresses are set to be anonymized, they will be stored as a much longer string.

I set the field to VARBINARY(70) and the error is gone now.

2019 and some plugins still don't support IPv6 correctly...

Really old post, sorry, but I had the issue and found a better correction imho.
Changes line 484 of the plugin.
Initial: "ipaddress" => $db->escape_string($session->ipaddress),
Corrected: "ipaddress" => $db->escape_binary(my_inet_pron($session->ipaddress)),

See the PR @ https://github.com/lukasamd/MyBB-View_Un...ts/pull/31
I have just tried this plugin and it works perfectly from what I can see. The only thing I notice is that the statistics counter does not work. Is there any modification I can make to fix this problem?
via the Server Options and Optimisation I noticed that the only error is this one in the photo
Hey,
I will check this plugin (any maybe also my other mybb plugins) in next 2-3 weeks and update to be compatible with latest MyBB version

I do not sure if it will be possible to recover access to mod pages also
This is great news. Congratulations by the way on the various plugins Smile
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