Page 1 of 3

[CDB] Mass Notification

Posted: Tue Jan 08, 2019 2:37 pm
by Senky
Extension Name: Mass Notification
Author: Senky

Extension Description:
Allows to send mass board notification just like Mass email works.

Screenshots:
Snímka obrazovky 2019-01-08 o 15.33.52.png
Snímka obrazovky 2019-01-08 o 15.36.37.png

Extension Download:
https://github.com/senky/phpbb-ext-massnotification

Installation:
  1. Download the latest release.
  2. Unzip the downloaded release, and change the name of the folder to `massnotification`.
  3. In the `ext` directory of your phpBB board, create a new directory named `senky` (if it does not already exist).
  4. Copy the `massnotification` folder to `/ext/senky/` if done correctly, you'll have the main extension class at
    (your forum root)/ext/senky/massnotification/composer.json
  5. Navigate in the ACP to `Customise -> Manage extensions`
  6. Look for `Mass Notification` under the Disabled Extensions list, and click its `Enable` link.



Note for developers:
This extension can also be used as a base for your extension that sends special one-time notifications. Just make sure this extension is installed and use it to add your one-time notification like this:

Code: Select all

$this->config->increment('senky_massnotification_id', 1);
$this->notifications_manager->add_notifications('senky.massnotification.notification.type.manual', [
	'notification_id'	=> $this->config['senky_massnotification_id'], // you can use your own item_id or get advantage of this incrementer
	'user_ids'		=> $user_ids, // user IDs to send notification to
	'title'			=> $title, // notification title
	'message'		=> $message, // notification reference
	'url'			=> $url, // notification URL (user will be redirected here after clicking on the extension)
	'author_id'		=> $author_id, // notification author (use 0 for notifications without author)
]);

Re: [3.2][RC] Mass Notification

Posted: Tue Jan 08, 2019 3:27 pm
by </Solidjeuh>
Great ext!
Dutch translation: https://github.com/Solidjeuh/Mass-Notification

EDIT:

I tried it, but it breaks long text, instead of going further on a new line.. (send with html)

Image

Code: Select all

Dit is een test notificatie. Speel leuke HTML5 spellen op onze website!
<br><br>
This is a test notification. Play fun HTML5 games on our website!

Re: [3.2][RC] Mass Notification

Posted: Tue Jan 08, 2019 5:07 pm
by pikachuturkey
Turkish (tr) translation of "3.2][RC] Mass Notification" (Github date: 08.01.2019)

phpbb-ext-massnotification/language/tr/acp.php

Code: Select all

<?php
/**
 *
 * Mass Notification. An extension for the phpBB Forum Software package.
 *
 * @copyright (c) 2019, Jakub Senko
 * @license GNU General Public License, version 2 (GPL-2.0)
 *
 */
if (!defined('IN_PHPBB'))
{
	exit;
}
if (empty($lang) || !is_array($lang))
{
	$lang = array();
}
$lang = array_merge($lang, array(
	'MASSNOTIFICATION_DESC'	=> 'Demo Modülü',
	'COMPOSE'				=> 'Toplu bildirim oluştur',
	'ALL_USERS'				=> 'Tüm kullanıcılar',
	'SEND_TO_GROUP'			=> 'Gruba gönder',
	'SEND_TO_USERS'			=> 'Kullanıcılara gönder',
	'SEND_TO_USERS_EXPLAIN'	=> 'Buraya isim girerseniz yukarıda seçili grup yoksayılacaktır. Her yeni satıra bir isim girin.',
	'TITLE'					=> 'Bildirim başlığı',
	'MESSAGE_EXPLAIN'		=> 'HTML kullanabilirsiniz.',
	'URL'					=> 'URL yönlendir',
	'URL_EXPLAIN'			=> 'Kullanıcılar bildirime tıkladığında yönlendirilecekleri URLyi girin.',
	'SEND_NOTIFICATION'		=> 'Bildirim gönder',
	'NO_NOTIFICATION_TITLE'		=> 'Bildirim başlığı belirlemek zorundasınız.',
	'NO_NOTIFICATION_MESSAGE'	=> 'Bildirim mesajı belirlemek zorundasınız.',
	'NOTIFICATION_SEND'	=> 'Bildiriminiz gönderildi.',
));
phpbb-ext-massnotification/language/tr/info_acp_demo.php

Code: Select all

<?php
/**
 *
 * Mass Notification. An extension for the phpBB Forum Software package.
 *
 * @copyright (c) 2019, Jakub Senko
 * @license GNU General Public License, version 2 (GPL-2.0)
 *
 */
if (!defined('IN_PHPBB'))
{
	exit;
}
if (empty($lang) || !is_array($lang))
{
	$lang = array();
}
$lang = array_merge($lang, array(
	'ACP_SENKY_MASSNOTIFICATION_TITLE'	=> 'Toplu bildirim',
));

Re: [3.2][RC] Mass Notification

Posted: Tue Jan 08, 2019 11:52 pm
by eunaumtenhoid
WOW NICE work

