Alert Improvements by Xon

Alert Improvements by Xon 2.10.13

No permission to download
BTW. You may add one more option, please?
To allow or dont allow the "use custom".
I want my users have "no alerts" or "alerts", but I dont want them to choose.

  • No alerts
  • Use defaults
  • Use custom
 
BTW. You may add one more option, please?
To allow or dont allow the "use custom".
I want my users have "no alerts" or "alerts", but I dont want them to choose.

  • No alerts
  • Use defaults
  • Use custom
You can just edit out the 'use custom' as an option in the template and it will work
 
They are quite different. One applies when the pop-up is opened, the other when the alert is generated.
 
Getting this error..

Upgraded to php 8.2.15

ErrorException: [E_USER_WARNING] [WebPush] gmp extension is not loaded but is required for sending push notifications with payload or for VAPID authentication. You can fix this in your php.ini. src/vendor/minishlink/web-push/src/WebPush.php:82


3 src/XF/Service/PushNotification.php(133): XF\Service\PushNotification->getWebPushObject()
#4 src/XF/Service/PusherTrait.php(194): XF\Service\PushNotification->sendNotifications()
#5 src/XF/Repository/UserAlert.php(165): XF\Service\Alert\Pusher->push()
#6 src/addons/SV/AlertImprovements/XF/Repository/UserAlertAutoReadPatch.php(15): XF\Repository\UserAlert->insertAlert(189, 181, '6TimesaRed', 'post', 2292920, 'reaction', Array, Array)
#7 src/XF/Repository/UserAlert.php(103): SV\AlertImprovements\XF\Repository\UserAlertAutoReadPatch->insertAlert(189, 181, '6TimesaRed', 'post', 2292920, 'reaction', Array, Array)
#8 src/XF/Reaction/AbstractHandler.php(187): XF\Repository\UserAlert->alertFromUser(Object(SV\ReportImprovements\XF\Entity\User), Object(SV\ReportImprovements\XF\Entity\User), 'post', 2292920, 'reaction', Array)
#9 src/XF/Repository/Reaction.php(203): XF\Reaction\AbstractHandler->sendReactionAlert(Object(SV\ReportImprovements\XF\Entity\User), Object(SV\ReportImprovements\XF\Entity\User), 2292920, Object(SV\WarningImprovements\XF\Entity\Post), 1)
#10 src/XF/Repository/Reaction.php(143): XF\Repository\Reaction->insertReaction(1, 'post', 2292920, Object(SV\ReportImprovements\XF\Entity\User), true, false)
#11 src/XF/ControllerPlugin/Reaction.php(62): XF\Repository\Reaction->reactToContent(1, 'post', 2292920, Object(SV\ReportImprovements\XF\Entity\User), true)
#12 src/XF/ControllerPlugin/Reaction.php(21): XF\ControllerPlugin\Reaction->actionToggleReaction(Object(SV\WarningImprovements\XF\Entity\Post), 'posts/reactions', 'posts')
#13 src/XF/ControllerPlugin/Reaction.php(14): XF\ControllerPlugin\Reaction->actionReact(Object(SV\WarningImprovements\XF\Entity\Post), 'posts', 'posts/react', 'posts/reactions')
#14 src/XF/Pub/Controller/Post.php(381): XF\ControllerPlugin\Reaction->actionReactSimple(Object(SV\WarningImprovements\XF\Entity\Post), 'posts')
#15 src/addons/KL/EditorManager/XF/Pub/Controller/Post.php(30): XF\Pub\Controller\Post->actionReact(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(352): KL\EditorManager\XF\Pub\Controller\Post->actionReact(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'React', Object(XF\Mvc\RouteMatch), Object(SV\AlertImprovements\XF\Pub\Controller\Post), NULL)
#18 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\AlertImprovements\XF\Pub\Controller\Post), NULL)
#19 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#21 src/XF.php(524): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}

Request state​

