Browse Source

[gs-v2-support] Adopt GNU social v2 structure and update the readme

gs-v2-support
Diogo Cordeiro 3 months ago
parent
commit
767a976e8b
8 changed files with 19 additions and 9 deletions
  1. +18
    -8
      README.md
  2. +1
    -1
      includes/BrowserNotificationsPlugin.php
  3. +0
    -0
      includes/actions/browsernotificationssettings.php
  4. +0
    -0
      includes/classes/BrowserNotificationSettings.php
  5. +0
    -0
      includes/forms/browsernotificationssettings.php
  6. +0
    -0
      public/.jscsrc
  7. +0
    -0
      public/.jshintrc
  8. +0
    -0
      public/js/browser-notifications.js

+ 18
- 8
README.md View File

@@ -2,23 +2,33 @@ GNU social Browser Notifications
===========================

Note
---------
----

This plugin depends on "Realtime" updates.
This plugin depends on "Realtime" updates.
You can enable realtime updates by installing/configuring either:

* [Meteor plugin](https://git.gnu.io/gnu/gnu-social/tree/nightly/plugins/Meteor), or the
* [Websockets plugin](https://code.chromic.org/chimo/gs-wsRealtime).


Instructions
---------
Install Instructions
--------------------

1st, in your computer:

git clone https://github.com/chimo/gs-browserNotifications.git BrowserNotifications

Compact the resulting directory with:

tar -czvf BrowserNotifications.tar.gz BrowserNotifications

1. Navigate to your /local/plugins directory (create it if it doesn't exist)
2. `git clone https://github.com/chimo/gs-browserNotifications.git BrowserNotifications`
3. Tell /config.php to use it with: `addPlugin('BrowserNotifications');`
3rd, in your admin panel:
- go to the plugins tab and click browse under Install Plugin.
- select the tar ball you’ve created
- click upload
- enable it in the plugins list below

Screenshot
---------

![Notification screenshot](https://static.chromic.org/repos/gs-browserNotifications/gs-browserNotification.png)
![Notification screenshot](https://static.chromic.org/repos/gs-browserNotifications/gs-browserNotification.png)

BrowserNotificationsPlugin.php → includes/BrowserNotificationsPlugin.php View File

@@ -9,7 +9,7 @@ class BrowserNotificationsPlugin extends Plugin
public function onEndAccountSettingsNav(Action $action): bool
{
$action->elementStart('li');
$action->element('a', array('href' => common_local_url('browsernotificationssettings')), 'Browser Notifications');
$action->element('a', ['href' => common_local_url('browsernotificationssettings')], 'Browser Notifications');
$action->elementEnd('li');
return true;
}

actions/browsernotificationssettings.php → includes/actions/browsernotificationssettings.php View File


classes/BrowserNotificationSettings.php → includes/classes/BrowserNotificationSettings.php View File


forms/browsernotificationssettings.php → includes/forms/browsernotificationssettings.php View File


.jscsrc → public/.jscsrc View File


.jshintrc → public/.jshintrc View File


js/browser-notifications.js → public/js/browser-notifications.js View File


Loading…
Cancel
Save