Is it possible to add compatibility with bbcode or only HTML itself?

message below the title of ext and "Demo Module" is correct or will it add something?

EDIT
Brazilian Portuguese translation by eunaumtenhoid
https://github.com/phpBBTraducoes/massnotification

Re: [3.2][RC] Mass Notification

Posted: Wed Jan 09, 2019 9:13 am
by Senky
Thank you guys for the translations! I added one new sentence in acp.php in MESSAGE_EXPLAIN:
Keep it short, preferably below 150 characters.
Could you translate this as well?



</Solidjeuh> wrote:
Tue Jan 08, 2019 3:27 pm
I tried it, but it breaks long text, instead of going further on a new line.. (send with html)

Image
Fixed!



eunaumtenhoid wrote:
Tue Jan 08, 2019 11:52 pm
Is it possible to add compatibility with bbcode or only HTML itself?
It is possible but way too complex. HTML offers more options than BBcode. I am aware of the fact that most admins don't know how to use HTML, but the message should be kept short and simple after all.

Re: [3.2][RC] Mass Notification

Posted: Wed Jan 09, 2019 9:29 am
by Exabot

Re: [3.2][RC] Mass Notification

Posted: Wed Jan 09, 2019 1:57 pm
by </Solidjeuh>
Senky wrote:
Wed Jan 09, 2019 9:13 am
Thank you guys for the translations! I added one new sentence in acp.php in MESSAGE_EXPLAIN:
Keep it short, preferably below 150 characters.
Could you translate this as well?
https://github.com/Solidjeuh/Mass-Notif ... 9d028b0ee9

Re: [3.2][RC] Mass Notification

Posted: Wed Jan 09, 2019 7:56 pm
by pikachuturkey
Senky wrote:
Wed Jan 09, 2019 9:13 am
Thank you guys for the translations! I added one new sentence in acp.php in MESSAGE_EXPLAIN:
Keep it short, preferably below 150 characters.
Could you translate this as well?
8-)
Turkish (tr) translate:

Code: Select all

MESSAGE_EXPLAIN'		=> 'Tercihen 150 karakteri geçmeyecek şekilde kısa tutun. HTML kullanabilirsiniz.',

Re: [3.2][RC] Mass Notification

Posted: Thu Jan 10, 2019 5:57 pm
by Raul [ThE KuKa]
"PR" ready for Spanish translations. ;)

Re: [3.2][RC] Mass Notification

Posted: Fri Jan 11, 2019 12:54 pm
by Gubkin

Re: [3.2][RC] Mass Notification

Posted: Fri Jan 11, 2019 5:04 pm
by eunaumtenhoid
Senky wrote:
Wed Jan 09, 2019 9:13 am
Thank you guys for the translations! I added one new sentence in acp.php in MESSAGE_EXPLAIN:
Keep it short, preferably below 150 characters.
Could you translate this as well?
Update pt_br > PR send

will be added version check?

Re: [3.2][RC] Mass Notification

Posted: Fri Jan 11, 2019 6:48 pm
by LavIgor
Nice! :)

Just for the case of future development and new ideas. There's already been an extension for this exact purpose with a bit more features: https://github.com/alg5/adminnotificati ... /dev_3.2.x. viewtopic.php?t=2329541

Re: [3.2][RC] Mass Notification

Posted: Sat Jan 12, 2019 9:31 am
by Senky
eunaumtenhoid wrote:
Fri Jan 11, 2019 5:04 pm
will be added version check?
Only after it's in the CDB.

Re: [3.2][RC] Mass Notification

Posted: Wed Jan 23, 2019 5:09 pm
by NastyBoy
Is there also a way to set up the notifications for the private messages? The Ext is very good thanks for that

Re: [3.2][RC] Mass Notification

Posted: Wed Jan 23, 2019 7:22 pm
by Hippie459MN
I have an issue. Everything works, until I try to send a mass notification then I get this error. Im on phpBB 3.2.5 and php 7.1

Code: Select all

General Error
SQL ERROR [ mysqli ]

Duplicate entry 'senky_massnotification_id' for key 'PRIMARY' [1062]

SQL

INSERT INTO config (config_name, config_value, is_dynamic) VALUES ('senky_massnotification_id', '0', 0)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 997
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/config/db.php
LINE: 161
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/config/db.php
LINE: 122
CALL: phpbb\config\db->set_atomic()

FILE: [ROOT]/phpbb/config/db.php
LINE: 188
CALL: phpbb\config\db->set()

FILE: [ROOT]/ext/senky/massnotification/acp/main_module.php
LINE: 185
CALL: phpbb\config\db->increment()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: senky\massnotification\acp\main_module->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
I have uninstalled and reinstalled it 3 times and still the same error and never get any notifications.


EDIT: It seems to be working now. I was installing it using the Upload Extensions extension and I disabled Mass Notification then just deleted the files from the server and then replaced them manually and seems to be working fine now. Must be something with Upload Extesions that isnt playing nice with phpBB 3.2.5 cause it was when I installed an different extension and got a similar error that I reinstalled them manually and they started working just fine.