Hi All
How can we notifications of user for site active by default?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- Ashish@toashishtiwari
Ashish - 0 likes
- Ashish@toashishtiwari
Ashish - 0 likes
- iionly@iionly
iionly - 1 like
- Ashish@toashishtiwari
Ashish - 0 likes
- iionly@iionly
iionly - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- Ashish@toashishtiwari
Ashish - 0 likes
You must log in to post replies.You can add this code in elgg-plugin.php of your custom plugin:
Ok.. thanks, as such i am not a tech so i will try making a custom plugin,
on the other hand, cant i simply add these codes on any existing path of .php file?
Thanks again
Cheers!
Hi Again
if i add your given code into /mod/notifications/start.php will that work?
It will not work when adding this code in start.php. It MUST be added in elgg-plugin.php because only then you can add this kind of definition. There would be other ways to make it work but they are more complicated.
In Elgg 3 a plugin does not need a start.php. So, it's really very simply to create a new plugin that only contains the files elgg-plugin.php and manifest.xml. With the code provided by RvR the file elgg-plugin.php would only contain
and the manifest.xml could be taken from another plugin with only the name and id tags changed, e.g.
assuming the plugin folder name as "notifications_defaults".
The only thing this plugin would do is setting the default values of site and email notifications to "true", i.e. they are enabled for a user who newly creates an account or has never changed his user's notification settings. If you want the defaults to be different you only have to change the corresponding value for on-site and email notifications in elgg-plugin.php from "true" to "false".
Hi
Thanks @iionly and @RvR -- i tried following your inputs, but its xml giving error, please find below screenshot, any help will be really appreciated!
i created folder named "notifications_defaults" in mod
then created elgg-plugin.php with mentioned codes
further manifest.xml and copied your codes and saved
and created start.php replacing with notifications_defaults with help of this tutorial
Firstly, the start.php file is no longer necessary in all cases for Elgg 3. In this case here you don't need it. It should work without the file being present.
Secondly, I see no obvious error with the manifest.xml file. The name and file permissions seem alright. Maybe it's a matter of text encoding within the file. Are you sure that you have only the following within the file
with no empty line in the beginning?
Which text encoding have you saved the file with? If your editor has the option to save in different encodings you should use "UTF without Byte Order Marks". Especially "without Byte Order Marks" (BOMs) is important as there are likely errors if Byte Order Marks are included in the file (these are invisible characters at the beginning of the file).
Use this plugin.
Also, updated My plugin for Elgg 3.
Enjoy!
Wow, Thanks RvR!!!