HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Christmas/Charity Coding Offer 🎅

I bet you are all fed up by those massive "IT'S BLACK FRIDAY! CONSUME! CONSUME!" attacks all around you just like I am.

And I thought I turn it the other way around: ask me for a simple plugin, some code snippets or anything like that and if I provide them to you, you are morally obligated to do something good: be kind to a homeless person, help the old lady in your neighbourhood to carry her bags home or simply feed the birds and hedgehogs outside, anything like that. You get the idea.



  • Ah R_J, great idea but it all depends on how simple simple is (would flattery help if I stated that what is simple for you is monumental to others?-)

    So here is a "simple" one:

    Discussions/comment daily digest. Yea, I read through all the previous discussions related to the subject, and at the risk of restarting arguments I'd just say that I am not convinced - especially when the solution comes from volunteer rather than Vanilla where they have to consider scalability (and perhaps the load on their servers).

    So here it is if I had the time to do it (and I over elaborate for the benefit of the wider audience):

    • email notifications are accumulated rather than emailed (as they are today- and of course depending on user preference setting). (Preferably just the reference to the items needing notifications - discussion & comment IDs)
    • The accumulated emails, on a per-user basis, are processed by a plugin-callable function (mini-dispatch). That function creates and sends an email to the intended user and removes the accumulation for that user and preserves the date emails were sent so that no more would be sent to that user on the same day. The number of users processed is config-controlled to limit the number of users (and emails) handled at a time, thus limiting the performance impact.
    • The above function is called via cron (with a "secret", of course), and can also be invoked via other hooks (e.g. discussion controller after title...)

    No need to connect that to the generalized scheduler you once discussed (that would upgrade this from "simple").

    Why am I not doing it? Overwhelmed right now and you offered!

    Happy Holidays!

  • Okay, I try to write a plugin with following features:

    1. Settings screen with a) the url for the cron, b) a time period for the digest, c) a text area for the mail body (not sure about that)
    2. Profile page to opt in to a digest. I'm open to suggestions: add it below the notifications (if possible) or a dedicated page?
    3. Cron endpoint a) gathers all "new" discussions, all comments, all users since last digest but only for categories accessible for Member roles! All other security considerations add to much complexity and b) sends a mail to the users who opted in and c) writes LastCommentID/LastDiscussionID/LastUserID to UserMeta
    4. There must be a /plugin/digest/unsubscribe link in the mail footer...

    I'll call it simple-digest.

  • First of all thanks for taking this up.

    Not sure gathering in #3 is needed if the original email process can be interrupted to do the accumulation... Haven't researched the hooks... If it can be done I'd assume the permission tests can be bypassed.

  • Oh, seems like I misunderstood that. So you haven't asked for an additional information mailed to anyone interested?

    But instead of getting all the notification mails that Vanilla already sends out one by one you want them to be only send once a day?

    So it would be more like a collector than a newsletter?

  • rbrahmsonrbrahmson ✭✭✭
    edited December 2019

    Exactly. So instead of a barrage of emails (especially if users subscribe to an active category) they would only receive one per day (a nice extension would be once per week, but that's a "nice to have").

    My experience is that the email flood also disincentivise users from category subscriptions.

  • @rbrahmson: @Bleistivt and I developed a WeeklyDigest for a client recently. It’s also taking YAGA reactions in consideration. It’s more meant for user who registered but do not come back regulary. To remind them on relevant topics for them. After a given interval in the plugin settings send-outs are stopped. Let me know if you like to look into its functionalities.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Sure, any volunteering is appreciated

  • @R_J - few more hours 🤗

  • I will not be able to finish it for Christmas, sorry.

  • That's OK, it was all in good humor.

    Enjoy the holiday!

  • phreakphreak MVP
    edited December 2019

    I think everybodies wet dream is a Vanilla updater... with honey and a reindeer. ;)

    For example a 3 step process:

    1. Screen - You want to update to version X, Yes/Cancel
    2. Files loading, a Diff table appears with comparison windows of all files that have changed. Can be a long list. CONTINUE/CANCEL - Files get updated
    3. Database Structure update. PERFORM/CANCEL
    4. “Update Done”

    That’s probably too much to ask for. But that would be a christmas dream.

    Or what about an external VanillaCheck script that checks for you if you have properly uploaded all files and if all server-side requirements (or at least a few) are present. A lot of questions here could probably solved with “What does your VanillaCheck say?”.

    Contao CMS has done a pretty good jobs regarding that in the past and built out a full fledged installer through composer including extensions, database updates, composer-updating and file DIFF.

    Argh, again too much work.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • I'd add Undo to your wishful thinking list which requires copying the files in #2 prior to update and database export as well.

    It's the time of the year to dream;-)

  • phreakphreak MVP
    edited December 2019

    @rbrahmson: Yes! A "Roll-back Update" Button with blinking stars around it when "Somethings gone wrong!". Yep, and the DIFF should be aware of template overrides... should only compare to former core files if there are no overrides. :D Oh god, are we trolling R_J's thread. Damn I am ashamed.

    @R_J: You made so many great plugins. What about upgrading some more relevant for christmas so that the addon repo feels more healthy.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • I update every plugin of mine which is broken - as soon as someone tells me a about it ;-)

    Just name one and I'll work on it

Sign In or Register to comment.