Announcement center discussion

An announcement center for Nextcloud

:gift: Download 2.0.1

Full changelog

2.0.1

:information_source:️ Server: Nextcloud 10 — :calendar: Nov 24th, 2016

:bookmark_tabs: Changelog

  • Since 2.0.0

:gift: Download 3.0.0

Full changelog

3.0.0

:information_source:️ Server: Nextcloud 11 — :calendar: Nov 24th, 2016

:bookmark_tabs: Changelog

Screenshot

1 Like

When trying to install RC1 my webpage shows error 500 and when running the occ command I get:

PHP Fatal error: Class 'OCA\AnnouncementCenter\AppInfo\Application' not found in /var/www/nextcloud/apps/announcementcenter/appinfo/app.php on line 24

Should I copy the files over the existing ones, or have it as a clean folder. If so the clean folder gives me the above error.

I just downloaded Nextcloud 10 RC1 and the zip from above, installed the RC and enabled the app. Works just fine.
Are you sure you unzipped the complete zip-package and uploaded all files (especially lib/ )?

Yes I used the following steps:

  1. Unzip zip-file in /root
  2. Move /var/www/nextcloud/apps/announcementcenter to announcementcenter.bak
  3. Move /root/announcementcenter to /var/www/nextcloud/apps
  4. Go to web-page, receive error 500
  5. occ give previous error

But now you mention NC 10, I am still on 9.0.53, guess 2.0.0 is NC 10 and up?

See first line below the version number :wink:

1 Like

Oh dear, that doesn’t look good on me :slight_smile: I was so eager to test it out that I missed that bit. Sorry about this. Will start upgrading to NC 10 RC1, and then try the new AnnouncementCenter.

1 Like

So, upgrade went smoothy:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Done
27/27 [============================] 100%
Checked database schema update
Checking updates of apps
Checked database schema update for apps
Updating database schema
Updated database
Updating …
Add read permissions for existing announcements
Done
1/1 [============================] 100%
Updated to 2.0.0-RC1
Drop old database tables
Done
31/31 [============================] 100%
Remove old (< 9.0) calendar/contact shares
Done
4/4 [============================] 100%
Fix permissions so avatars can be stored again
Done
2/2 [============================] 100%
Repair unmerged shares
Done
5/5 [============================] 100%
Starting code integrity check…
Finished code integrity check
Update successful
Turned off maintenance mode
Reset log level

Edit: had a cron issue. Now it is fine.

Made few tests, and it looks like non-admin cannot access the webpage apps/announcementcenter/ to read the accouncement, from the menu or from the notification popup.

more features:

  • add an option so the author should also receive the notification,
  • broadcast the notification to the windows/android/ios client

If you tell me the use case for this?

Desktop client is already done in client v2.2, for mobile it’s planned Implement notifications API with mobile clients

Fix for this is coming soon

Fix is in https://github.com/nextcloud/announcementcenter/pull/22

Feel free to test and report back.

Cool stuff! :slight_smile:
Are there E-Mails sent to the users for a new announcement?
Or is it only visible via the Nextcloud interface?

1 Like

Well the app itself does not send emails. You can get emails for the activities from the activity app for now.
But my long term goal is to replace the need of emails with notifications being available via all the sync clients. When your phone/laptop already tells you, there is no need to have an email.

1 Like

Well, to be sure that it works :blush:

I’ll patch later today and do some more testing

I have some people who would only use the web-client on irregular basis. For those it would be helpful if an email could be sent out.

Not sure how this could be managed, maybe an extra option in the user profile where they can opt-in for email announcements.

I don’t think I want to support a third channel of notifying a user, sorry. As said the sync clients also get the notifications. When people don’t use the UI nor a Sync client, …

That is OK, I can understand your point of view. Just trying to relay some different cases, which might not come so often, or is not really applicable.

@nickvergessen sorry sir, but I patched script.js and templates/main.php and nothing changed.

But I took the liberty to move lib/AppInfo/Application.php into appinfo/application.php and now it is working

Edit: well, almost … the notification icon is not going away. but this way a non-admin can read/comment and create new announcement if the user is in a group added to the correct list.

Press the little “X” on the notification? Maybe we should throw the notification away, when the announcement was read.

looks like I don’t have notifications icons anymore now :smile: and lot of warning in log. I’ll reset the database later tonight and do more test from scratch.

Might be the fact that I moved the container into appinfo/

Alright…

I disable and remove your apps, dropped your 2 tables in the database and truncate the oc_notifications. Reinstalled your .zip and I needed to apply your last patch (script.js+main.php). I also needed to move the Container from lib/ to appinfo/.

Everything is almost working now, despite few lines in the logs. Something funny:

If a user is in a group that can create an announcement, he won’t have the notification icon. If I remove that group from the list, the user from that group will see the notification icon, for the announcement made before. I don’t know if it is clear, so:

- User A is in group Admin.
- User B is in group Moderator.
- User A add group Moderator to the AnnouncementCenter list.
- User A create a Announcement.
- User B can read the Annoucement, but won't have the notification icon.
- User A remove group Moderator from the AnnouncementCenter list.
- User B can now see the notification icon.

I think that if User B (while the Moderator group is in the list) create an Announcement, User A do not have the notification icon.