XF 1.4Alert trigger for watched theads

Well-known member

The problem is, when you view an alert in alert overview (on top right on navigation bar, the mouseover effect) BUT you don't visit the thread (not clicking on the alert), you will not get new alerts for that watched thread.

Most of the time, when there are new alerts, I just go on top right and look what kind of alerts I got in the overview. And often I don't visit the threads I watched. But this is fatal. Because now I will never get an alert again for those watched threads. I MUST visit the thread before I get again new alerts.

What I want is: I want to get alerts for unread watched threads (like Xenforo default). But the trigger for the next alert shouldn't be that I have to read the thread to get a new alert. I want that the trigger is the "viewed alert" part, not the "viewed thread" part.

I want to change the Xenforo core to have this effect. Can you help me?

Well-known member

Yeah, agree with you, but sometimes it must be done. For example in my cases:
One for setting monday as the first day of the week (Xenforo default gives us no option for that).
One for displaying the time of the postings (again no option for that).
And this would be the third edit.
And if something goes wrong, we can always download the default xenforo pack and replace the php files.

XenForo developer

Actually, I think what you're proposing is bigger than you think and would certainly require more than a few lines of code, and likely edits in multiple files. Therefore, I'd recommend a custom developed solution that extends XF properly in this case.

Well-known member

Along the lines of this question, maybe an aside to it, this is something that I'm not quite sure about related to XF function.

Let's say that I get 20 alerts for thread replies. I go and visit 4 of the threads, but not the other 16.

In this case, are all the alerts "reset", or only the ones for the threads I visited? Meaning, if there were more replies to the other 16 threads that I did not visit, will I get alert or not after just having visited the site?

I ask because some other forum engines seem to reset everything upon simply visiting the site.

So it's a question of, are these 2 different things?

XF:

You will not receive any further emails about this thread until you have read the new messages.

This seems to be related to "mark posts as read" feature. Most of the forums have a limit. So for 90 days or something (you can configure it in ACP) unread posts will be marked as unread. But after the 90 days those unread posts become into "read posts".

It seems that those sites you are talking about don't have at all a configuration for "unread posts". They simply mark everything as read after you logged in and left the site. That means they don't save in the cache users' unread posts at all.
So because of that, that after every visit the forum resets your "unread posts", you will get everytime a new alert when someone posted something in a thread you watched. Because as explained, because it doesn't save your unread threads/posts, it doesn't matter if you visit these threads or not. All will be resetted. So you will always get a new alert when someone has posted something.

Well-known member

@sbj thanks for confirming that. It's a slight difference that I really didn't notice right away but I was pretty sure that it was the case.

In case you're wondering, the engine I'm referring to is VB and I think it also works this way for many other forum engines - they don't track "unread posts" on a thread-by-thread basis or cache them at all, but rather, just if you have visited the site at all since the last reply to a thread was sent. I know this because I'll get half a dozen alerts for threads I am subscribed to, then I'll click on one and that resets them all, so I'll get an email the next time a reply was made to a thread even if I haven't looked at that particular thread on my last visit.

On one hand, this really reduces the e-mail load on the server. If I'm subscribed to 100 busy threads and I look at one of them, in a few hours I'm going to only get alerts for the thread I viewed instead of all 100 threads again. But on the other hand that also is not really what I was used to, so it's a learning curve to remember that if I want to get reply alerts for a busy thread, I have to regularly look at that thread and reset the unread posts (or mark all as read). Not 100% sure I like that, but I think that it ties into the alert and the counters and it would probably be difficult to mimic that functionality in XF.

Well-known member

I understand the different approach. Yeah, some decide this way and other ones the other ways.

But I think resetting them all, just because you visited the site or a thread is also not good. This behaviour I hate the most on forums.
I want to keep track of what I read and what not. So when I have time I can check those threads I haven't read yet. But with resetting everytime the unread feature, I can't keep track of what I have read and what not. The resetting forces me to read everything in that single visit, because another chance I won't get. In the next visit everything is resetted and then I don't know which I should have read earlier and not.
So the approach of xF is better. With having a cache for the unread posts, I can always come back and read the threads I haven't read yet. So I can come back when I have free time.
Just the alert triggering part is not optimal in my opinion. When I viewed an alert, that means I checked if there is something new. Then I want to get a new alert for that thread again. But I am forced also to actually visit that thread and read it. But maybe I don't have time?

Of course if the alert also triggers an e-mail, it may affect the e-mail load. But I just see it from the user experience view. From that view I think it is not optimal yet, but maybe overall it is optimal (because of server load). Just my opinion.

Well-known member

I get what you're saying. Viewing the alert does not equal resetting the unread flag, leading you to possibly think that you've read the thread and not missed anything (and that you would get future alerts) when you have missed something and won't get alerts.

So what you want is that the alert flag (counter) won't decrement until you actually view the thread, even if you hover over the alert tab and view them.

Now this, I agree, would be an improvement. The caveat to this might be that the alerts for things like likes, etc, that aren't related to someone actually typing something, those would get reset - but actual posts would not.

Similar to how Conversation alerts work. You can hover over those and view the unread alert, but the alert does not clear until you actually read the convo message.

Well-known member

I get what you're saying. Viewing the alert does not equal resetting the unread flag, leading you to possibly think that you've read the thread and not missed anything (and that you would get future alerts) when you have missed something and won't get alerts.

One solution would be not to decrement it, like you say. But I had a different solution. To decrement it but getting again new alerts when someone replied to a thread without visiting the thread. Because with hovering on the alert baloon, this is an active action, that means actively you decide to notice that someone replied to a watched thread. So it means the alert flag can decrement. But the next time someone replied to that thread, I want to get again a new alert, without having to visit the thread. But this is not possible right now. It is not enough to view the alert, you must also visit the thread to get new alerts again.

Yeah.
When you see, this thread is from April, so I asked for help some time ago (as this behaviour annoyed me for a while).Then yesterday Amin Sabet posted the same issue.
Coincidentally 15 hours later Xon posted this new add-on you linked which deals with alerts and "read/unread" feature.
So I thought it is the perfect time to mention this in Xon's thread, maybe that he can also look into this thing.

Well-known member

Hmmmm...not sure which one spawned it, the Pushover thing on TAZ or he threads here, but I'm thinking TAZ because he posted there first that he was thinking about making it. Then 7 hrs later he posted it.

Well-known member

Hmmmm...not sure which one spawned it, the Pushover thing on TAZ or he threads here, but I'm thinking TAZ because he posted there first that he was thinking about making it. Then 7 hrs later he posted it.

I'm pretty sure it has nothing to do with the thread from here. So, it must have to do with TAZ (also I am not aware what happened there). As I said, it is just a coincidence that I've seen that one thread from Amin Sabet (which made me think about my own thread which is this thread) and hours later Xon posted an add-on which deals with alerts. So I took the chance and mentioned this in his add-on thread.

Well-known member

The problem is, when you view an alert in alert overview (on top right on navigation bar, the mouseover effect) BUT you don't visit the thread (not clicking on the alert), you will not get new alerts for that watched thread.