From b655c18adb095c0f06af539bf8fd2f7f9917e070 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:16:41 -0500 Subject: [PATCH] [twitter] Update config file style/name --- twitter/README.md | 18 +++++++++++++----- twitter/config/twitter.config.php | 16 ++++++++++++++++ twitter/config/twitter.ini.php | 16 ---------------- twitter/twitter.php | 13 +++++++------ 4 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 twitter/config/twitter.config.php delete mode 100644 twitter/config/twitter.ini.php diff --git a/twitter/README.md b/twitter/README.md index 357180cc..f1f87541 100644 --- a/twitter/README.md +++ b/twitter/README.md @@ -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 index 00000000..e39de2f9 --- /dev/null +++ b/twitter/config/twitter.config.php @@ -0,0 +1,16 @@ + [ + // 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 index 5359fd6d..00000000 --- a/twitter/config/twitter.ini.php +++ /dev/null @@ -1,16 +0,0 @@ - [ + * '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)