Jump to content

Unread Content Counter

Featured Replies

Posted

About This File

This plugin will display how many unread items you have in the board based on the Unread Content stream. The counter is linked to the Unread Content stream.

 

 

Nice idea Adriano, thanks. It would be nice to have an option to show the circle in this way:

xxxx.png.8a5883803f0691c0848073e649e7d3ee.png

  • Author
4 minutes ago, Ramsesx said:

It would be nice to have an option to show the circle in this way

I like it. Will take a look in a future version. 👍

I know it's early days, but does this also show on mobiles etc? (responsive)

  • Author
7 minutes ago, Joey_M said:

I know it's early days, but does this also show on mobiles etc? (responsive)

Yes. This is from a client's board:

image.thumb.png.6d47b91e8542fcd328ec0708

It's a bit customized (CSS) but it's there on mobile.

Sounds like a good motivation tool to "clean" the counter by reading the board 🙂 I guess an option to disable it might be useful though, many users will consider it nagging. 

Shouldn’t “Mark site as read” not instantly set the value to zero? It looks like the the unread count still remains for the full cache time, which is rather confusing—looking at the empty “unread page” with the red counter still showing lot’s of unread posts. 

  • Author

Yes, that's how it is for now. I'll take a look to improve it.

EDIT: it will update probably only after the page reload or visit another page as MARK READ is ajaxed now.

Edited by Adriano Faria

  • Author
17 hours ago, opentype said:

Shouldn’t “Mark site as read” not instantly set the value to zero? It looks like the the unread count still remains for the full cache time, which is rather confusing—looking at the empty “unread page” with the red counter still showing lot’s of unread posts. 

 

17 hours ago, Adriano Faria said:

it will update probably only after the page reload or visit another page as MARK READ is ajaxed now.

Done but not ajaxed. I can try to ajax it in a future version (depending on how it goes on marketplace) but for now you need to reload or go to another page of the board.

--------------------------------------------------------

What's New in Version 1.0.1:

  • Reset counter right after mark site read.

Will this work on my style?

  • Author

If your theme has the notification icon at the top and the designer followed the pattern, then yes. 

942411841_ScreenShot2020-03-14at12_55_45PM.thumb.png.74af5850c8997a6ca6451e1ac16cc204.png

 

IMG_1738.thumb.jpeg.bc2b753269ce1f9001649abc7cafbdae.jpeg

 

If anyone wants it to look like mine ....I changed the colors, adjustment mobile alignment and removed the font shading ...

Edit ucc.css

.ucc
{
	display: inline-block;
	background: green;
    color: #ffffff;
	border-radius: 50%;
	padding: 5px;
	width: 34px;
	height: 34px;
	min-width: 25px;
	min-height: 25px;
	line-height: 26px;
	text-align: center;
	font-size: 12px;
	font-weight: bold;
}

.uccmobile
{
	display: inline-block;
	background: green;
    color: #ffffff;
	border-radius: 50%;
	padding: 5px;
	width: 34px;
	height: 34px;
	min-width: 25px;
	min-height: 25px;
	line-height: 26px;
	text-align: center;
	font-size: 12px;
	font-weight: bold;
}

.ucczero
{
	background: #fafafa;
	color: #808080;
	text-shadow: 0 -1px 1px #ffffff, 0 1px 1px #000000;
}

.ucc:hover
{
  box-shadow: 0px 0px 0px 5px #448EAA;
}

 

  • Author
On 3/12/2020 at 4:20 PM, jair101 said:

Sounds like a good motivation tool to "clean" the counter by reading the board 🙂 I guess an option to disable it might be useful though, many users will consider it nagging. 

Missed this. I can add an option to show/hide using cookies. Add new columns on members table is a bit overkill to achieve this. 

if you are taking suggestions i would like for mark site read to trigger automatically when clicking on the counter.

having to mark site read seems like an unneeded extra task

Edited by fix3r

  • Author

That won’t happen, sorry. You can easily edit the template and change the link at your wish in your install. 👍

Edited by Adriano Faria

ok any way you can tell me what to add to make the mark forums read trigger, i still want the counter to go to the activity page but to also “mark forums read” too

  • Author
20 minutes ago, fix3r said:

i still want the counter to go to the activity page

Not sure I follow this.

EDIT: No, you can’t have both. A link points to ONE place only.  And what sense does it makes? You want to mark site read and then to go to a page that will have no results?!? Weird!

If you want to change the link in your install, just edit the template unreadContentCounter or something (away from my PC now) and change it. 

Edited by Adriano Faria

🙂 

“”EDIT: No, you can’t have both. A link points to ONE place only.  And what sense does it makes? You want to mark site read and then to go to a page that will have no results?!? Weird“”

close! i want to see the activity page and all the entires and also have it “mark forums read” 

no big deal we will use it as you have it, just thinking if the count would reset to “0” after you view the activity page would be ideal situation

then again the invision notifications wont clear when you view the content either you still have to click on your alerts to make them go away even if you have seen the content

  • 5 months later...

@Adriano Faria Here is a detailed sequence of actions.

 

  • Author
6 minutes ago, L4D2Noob said:

Here is a detailed sequence of actions

I see you logged in as another user? Is this user restricted in Content Discovery module Or has any kind of restriction? Does it work in your account?

What shows up in the error logs?

image.thumb.png.374a348fdd2d77a3e2f06174655c5112.png

The same is under my login

13 minutes ago, Adriano Faria said:

What shows up in the error logs?

Error: Call to a member function query() on null (0)
#0 /var/www/u2865/data/www/l4d2noob.ru/init.php(886) : eval()'d code(32): IPS\Dispatcher\hook697->getUnreadCounter()
#1 /var/www/u2865/data/www/l4d2noob.ru/system/Dispatcher/Dispatcher.php(154): IPS\Dispatcher\hook697->finish()
#2 /var/www/u2865/data/www/l4d2noob.ru/index.php(13): IPS\_Dispatcher->run()
#3 {main}

TRACE

#0 /var/www/u2865/data/www/l4d2noob.ru/init.php(988): IPS\_Log::log('Error: Call to ...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(Error))
#2 {main}

 

  • Author

Have you by any chance deleted the Stream ID = 1? This plugin is based on it, as stated:

Quote

This plugin will display how many unread items you have in the board based on the Unread Content stream.

hlmsKzI.png

I didn't know it can be deleted! The error is basically the script can't find it then the error in query().

3 minutes ago, Adriano Faria said:

Have you by any chance deleted the Stream ID = 1?

Yes, I remember that. Deleted.

  • Author

Well, I'll release a new version so you choose the AS the plugin should base. Remember that it has to be a GLOBAL AS; everyone has to view it, otherwise, errors again.

Actually, I will also make a check to bypass the plugin if it doesn't find the stream.

Recently Browsing 0

  • No registered users viewing this page.