[twitter] Update config file style/name
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 25 Nov 2018 07:16:41 +0000 (02:16 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 25 Nov 2018 07:16:41 +0000 (02:16 -0500)
twitter/README.md
twitter/config/twitter.config.php [new file with mode: 0644]
twitter/config/twitter.ini.php [deleted file]
twitter/twitter.php

index 357180c..f1f8754 100644 (file)
@@ -16,13 +16,21 @@ After the registration please enter the values for "Consumer Key" and "Consumer
 
 ## Alternative configuration
 
-Add your key pair to your global config/addon.ini.php.
+Open the `config/local.config.php` file and add "twitter" to the list of activated addons:
 
-    [twitter]
-    consumerkey = your consumer_key here
-    consumersecret = your consumer_secret here
+    'system' => [
+        ...
+        'addon' => '...,twitter'
+        ...
+    ]
+
+Add your key pair to your global `config/addon.config.php`.
+
+       'twitter' => [
+               'consumerkey' => 'your consumer_key here',
+               'consumersecret' => 'your consumer_secret here',
+       ],
 
-To activate the addon itself add it to the [system] addon setting.
 After this, users can configure their Twitter account settings from "Settings -> Addon Settings".
 
 ## License
diff --git a/twitter/config/twitter.config.php b/twitter/config/twitter.config.php
new file mode 100644 (file)
index 0000000..e39de2f
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+
+// Warning: Don't change this file! It only holds the default config values for this addon.
+// Instead overwrite these config values in config/addon.config.php in your Friendica directory
+
+return [
+       'twitter' => [
+               // consumerkey (String)
+               // OAuth Consumer Key provided by Twitter on registering an app at https://twitter.com/apps
+               'consumerkey' => '',
+
+               // consumersecret (String)
+               // OAuth Consumer Secret provided by Twitter on registering an app at https://twitter.com/apps
+               'consumersecret' => '',
+       ],
+];
diff --git a/twitter/config/twitter.ini.php b/twitter/config/twitter.ini.php
deleted file mode 100644 (file)
index 5359fd6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php return <<<INI
-
-; Warning: Don't change this file! It only holds the default config values for this addon.
-; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
-
-[twitter]
-; consumerkey (String)
-; OAuth Consumer Key provided by Twitter on registering an app at https://twitter.com/apps
-consumerkey =
-
-; consumersecret (String)
-; OAuth Consumer Secret provided by Twitter on registering an app at https://twitter.com/apps
-consumersecret =
-
-INI;
-//Keep this line
\ No newline at end of file
index 73114a0..2dbc1a2 100644 (file)
  *     we do not need "Twitter as login". When you've registered the app you get the
  *     OAuth Consumer key and secret pair for your application/site.
  *
- *     Add this key pair to your global config/addon.ini.php or use the admin panel.
+ *     Add this key pair to your global config/addon.config.php or use the admin panel.
  *
- *     [twitter]
- *     consumerkey = your consumer_key here
- *     consumersecret = your consumer_secret here
+ *             'twitter' => [
+ *                 'consumerkey' => '',
+ *             'consumersecret' => '',
+ *      ],
  *
- *     To activate the addon itself add it to the [system] addon
+ *     To activate the addon itself add it to the system.addon
  *     setting. After this, your user can configure their Twitter account settings
  *     from "Settings -> Addon Settings".
  *
@@ -141,7 +142,7 @@ function twitter_uninstall()
 
 function twitter_load_config(App $a)
 {
-       $a->loadConfigFile(__DIR__ . '/config/twitter.ini.php');
+       $a->loadConfigFile(__DIR__ . '/config/twitter.config.php');
 }
 
 function twitter_check_item_notification(App $a, array &$notification_data)