array(4) {
["url"] => string(34) "/posts/2292920/react?reaction_id=1"
["referrer"] => string(58) "https://www.sixcrazyminutes.com/threads/dark-theme.199121/"
["_GET"] => array(1) {
["reaction_id"] => string(1) "1"
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(27) "/threads/dark-theme.199121/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}


Is this saying the version of php does not have gmp extension installed ?
 
Getting this every so often, and it's the only error showing in the log. It seems to be showing "AlertImprov" as the primary addon, but also mentioning Nix's Discord addon. Not sure if it's the Discord addon messing with Alert Improvements, or Alert Improvements messing with Discord?

Code:
ErrorException: Template error: [E_USER_WARNING] Template public:alert_user_chat_alert is unknown src/XF/Template/Templater.php:693

Stack Trace
Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/mesohaven...', 693)
#1 src/XF/Template/Templater.php(693): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(1622): XF\Template\Templater->getTemplateData('public', 'alert_user_chat...')
#3 src/addons/MaZ/AUN/XF/Template/Templater.php(39): XF\Template\Templater->renderTemplate('alert_user_chat...', Array, true, NULL)
#4 src/XF/Alert/AbstractHandler.php(80): MaZ\AUN\XF\Template\Templater->renderTemplate('public:alert_us...', Array)
#5 src/XF/Entity/UserAlert.php(71): XF\Alert\AbstractHandler->render(Object(NF\Discord\XF\Entity\UserAlert))
#6 src/XF/Template/Templater.php(1195): XF\Entity\UserAlert->render()
#7 internal_data/code_cache/templates/l1/s1/public/svAlertImprov_macros.php(307): XF\Template\Templater->method(Object(NF\Discord\XF\Entity\UserAlert), 'render', Array)
#8 src/XF/Template/Templater.php(828): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#9 internal_data/code_cache/templates/l1/s1/public/svAlertImprov_account_alerts_popup.php(46): XF\Template\Templater->callMacro('svAlertImprov_m...', 'alert_row', Array, Array)
#10 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#11 src/addons/MaZ/AUN/XF/Template/Templater.php(39): XF\Template\Templater->renderTemplate('svAlertImprov_a...', Array, true, NULL)
#12 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:svAlertI...', Array)
#13 src/XF/Mvc/Renderer/Json.php(86): XF\Template\Template->render()
#14 src/XF/Mvc/Renderer/Json.php(70): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Account\\Aler...', 'public:svAlertI...', Array)
#15 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Json->renderView('XF:Account\\Aler...', 'public:svAlertI...', Array)
#16 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#19 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#20 src/XF.php(524): XF\App->run()
#21 index.php(20): XF::runApp('XF\\Pub\\App')
#22 {main}

Req State
Code:
array(4) {
  ["url"] => string(195) "/account/alerts-popup?_xfRequestUri=%2Fthreads%2Fcomplete-dinosaur-found-in-france.414%2F&_xfWithData=1&_xfToken=1710038728%2C12b378457a418b58b929222e97a933a8&_xfResponseType=json&_=1710037857123"
  ["referrer"] => string(72) "https://mesozoichaven.com/threads/complete-dinosaur-found-in-france.414/"
  ["_GET"] => array(5) {
    ["_xfRequestUri"] => string(47) "/threads/complete-dinosaur-found-in-france.414/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1710038728,12b378457a418b58b929222e97a933a8"
    ["_xfResponseType"] => string(4) "json"
    ["_"] => string(13) "1710037857123"
  }
  ["_POST"] => array(0) {
  }
}
 
That is unrelated to any of my add-ons or the discord integration add-on. Do you have a chat add-on installed? It is triggering alerts which don't have a template
 
That is unrelated to any of my add-ons or the discord integration add-on. Do you have a chat add-on installed? It is triggering alerts which don't have a template
Nope, I uninstalled both of andy's chat and chatbox addons then ran a rebuild master data afterwards, still doing it. I have nix's discord addon but its out of date (can't afford renewal).
 
If you removed an add-on and it didn't correctly mark the alerts as "owned" by that add-on this is expected as it is trying to render the alerts when the template no longer exists
 
If you removed an add-on and it didn't correctly mark the alerts as "owned" by that add-on this is expected as it is trying to render the alerts when the template no longer exists
So, how does one resolve it? I have no idea besides running the 'rebuild master data', which I did. The discord addon is installed and active, mostly used for login and not much else.
 
Has someone an idea how to translate complicated phrases like sv_x_reacted_y_content_z_times

{name} reacted to <a {unsummarizeAlertLinkAttributes}>{reactedcontent}</a> with {reactions}

It seems some of the parts are hard-coded?

{reactedcontent} for example?


At the moment i have something like this:

Name hat auf 9 of your beiträge mit Like x 9 reagiert.

sv_x_of_y_content_type helps onle a little

Name hat auf 9 beiträge mit Like x 9 reagiert.
 
Last edited:
The reaction name isn't phrased, that is a limitation of XF's reaction setup. The reactions blob is generated by the template svAlertImprov_macros::alert_reactions which calls XF's reaction handling to display the reaction name + reaction count.

The reactedcontent is populated by repeatedly calling sv_x_of_y_content_type and gluing to resulting mess together with a , character.
 
Top Bottom