MyBB Community Forums

Full Version: MyAlerts v2.0.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2023-04-04, 04:20 PM)RocketFoot Wrote: [ -> ]Does MyAlerts work with MyDownloads on my system or no go?

They seem to be working together so far on your system - my fix at least prevents errors on the index page. If either fails to work when you test in more depth, then feel free to let me know and I'll see if I can work out why.

(2023-04-04, 04:20 PM)RocketFoot Wrote: [ -> ]Thanks for fixing it up!  I appreciate you taking a look!

No worries!
Is there another extension to add to get more alerts?  I used to run this on another board and I remember a lot more alerts that were available in the settings?

NM...I found it...Moderation Alert Pack by Shade.
Is there a way to group like/thank you alerts together? So instead of receiving a bunch of individual notifications for each and every like, perhaps aggregating likes into a single alert if they take place over a certain span of time (maybe 12 hours, 24 hours)?

My board revolves around likes and I currently have like notifications disabled -- enabling it would cause a flood of individual like alerts. A feature or change like this would be very useful. Though it might be a bit complicated to implement this, I thought I'd suggest it anyway.
Did a quick search of this thread but did not find an answer....
On my forum, with this plugin enabled, thread views do not increment, stay static... any advice?
(2023-04-04, 05:12 PM)Digital Hedonia Wrote: [ -> ]Is there a way to group like/thank you alerts together? So instead of receiving a bunch of individual notifications for each and every like, perhaps aggregating likes into a single alert if they take place over a certain span of time (maybe 12 hours, 24 hours)?

My board revolves around likes and I currently have like notifications disabled -- enabling it would cause a flood of individual like alerts. A feature or change like this would be very useful. Though it might be a bit complicated to implement this, I thought I'd suggest it anyway.

This more strictly is in the domain of the Thank You/Like System (TYL) plugin, but in any case, here are some thoughts.

I'm not sure whether you're aware - perhaps not, since you refer to "individual notifications for each and every like" - but the TYL plugin generates only one alert per thanked/liked post, not one alert per thank/like. Since release 3.3.8 of the TYL plugin, the alert's output has been finessed, so that it indicates how many times the post has been thanked/liked (prior to v3.3.8, it only indicated the name of the first person who thanked/liked the post, regardless of any others who later thanked/liked it, and with no indication that any others had thanked/liked it if indeed others had). Only once (if) the alert for the thanked/liked post is clicked ("read") will any new thanks/likes for that post generate a new alert (in which case, the number of new thanks/likes - since the previous alert was "read" - are also shown in the alert, alongside the total number of thanks/likes).

If for your use case this truly does generate too many alerts, then feel free to let us know (and/or create an issue in the GitHub repo). I help to maintain the TYL plugin, and while I personally wouldn't at present have the motivation to implement further aggregation of the alerts it generates, I wouldn't at all be opposed to that feature being implemented by anybody who cared to, so long as the code was of good quality, and the aggregation could be turned on/off via a TYL plugin setting.

(2023-04-04, 06:42 PM)misticjeff Wrote: [ -> ]Did a quick search of this thread but did not find an answer....
On my forum, with this plugin enabled, thread views do not increment, stay static... any advice?

Very likely this is due to some sort of error occurring, which prevents the shutdown function from running. It's in the shutdown function that thread views are incremented (or postponed for updating via the "Thread Views" task if the "Delayed Thread View Updates" setting is on).

ETA: as for advice, more explicitly: identify those errors (or warnings), and resolve them.
(2023-04-04, 10:34 PM)Laird Wrote: [ -> ]


ETA: as for advice, more explicitly: identify those errors (or warnings), and resolve them.

Any advice how to look for/identify those error(s)/warnings?
(2023-04-05, 01:58 PM)misticjeff Wrote: [ -> ]Any advice how to look for/identify those error(s)/warnings?

Yep: enable error logging and then inspect the log(s). See: https://docs.mybb.com/1.8/faq/errors/

There's also this possibility, quoting @Matt in the #18-support channel on the MyBB Discord server:

Quote:worst case, you can just make the edit to inc/functions.php to remove the || (isset($error_handler) && $error_handler->has_errors) check. we discussed internally changing this as it's a pain in the [censored] having these things break due to errors that don't really matter
(2023-04-05, 02:22 PM)Laird Wrote: [ -> ]
(2023-04-05, 01:58 PM)misticjeff Wrote: [ -> ]Any advice how to look for/identify those error(s)/warnings?

