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
I am a bit confused about version numbers. In this thread I read about versions up to 2.0 (and later?), but when I go to the download link I see that the latest build is from January 2nd and has version number 1.1.0. Huh 

Anyway, I downloaded this version and installed it in my almost fresh install of MyBB 1.8.3. But when I activate it I get immediately a SQL error (see attached screen image) when I want to go to the index page.

[attachment=33466]

I cannot imagine that something went wrong with installing this plugin, because it is very straightforward. Please tell me what can be wrong........

EDIT
It looks likke it has something to do with the remark in post #235, but this here is a syntax error. Must have something to do with the single quotes, but I am not familiar with SQL.

EDIT 2

I can't stand this kind of situations, so I just tried. Line 624 of unreadPosts.php read:

        $this->where .= "t.visible = 1'";

and changed this to:

        $this->where .= "t.visible = 1";

Line 629 was:

            $this->where .= "AND t.closed NOT LIKE 'moved|%"; 

and replaced this by:

            $this->where .= " AND t.closed NOT LIKE 'moved|%'";

Now it works!! Just have to test various options now, but at least it runs and shows me some (I believe) correct new posts.
What I do not understand: how can apparently erroneous code come in the build of January 2?
I accidentally removed the code from the templates. What is the View Unread Posts code for templates? like {$*****}?
Version 1.2.0
   * Updated functions_indicators.php (only header...)
   * Fix SQL error (fix #3)


@Ad Bakker
I changed versioning in MyBB 1.8.

And why code with bug? It's very simple: I don't have time to test it. Yes, really. I can abandom my projects, or just update when I have time, but without testing. You can use it, you can don't use it.. or you can pay for fast support.


@geazy
For what? Link to search with counter, "unread post" mark in posts?
(2015-01-19, 06:47 AM)lukasamd Wrote: [ -> ]Version 1.2.0
   * Updated functions_indicators.php (only header...)
   * Fix SQL error (fix #3)


@Ad Bakker
I changed versioning in MyBB 1.8.

And why code with bug? It's very simple: I don't have time to test it. Yes, really. I can abandom my projects, or just update when I have time, but without testing. You can use it, you can don't use it.. or you can pay for fast support.


@geazy
For what? Link to search with counter, "unread post" mark in posts?

Yes, in the header template.
It's:

<!-- UNREADPOSTS_LINK -->

for link (header_welcomeblock_member), and


<!-- UNREADPOSTS_CSS -->


for plugins css code (headerinclude)
(2015-01-19, 06:53 AM)lukasamd Wrote: [ -> ]It's:

<!-- UNREADPOSTS_LINK -->

for link (header_welcomeblock_member), and


<!-- UNREADPOSTS_CSS -->


for plugins css code (headerinclude)

I added <!-- UNREADPOSTS_LINK --> to my nav (that's where my stuff is located) and there is an extra |

http://puu.sh/eIVNN/5924de59ed.png

Code:

<div class="navigation">
  <div style="float:right">
    <div class="nav-button"><!-- UNREADPOSTS_LINK --></div> </li>
    <a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$mybb->user['uid']}"><div class="nav-button">My Threads</div></a>
  </div>
{$nav}{$activesep}{$activebit}
</div>
Edit unreadPosts_link and unreadPosts_linkCounter global templates.
You can freely change appearance of this link.
(2015-01-19, 06:58 AM)lukasamd Wrote: [ -> ]Edit unreadPosts_link and unreadPosts_linkCounter global templates.
You can freely change appearance of this link.

Worked good Smile

How to mark all as read?
Use build-in fucntion "Mark All Forums Read".

You can also add this link wherever you want using this shortcode in template:

<!-- UNREADPOSTS_MARKALL -->

In default, it add new <td> with this link. You can change this by edit global template unreadPosts_markAllReadLink.
(2015-01-19, 08:39 AM)lukasamd Wrote: [ -> ]Use build-in fucntion "Mark All Forums Read".

You can also add this link wherever you want using this shortcode in template:

<!-- UNREADPOSTS_MARKALL -->

In default, it add new <td> with this link. You can change this by edit global template unreadPosts_markAllReadLink.

There's a blank box in index for where Mark All Read is. It stays blank unless directed to the new posts page. Using a div class nav box

http://puu.sh/eJXT7/e59575b805.png
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