ElkArte Community

Extending Elk => Addons => Topic started by: emanuele on July 25, 2015, 01:32:59 pm

Title: [ADDON] [BETA] Dismissible notices
Post by: emanuele on July 25, 2015, 01:32:59 pm
A bit of hype. :P

I have almost finished the addon I'm working on, by the end of the weekend it should be completed.

Attached a few screenshots.

The basic idea is to give admins a tool to annoy users with notices popping up in a corner[1]. :P
Well, I had the idea because I was thinking of a way to inform users of a planned maintenace, but you can use it even to tell guests to sign up for example, or promote a paid membership, or anything else.

As you can see from the screenshot, each popup is customizable for:
expiration date (using jquery-ui datepicker completely localized),
style (that you later have to write in a css file, sorry :P),
groups that can see the popup,
positioning of the popup (that can be global, or attached to a particular element through personal floatation device class).

Once the popup is set, the members can dismiss it forever or simply close it for the current page (in the future it may be possible to close it for a session, if it is requested badly or if someone code it. :P), it is possible to reset the dismissed popups (so the users will have to "accept" it again)... what else? Oh, yes, because of a but in Elk this addon will not work in any version lower than 1.0.5, sorry. O:-)

ETA: I forgot to attach the images... xD

Repository: https://github.com/emanuele45/DismissibleNotices
actually it is possible to show them all around the screen, but for a start I decided to limit it to the upper left corner.
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: Burke Knight on July 25, 2015, 02:04:04 pm
As for the css, you could save from edits, by using hooks to insert css entered into a box in the add-on 's settings page.
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: emanuele on July 25, 2015, 02:44:43 pm
For a simple box, the theme editor can be used, no need to add yet another one... IMO.
Of course I can be wrong. ;)
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: NetFlag on July 27, 2015, 02:08:59 am
Quote from: emanuele – -- Oh, yes, because of a but in Elk this addon will not work in any version lower than 1.0.5, sorry. O:-)

Well, then acceleration to release 1.0.5 quickly. ;)
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: emanuele on July 27, 2015, 02:35:52 am
It's not that far September! :P
Though, since in September there is also to deal with the release of 1.1 beta, it may be worth releasing 1.0.5 a little earlier, let's say very beginning of September, to have time to fix the usual messes with the merge process. lol
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: emanuele on September 27, 2015, 05:19:45 am
Ohhh... right, I never released that one! :-[
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: emanuele on October 19, 2015, 05:36:54 pm
I finally found some time to clean up the latest bits in order to push the code online.
https://github.com/emanuele45/DismissibleNotices
I haven't tested it that much, I'm pretty sure something is broken (i.e. date localization in the date picker) and the installer may not work.
Apart from that, and hoping I didn't forget anything, the code should give something. :P
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: Eliana Tamerin on November 01, 2015, 11:11:37 am
So do you want people to alpha test or fix your broken, broken code? :P
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: emanuele on November 02, 2015, 05:13:07 pm
/me whistles innocently :P
Title: Re: [ADDON] [WIP] Dismissible notices
Post by: Eliana Tamerin on November 02, 2015, 07:11:37 pm

Translation: The latter. ;)
Title: Re: [ADDON] [BETA] Dismissible notices
Post by: emanuele on March 05, 2016, 05:05:40 pm
Bumpity! :D

Today I spent a bit of time working on that one and pushed a new version that is hopefully a little more stable with few new features:
1) possibility to decide the position of the popup (9 positions around the monitor, and "global" (i.e. monitor), or "element" (i.e. the popup is "attached" to a particular element with a certain class,
2) added the button to reset the dismissed popups, that way the members will have to dismiss them again (pretty annoying, but seemed potentially useful :P),
3) I added a little "replacing" feature based on what @meetdilip asked in features discussions about having a "hello {user}" thingy.

That's all for today! :)
I attached a new screenshot to the first post of the tweaked admin page with the new features:
(http://www.elkarte.net/community/index.php?action=dlattach;topic=2795.0;attach=3405;image)
Title: Re: [ADDON] [BETA] Dismissible notices
Post by: Flavio93Zena on March 05, 2016, 08:05:07 pm
"Little long testa" "Prova"... LOL
Title: Re: [ADDON] [BETA] Dismissible notices
Post by: emanuele on September 24, 2017, 06:08:01 pm
Fixed some more, still buggy the first time a notice is created (they appear twice until you reload the page once, then it's all good).
And it still lack a proper "delete"...

Seems to work fine with both 1.0 and 1.1.