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
Hi lukasamd,

Can you edit link to jscripts/unreadPosts.js adding for example {$mybb->settings['bburl']} ?

Because I have index without /forum/ folder, like http://site.com and I have error in the console for unreadPosts.js

[Image: w7VQLIT.png]

Thank you
Yep, your are right. I added new version to github.
I upgraded to the latest version and now the view unread posts link doesn't show up. I checked the settings and everything looks fine. Not sure what's wrong.
Try on standard MyBB theme
(2017-08-11, 04:14 PM)lukasamd Wrote: [ -> ]Try on standard MyBB theme

I am using the standard theme.
Hello!

The post marker only appears in the first unread page of thread view. But if I go to the second page don't appears nothing.

Is a bug?

Thanks in advance!
Hi all!

Is there a chance to show the unread status also on the portal (latest threads)?

I tried already to extend the portal.php with some queries, but no success.
Threads are marked as new then everytime and will not changed after read them.

Thanks in advance
Martin

I added these rows in portal.php:

// Last Read threads
 if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0 && !empty($threadcache))
{
$query = $db->simple_select("threadsread", "*", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($readthread = $db->fetch_array($query))
{
if(!empty($moved_threads[$readthread['tid']]))
{
$readthread['tid'] = $moved_threads[$readthread['tid']];
}
if($threadcache[$readthread['tid']])
{
$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];
}
}
} 

// LAST READ EDITED MD
if($mybb->settings['threadreadcut'] > 0)
{
$forum_read = $readforums[$thread['fid']];

$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;
}
} 


if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)
{
if(!empty($thread['lastread']))
{
$last_read = $thread['lastread'];
}
else
{
$last_read = $read_cutoff;
}
}
else
{
$last_read = my_get_array_cookie("threadread", $thread['tid']);
}

if($thread['lastpost'] > $last_read && $moved[0] != "moved")
{
$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;
}
else
{
$folder_label .= $lang->icon_no_new;
$new_class = "subject_old";
$thread['newpostlink'] = "";
}
I have a problem with a certain

Parse error: syntax error, unexpected '[' in /virtual/c/s/c*****.pl/inc/plugins/unreadPosts.php on line 31
Too old PHP version on server.
Hey lukasamd,
I found this plugin today and it is really good but it generates below warning :-
<error>
	<dateline>1505876367</dateline>
	<script>xmlhttp.php</script>
	<line>1066</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>Cannot modify header information - headers already sent by (output started at unreadPosts.php:318)</message>
</error>
I am using custom theme, default MyBB, default plugin and php version is 5.5
What do you think might be the problem ?

Regards
WallBB
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