[3.2][RC] EmailOnTopic - Improved board email notifications

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Post Reply
MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

[3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

Hello,
my so called EmailOnTopic extension is ready for its first release: https://mitjastachowiak.de/?/components ... index.html

How can I create a page in the extension database?
Is there some kind of review process?

Thanks and greetings,
Mitja Stachowiak

----------------------------

Extension Name: emailontopic
Author: Mitja Stachowiak (=msta in the addon-description but not in Forum)
Download and further information: https://mitjastachowiak.de/?/components ... index.html

Description:
Replaces the forum's email subscription system; the email-notifications will then contain the content of the post. Users can explicitly send a email copy of a new post to other users or groups. The idea behind this extention was to replace overflowing mailing lists with phpBB forums, without suspending people, who still just want to read emails, don't use the forum, and are just added using i.e. ACP add user.

It also includes a transport between forum topics and telegram channels.

Extension Version: 3.0.0

Requirements: phpBB 3.2.x

Features:
  • Please also read the complete list on my website.
  • Respects the forum access rules. A mail notification cannot be sent to users, who don't have read access to the corresponding forum.
  • Weather the email's sender is the board mail address or the post author's one depends on the email privacy settings of phpBB.
    • To allow users to individually set the reply-to-address to their own one, even if the default board setting forbids the mail addresses to be visible, the user specific email privacy setting is converted into a three-state-behaviour: yes (email address is always used for reply-to) | default (depends on board-wide setting | no (never make email-address visible for other users)
  • Includes a permission system, which allows admins to specify, how many users of one group can be addressed from users of an other group at once.
    • By default, only three users and no groups can be addressed by registered users.
    • To allow sending mass-emails to specific groups, the admin(s) have to create a permission in the extension's settings.
  • Supports PGP encryption.
  • Can synchronize phpBB topics with telegram chats.
Last edited by MitjaStachowiak on Sun Apr 18, 2021 1:12 pm, edited 4 times in total.
User avatar
warmweer
Jr. Extension Validator
Posts: 10061
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by warmweer »

MitjaStachowiak wrote: Mon Dec 30, 2019 7:52 pm How can I create a page in the extension database?
Is there some kind of review process?
Extension Validation Policy
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by david63 »

Can I suggest that before you even consider submitting your extension to the CDB that first of all you review phpBB Coding Guidelines

Furthermore there are so many errors in your extension that it will never be accepted in its current format (some observations):
  • You cannot use globals in a listener - they must be injected
  • Hard coded language is not allowed
  • .js functions should be in their own files
  • phpBB now used Twig syntax in templates
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

Ok,
  • You cannot use globals in a listener - they must be injected
    Easy to fix.
  • Hard coded language is not allowed
    Spent the last night moving all language expressions to the language files :mrgreen: Did I miss some?
  • .js functions should be in their own files
    Can js-Files then still include phpBB-variables?
  • phpBB now used Twig syntax in templates
    I took all codes from existing extensions and never saw the Twig-syntax anywhere :shock: Is there a transpiler yet?
Generally I would prefer to keep my code formatting, as I cannot understand my own codes anymore if they lose their personalized touch 8-)
Aren't there powerful formatting tools for reviewers, that bring the code to whatever formatting the reviewer likes?
(I really don't know, just working with simple editors that only support highlighting)
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by ViolaF »

david63 wrote: Mon Dec 30, 2019 9:41 pm [*]Hard coded language is not allowed
Where you see hard coded language?
MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

Oh, maybe at line 45 at ucp_prefs_personal_append.html, the "default" :roll:

Well, I fixed the use of global variables.

The extension is currently in use in two closed forums.

I will update an English description in the first post and that's it for to day. This is my first phpBB extension, so it may take some time to get it "clean" ;)
But I'm planning other extensions so this is a good time to go for a review.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by david63 »

MitjaStachowiak wrote: Tue Dec 31, 2019 12:27 am Generally I would prefer to keep my code formatting,
You might prefer to keep the formatting your way but as far as the CDB is concerned it is not an option.
MitjaStachowiak wrote: Tue Dec 31, 2019 12:27 am ever saw the Twig-syntax anywhere :shock: Is there a transpiler yet
viewtopic.php?f=456&t=2429096
MitjaStachowiak wrote: Tue Dec 31, 2019 12:27 am Can js-Files then still include phpBB-variables?
Yes

That list of issues was only a sample - it was by no means exhaustive.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 10822
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by Raul [ThE KuKa] »

ViolaF wrote: Tue Dec 31, 2019 12:47 am Where you see hard coded language?
Some examples...

Code: Select all

<!-- IF S_USER_LOGGED_IN -->{INFORMATION}<!-- ELSE -->ACCESS_DENIED<!-- ENDIF -->
ACCESS_DENIED

Code: Select all

<SPAN style="vertical-align:top;">{L_EMAILONTOPIC_TO}:</SPAN>

: should hange to {L_COLON} or {{ lang('COLON') }}

David has commented the right thing, the author should review the phpBB Coding Guidelines before submit to CDB.
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies | Styles Queue Stats :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate.
:flag_es: phpBB Spain - Online Since 2003 :heart:


MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

The segment

Code: Select all

<!-- IF S_USER_LOGGED_IN -->{INFORMATION}<!-- ELSE -->ACCESS_DENIED<!-- ENDIF -->
is from a file, that acts as a machine interface. It only prints suggestions of existing users or groups for the input field.

Ok, I will then try the Twig-Converter.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by david63 »

MitjaStachowiak wrote: Tue Dec 31, 2019 11:24 am is from a file, that acts as a machine interface
Not sure what that means but in principle there is nothing wrong there - just as long as whatever information it provides is translatable.

It is the ACCESS_DENIED that is the issue.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

One more question:
In my main_listener.php, I trigger the core.notification_manager_add_notifications to skip the standard emails of phpBB:

Code: Select all

public function notification_manager_add_notifications ($event) { // blocks default board notifications from being sent
  if ($event['notification_type_name'] == 'notification.type.topic' || $event['notification_type_name'] == 'notification.type.post')
    $event['notify_users'] = array();
}
These e-mails are then sent from the extension directly. This is not the best way, as it will block other notification systems, like Jabber. I would prefer to re-create a notification, containing all information I need, so the "improved email" can also be send to jabber etc.

I think, if I want formatted HTML emails with custom header, I cannot use the standard notification system of phpBB, right?

But can I do something else in notification_manager_add_notifications to just disable the emails, but not jabber?
NastyBoy
Registered User
Posts: 136
Joined: Wed May 31, 2017 7:03 pm
Location: Germany
Name: Tim
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by NastyBoy »

Cool Idea i will test it the next days.
MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

Ok, I used the COVID19-crisis to do some code structuring. The extension now uses the built-in messenger of phpBB for sending the mails, so SMTP-sending is possible and jabber messages will not longer be blocked.

Those users, who allow external contents in their emails, get a small picture displayed at the end of the mail, which holds information, weather already newer posts in the related topic exist.
MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

MitjaStachowiak
Registered User
Posts: 38
Joined: Mon Dec 30, 2019 7:29 pm
Location: Reinheim, Germany
Contact:

Re: [3.2][RC] EmailOnTopic - Improved board email notifications

Post by MitjaStachowiak »

Version 3 of my extension is out: https://mitjastachowiak.de/components/p ... index.html

Supports PGP encryption.
Can synchronize phpBB topics with telegram chats.
Post Reply

Return to “Extensions in Development”