Yep: enable error logging and then inspect the log(s). See: https://docs.mybb.com/1.8/faq/errors/

There's also this possibility, quoting @Matt in the #18-support channel on the MyBB Discord server:

Quote:worst case, you can just make the edit to inc/functions.php to remove the || (isset($error_handler) && $error_handler->has_errors) check. we discussed internally changing this as it's a pain in the [censored] having these things break due to errors that don't really matter

Yes, thanks.. the error log is filled with only this type of error, there are well over 100 of this type of error and nothing else.
Quote:<error>
<dateline>1680724903</dateline>
<script>inc/plugins/myalerts.php(814) : eval()'d code</script>
<line>2</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined variable $newAlertsIndicator</message>
<back_trace>#0  errorHandler->error() called at [/inc/class_error.php:153]
#1  errorHandler->error_callback() called at [/inc/plugins/myalerts.php(814) : eval()'d code:2]
#2  eval() called at [/inc/plugins/myalerts.php:814]
#3  myalerts_global_intermediate() called at [/inc/class_plugins.php:142]
#4  pluginSystem->run_hooks() called at [/global.php:498]
#5  require_once() called at [/showthread.php:28]
</back_trace>
</error>

<error>
<dateline>1680724907</dateline>
<script>inc/plugins/myalerts.php(814) : eval()'d code</script>
<line>2</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined variable $newAlertsIndicator</message>
<back_trace>#0  errorHandler->error() called at [/inc/class_error.php:153]
#1  errorHandler->error_callback() called at [/inc/plugins/myalerts.php(814) : eval()'d code:2]
#2  eval() called at [/inc/plugins/myalerts.php:814]
#3  myalerts_global_intermediate() called at [/inc/class_plugins.php:142]
#4  pluginSystem->run_hooks() called at [/global.php:498]
#5  require_once() called at [/index.php:18]
</back_trace>
</error>

<error>
<dateline>1680724909</dateline>
<script>inc/plugins/myalerts.php</script>
<line>713</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined array key "action"</message>
<back_trace>#0  errorHandler->error() called at [/inc/class_error.php:153]
#1  errorHandler->error_callback() called at [/inc/plugins/myalerts.php:713]
#2  myalerts_global_start() called at [/inc/class_plugins.php:142]
#3  pluginSystem->run_hooks() called at [/global.php:100]
#4  require_once() called at [/alerts.php:15]
</back_trace>
</error>

<error>
<dateline>1680724924</dateline>
<script>inc/plugins/myalerts.php(1342) : eval()'d code</script>
<line>16</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined array key "usercpalerts_e"</message>
<back_trace>#0  errorHandler->error() called at [/inc/class_error.php:153]
#1  errorHandler->error_callback() called at [/inc/plugins/myalerts.php(1342) : eval()'d code:16]
#2  eval() called at [/inc/plugins/myalerts.php:1342]
#3  myalerts_usercp_menu() called at [/inc/class_plugins.php:142]
#4  pluginSystem->run_hooks() called at [/inc/functions_user.php:471]
#5  usercp_menu() called at [/private.php:88]
</back_trace>
</error>
(2023-04-05, 08:09 PM)misticjeff Wrote: [ -> ]Yes, thanks.. the error log is filled with only this type of error, there are well over 100 of this type of error and nothing else.
[Error log snipped --Laird]

I've reported these warnings as an issue (#278) and filed a PR (#279) that fixes them along with other warnings that I noticed in general testing. It might not yet be a comprehensive fix but it's at least a good start.

If you want the fixes prior to any potential merge of the PR and new release, then you can download the updated files from GitHub:

Overwrite the alerts.php file in your root with this new version and overwrite the inc/plugins/myalerts.php file with this new version.

Please let us know of any (further) problems.
(2023-04-08, 04:51 PM)Laird Wrote: [ -> ]Overwrite the alerts.php file in your root with this new version and overwrite the inc/plugins/myalerts.php file with this new version.

Please let us know of any (further) problems.

Awesome! worked like a charm!  Thank You very much for all your assistance!