From b87b840db58167baa1431673116c64a064be169e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:11:53 -0500 Subject: [PATCH 01/12] [geonames] Update config file style/name --- geonames/README.md | 7 ++++--- geonames/config/geonames.config.php | 12 ++++++++++++ geonames/config/geonames.ini.php | 12 ------------ geonames/geonames.php | 4 ++-- 4 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 geonames/config/geonames.config.php delete mode 100644 geonames/config/geonames.ini.php diff --git a/geonames/README.md b/geonames/README.md index ba90dc5d..443ddf3f 100644 --- a/geonames/README.md +++ b/geonames/README.md @@ -7,9 +7,10 @@ Use Geonames service to resolve nearest populated location for given latitude, l ## Installation -Pre-requisite: Register a username at geonames.org and set in config/addon.ini.php +Pre-requisite: Register a username at geonames.org and set in `config/addon.config.php` - [geonames] - username = your_username + 'geonames' => [ + 'username' => 'your_username' + ], Also visit http://geonames.org/manageaccount and enable access to the free web services. \ No newline at end of file diff --git a/geonames/config/geonames.config.php b/geonames/config/geonames.config.php new file mode 100644 index 00000000..6af3634e --- /dev/null +++ b/geonames/config/geonames.config.php @@ -0,0 +1,12 @@ + [ + //username (String) + //The geonames.org API username + 'username' => '', + ], +]; diff --git a/geonames/config/geonames.ini.php b/geonames/config/geonames.ini.php deleted file mode 100644 index 280e7a93..00000000 --- a/geonames/config/geonames.ini.php +++ /dev/null @@ -1,12 +0,0 @@ -loadConfigFile(__DIR__. '/config/geonames.ini.php'); + $a->loadConfigFile(__DIR__. '/config/geonames.config.php'); } function geonames_post_hook($a, &$item) { From b1295c2eaa33fe6dec0e0b52a53dcb107f221745 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:12:24 -0500 Subject: [PATCH 02/12] [gravatar] Update config file style/name --- gravatar/README.md | 18 +++++++++++------- gravatar/config/gravatar.config.php | 28 ++++++++++++++++++++++++++++ gravatar/config/gravatar.ini.php | 28 ---------------------------- gravatar/gravatar.php | 2 +- 4 files changed, 40 insertions(+), 36 deletions(-) create mode 100644 gravatar/config/gravatar.config.php delete mode 100644 gravatar/config/gravatar.ini.php diff --git a/gravatar/README.md b/gravatar/README.md index b8ca8244..02b9bfd2 100644 --- a/gravatar/README.md +++ b/gravatar/README.md @@ -30,15 +30,19 @@ Gravatar lets users self-rate their images to be used at appropriate audiences. See more information at [Gravatar][1]. ## Alternative Configuration -Open the config/local.ini.php file and add "gravatar" to the list of activated addons: +Open the `config/local.config.php` file and add "gravatar" to the list of activated addons: - [system] - addon = ...,gravatar + 'system' => [ + ... + 'addon' => '...,gravatar' + ... + ] -You can add two configuration variables for the addon to the config/addon.ini.php file: +You can add two configuration variables for the addon to the `config/addon.config.php` file: - [gravatar] - default_avatar = identicon - rating = g + 'gravatar' => [ + 'default_avatar' => 'identicon', + 'rating' => 'g', + ], [1]: http://www.gravatar.com/site/implement/images/ "See documentation at Gravatar for more information" diff --git a/gravatar/config/gravatar.config.php b/gravatar/config/gravatar.config.php new file mode 100644 index 00000000..75bab4fc --- /dev/null +++ b/gravatar/config/gravatar.config.php @@ -0,0 +1,28 @@ + [ + // default_avatar (String) + // If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash. + // You can choose between these presets: + // - gravatar : default static Gravatar logo + // - mm : (mystery-man) a static image + // - identicon: a generated geometric pattern based on email hash + // - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash + // - wavatar : faces with different features and backgrounds based on email hash + // - retro : 8-bit arcade-styled pixelated faces based on email hash + 'default_avatar' => 'gravatar', + + // rating (String) + // Gravatar lets users self-rate their images to be used at appropriate audiences. + // Choose which are appropriate for your friendica site: + // - g : suitable for display on all wesites with any audience type + // - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence + // - r : may contain such things as harsh profanity, intense violence, nudity, or hard drug use + // - x : may contain hardcore sexual imagery or extremely disurbing violence + 'rating' => 'g', + ], +]; diff --git a/gravatar/config/gravatar.ini.php b/gravatar/config/gravatar.ini.php deleted file mode 100644 index a07005a3..00000000 --- a/gravatar/config/gravatar.ini.php +++ /dev/null @@ -1,28 +0,0 @@ -loadConfigFile(__DIR__. '/config/gravatar.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/gravatar.config.php'); } /** From dbd93f83510027059d31d1fb7c0fa7b571b47516 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:12:44 -0500 Subject: [PATCH 03/12] [impressum] Update config file style/name --- impressum/README.md | 19 +++++++-------- impressum/config/impressum.config.php | 33 +++++++++++++++++++++++++++ impressum/config/impressum.ini.php | 33 --------------------------- impressum/impressum.php | 2 +- 4 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 impressum/config/impressum.config.php delete mode 100644 impressum/config/impressum.ini.php diff --git a/impressum/README.md b/impressum/README.md index 0d0aa51c..ca78d9a0 100644 --- a/impressum/README.md +++ b/impressum/README.md @@ -16,13 +16,14 @@ Simply fill in the fields in the impressium settings page in the addons area of Manual Configuration -------------------- -If you for any reason you prefer to use a configuration file instead, you can set the following variables in the config/addon.ini.php file +If you for any reason you prefer to use a configuration file instead, you can set the following variables in the `config/addon.config.php` file - [impressum] - owner = this is the Name of the Operator - ownerprofile = this is an optional Friendica account where the above owner name will link to - email = a contact email address (optional) - will be displayed slightly obfuscated as name(at)example(dot)com - postal = should contain a postal address where you can be reached at (optional) - notes = additional informations that should be displayed in the Impressum block - footer_text = Text that will be displayed at the bottom of the pages. + 'impressum' => [ + 'owner' => '', This is the Name of the Operator + 'ownerprofile' => '', This is an optional Friendica account where the above owner name will link to + 'email' => '', A contact email address (optional) + Will be displayed slightly obfuscated as name(at)example(dot)com + 'postal' => '', Should contain a postal address where you can be reached at (optional) + 'notes' => '', Additional informations that should be displayed in the Impressum block + 'footer_text' => '', Text that will be displayed at the bottom of the pages. + ], diff --git a/impressum/config/impressum.config.php b/impressum/config/impressum.config.php new file mode 100644 index 00000000..9fe672fc --- /dev/null +++ b/impressum/config/impressum.config.php @@ -0,0 +1,33 @@ + [ + // owner (String) + // This is the Name of the Operator + 'owner' => '', + + // ownerprofile (String) + // This is an optional Friendica account where the above owner name will link to + 'ownerprofile' => '', + + // email (String) + // A contact email address (optional) + // Will be displayed slightly obfuscated as name(at)example(dot)com + 'email' => '', + + // postal (String) + // Should contain a postal address where you can be reached at (optional) + 'postal' => '', + + // notes (String) + // Additional informations that should be displayed in the Impressum block + 'notes' => '', + + // footer_text (String) + // Text that will be displayed at the bottom of the pages. + 'footer_text' => '', + ], +]; diff --git a/impressum/config/impressum.ini.php b/impressum/config/impressum.ini.php deleted file mode 100644 index 1de4468c..00000000 --- a/impressum/config/impressum.ini.php +++ /dev/null @@ -1,33 +0,0 @@ -loadConfigFile(__DIR__. '/config/impressum.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/impressum.config.php'); } function impressum_show($a,&$b) { From f0fc02e5449ab53c00d973ff0ef626a8e745e519 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:13:45 -0500 Subject: [PATCH 04/12] [ldapauth] Update config file style/name --- ldapauth/README | 38 ---------------------- ldapauth/README.md | 49 ++++++++++++++++++++++++++++ ldapauth/config/ldapauth.config.php | 50 +++++++++++++++++++++++++++++ ldapauth/config/ldapauth.ini.php | 50 ----------------------------- ldapauth/ldapauth.php | 4 +-- 5 files changed, 101 insertions(+), 90 deletions(-) delete mode 100644 ldapauth/README create mode 100644 ldapauth/README.md create mode 100644 ldapauth/config/ldapauth.config.php delete mode 100644 ldapauth/config/ldapauth.ini.php diff --git a/ldapauth/README b/ldapauth/README deleted file mode 100644 index 03e8b0d4..00000000 --- a/ldapauth/README +++ /dev/null @@ -1,38 +0,0 @@ -Authenticate a user against an LDAP directory -Useful for Windows Active Directory and other LDAP-based organisations -to maintain a single password across the organisation. -Optionally authenticates only if a member of a given group in the directory. - -By default, the person must have registered with Friendica using the normal registration -procedures in order to have a Friendica user record, contact, and profile. -However, it's possible with an option to automate the creation of a Friendica basic account. - -Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site -ldap.conf file to the signing cert for your LDAP server. - -The configuration options for this module may be set in the config/addon.ini.php file -e.g.: - - [ldapauth] - // ldap hostname server - required - ldap_server = host.example.com - // dn to search users - required - ldap_searchdn = ou=users,dc=example,dc=com - // attribute to find username - required - ldap_userattr = uid - - // admin dn - optional - only if ldap server dont have anonymous access - ldap_binddn = cn=admin,dc=example,dc=com - // admin password - optional - only if ldap server dont have anonymous access - ldap_bindpw = password - - // for create Friendica account if user exist in ldap - // required an email and a simple (beautiful) nickname on user ldap object - // active account creation - optional - default none - ldap_autocreateaccount = true - // attribute to get email - optional - default : 'mail' - ldap_autocreateaccount_emailattribute = mail - // attribute to get nickname - optional - default : 'givenName' - ldap_autocreateaccount_nameattribute = givenName - -...etc. diff --git a/ldapauth/README.md b/ldapauth/README.md new file mode 100644 index 00000000..f37bb9d5 --- /dev/null +++ b/ldapauth/README.md @@ -0,0 +1,49 @@ +Authenticate a user against an LDAP directory +=== + +Useful for Windows Active Directory and other LDAP-based organisations +to maintain a single password across the organisation. +Optionally authenticates only if a member of a given group in the directory. + +By default, the person must have registered with Friendica using the normal registration +procedures in order to have a Friendica user record, contact, and profile. +However, it's possible with an option to automate the creation of a Friendica basic account. + +Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site +ldap.conf file to the signing cert for your LDAP server. + +The configuration options for this module may be set in the `config/addon.config.php` file +e.g.: + + 'ldapauth' => [ + // ldap hostname server - required + 'ldap_server' => '', + + // admin dn - optional - only if ldap server dont have anonymous access + 'ldap_binddn' => '', + + // admin password - optional - only if ldap server dont have anonymous access + 'ldap_bindpw' => '', + + // dn to search users - required + 'ldap_searchdn' => '', + + // attribute to find username - required + 'ldap_userattr' => '', + + // DN of the group whose member can auth on Friendica - optional + 'ldap_group' => '', + + // To create Friendica account if user exists in ldap + // Requires an email and a simple (beautiful) nickname on user ldap object + // active account creation - optional - default true + 'ldap_autocreateaccount' => true, + + // attribute to get email - optional - default : 'mail' + 'ldap_autocreateaccount_emailattribute' => 'mail', + + // attribute to get nickname - optional - default : 'givenName' + 'ldap_autocreateaccount_nameattribute' => 'givenName', + ], + +...etc. diff --git a/ldapauth/config/ldapauth.config.php b/ldapauth/config/ldapauth.config.php new file mode 100644 index 00000000..e89a2b55 --- /dev/null +++ b/ldapauth/config/ldapauth.config.php @@ -0,0 +1,50 @@ + [ + // ldap_server (String) + // ldap hostname server - required + // Example: ldap_server = host.example.com + 'ldap_server' => '', + + // ldap_binddn (String) + // admin dn - optional - only if ldap server dont have anonymous access + // Example: ldap_binddn = cn=admin,dc=example,dc=com + 'ldap_binddn' => '', + + // ldap_bindpw (String) + // admin password - optional - only if ldap server dont have anonymous access + 'ldap_bindpw' => '', + + // ldap_searchdn (String) + // dn to search users - required + // Example: ldap_searchdn = ou=users,dc=example,dc=com + 'ldap_searchdn' => '', + + // ldap_userattr (String) + // attribute to find username - required + // Example: ldap_userattr = uid + 'ldap_userattr' => '', + + // ldap_group (String) + // DN of the group whose member can auth on Friendica - optional + 'ldap_group' => '', + + // ldap_autocreateaccount (Boolean) + // To create Friendica account if user exists in ldap + // Requires an email and a simple (beautiful) nickname on user ldap object + // active account creation - optional - default true + 'ldap_autocreateaccount' => true, + + // ldap_autocreateaccount_emailattribute (String) + // attribute to get email - optional - default : 'mail' + 'ldap_autocreateaccount_emailattribute' => 'mail', + + // ldap_autocreateaccount_nameattribute (String) + // attribute to get nickname - optional - default : 'givenName' + 'ldap_autocreateaccount_nameattribute' => 'givenName', + ], +]; diff --git a/ldapauth/config/ldapauth.ini.php b/ldapauth/config/ldapauth.ini.php deleted file mode 100644 index d707550b..00000000 --- a/ldapauth/config/ldapauth.ini.php +++ /dev/null @@ -1,50 +0,0 @@ -loadConfigFile(__DIR__. '/config/ldapauth.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/ldapauth.config.php'); } function ldapauth_hook_authenticate($a, &$b) From aa97060491d679133511da1dedd1b609923d85d3 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:14:04 -0500 Subject: [PATCH 05/12] [libravatar] Update config file style/name --- libravatar/README.md | 16 ++++++++++------ libravatar/config/libravatar.config.php | 18 ++++++++++++++++++ libravatar/config/libravatar.ini.php | 18 ------------------ libravatar/libravatar.php | 2 +- 4 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 libravatar/config/libravatar.config.php delete mode 100644 libravatar/config/libravatar.ini.php diff --git a/libravatar/README.md b/libravatar/README.md index 33c3679c..bcc0f824 100644 --- a/libravatar/README.md +++ b/libravatar/README.md @@ -23,14 +23,18 @@ If no avatar was found for an email Libravatar can create some pseudo-random gen See examples at [Libravatar][1]. ## Alternative Configuration -Open the config/local.ini.php file and add "libravatar" to the list of activated addons: +Open the `config/local.config.php` file and add "libravatar" to the list of activated addons: - [system] - addon = ...,libravatar + 'system' => [ + ... + 'addon' => '...,libravatar' + ... + ] -You can add one configuration variables for the addon to the config/addon.ini.php file: +You can add one configuration variables for the addon to the `config/addon.config.php` file: - [libravatar] - default_avatar = identicon + 'libravatar' => [ + 'default_avatar' => 'identicon', + ], [1]: http://wiki.libravatar.org/api/ "See API documentation at Libravatar for more information" diff --git a/libravatar/config/libravatar.config.php b/libravatar/config/libravatar.config.php new file mode 100644 index 00000000..7f4f50f6 --- /dev/null +++ b/libravatar/config/libravatar.config.php @@ -0,0 +1,18 @@ + [ + // default_avatar (String) + // If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash. + // You can choose between these presets: + // - mm : (mystery-man) a static image + // - identicon: a generated geometric pattern based on email hash + // - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash + // - wavatar : faces with different features and backgrounds based on email hash + // - retro : 8-bit arcade-styled pixelated faces based on email hash + 'default_avatar' => 'identicon', + ], +]; diff --git a/libravatar/config/libravatar.ini.php b/libravatar/config/libravatar.ini.php deleted file mode 100644 index e3631204..00000000 --- a/libravatar/config/libravatar.ini.php +++ /dev/null @@ -1,18 +0,0 @@ -loadConfigFile(__DIR__. '/config/libravatar.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/libravatar.config.php'); } /** From 0b8e0fa8c9ec9a76741a2bf0c23980731d55abd4 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:14:18 -0500 Subject: [PATCH 06/12] [geonames] Update README --- mathjax/README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mathjax/README.md b/mathjax/README.md index 19407e86..f5a0388f 100644 --- a/mathjax/README.md +++ b/mathjax/README.md @@ -21,15 +21,19 @@ In case you want to use the CDN you can try the following URL as a quick start http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML In case you don't want or can use the admin panel of Friendica you can activate -the addon by adding _mathjax_ to the list in your config/local.ini.php file +the addon by adding _mathjax_ to the list in your `config/local.config.php` file - [system] - addon = ...,mathjax + 'system' => [ + ... + 'addon' => '...,mathjax' + ... + ] -and then providing the base URL after that in the config/addon.ini.php file +and then providing the base URL after that in the `config/addon.config.php` file - [mathjax] - baseurl = [the URL to your MathJax installation]; + 'mathjax' => [ + 'baseurl' => '[the URL to your MathJax installation]', + ], Usage ===== From 524937a8306d455766df999da1ed0a22ebcd46d6 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:14:54 -0500 Subject: [PATCH 07/12] [openstreetmap] Update config file style/name --- openstreetmap/{README => README.md} | 39 ++++++++++++------- openstreetmap/config/openstreetmap.config.php | 23 +++++++++++ openstreetmap/config/openstreetmap.ini.php | 23 ----------- openstreetmap/openstreetmap.php | 2 +- 4 files changed, 48 insertions(+), 39 deletions(-) rename openstreetmap/{README => README.md} (64%) create mode 100644 openstreetmap/config/openstreetmap.config.php delete mode 100644 openstreetmap/config/openstreetmap.ini.php diff --git a/openstreetmap/README b/openstreetmap/README.md similarity index 64% rename from openstreetmap/README rename to openstreetmap/README.md index 48402e29..d8709a18 100644 --- a/openstreetmap/README +++ b/openstreetmap/README.md @@ -1,10 +1,12 @@ - ____ OpenStreetMap Addon ____ -by Mike Macgirvin - Klaus Weidenbach +OpenStreetMap Addon +=== + + by Mike Macgirvin + Klaus Weidenbach This addon allows you to use OpenStreetMap for displaying locations. -___ Requirements ___ +## Requirements To use this addon you need a tile Server that provides the maps. OpenStreetMap data is free for everyone to use. Their tile servers are not. @@ -14,7 +16,7 @@ You can run your own tile server or choose one from their list of public tile servers: http://wiki.openstreetmap.org/wiki/TMS Support the OpenStreetMap community and share the load. -___ Configuration ___ +## Configuration If you for any reason prefer to use a configuration file instead of the admin panels, please refer to the Alternative Configuration below. @@ -30,21 +32,28 @@ level on the map in the Default Zoom box. 1 will show the whole world and 18 is zoom level available. -___ Alternative Configuration ___ +## Alternative Configuration -Open the config/local.ini.php file and add "openstreetmap" to the list of activated -addons. +Open the `config/local.config.php` file and add "openstreetmap" to the list of activated addons. - [system] - addon = ...,openstreetmap + 'system' => [ + ... + 'addon' => '...,openstreetmap' + ... + ] -You can change two configuration variables for the addon in the config/addon.ini.php file: +You can set configuration variables for the addon in the `config/addon.config.php` file: - [openstreetmap] - tmsserver = https://www.openstreetmap.org - zoom = 18 + 'openstreetmap' => [ + 'tmsserver' => 'https://www.openstreetmap.org', + 'nomserver' => 'https://nominatim.openstreetmap.org/search.php', + 'zoom' => 16, + 'marker' => 0, + ], The *tmsserver* points to the tile server you want to use. Use the full URL, with protocol (http/s) and trailing slash. You can configure the default zoom level on the map with *zoom*. 1 will show the whole world and 18 is the highest -zoom level available. \ No newline at end of file +zoom level available. + +Please see provided `config/openstreetmap.php` file for explanation on the additional configuration keys. \ No newline at end of file diff --git a/openstreetmap/config/openstreetmap.config.php b/openstreetmap/config/openstreetmap.config.php new file mode 100644 index 00000000..e9252ca5 --- /dev/null +++ b/openstreetmap/config/openstreetmap.config.php @@ -0,0 +1,23 @@ + [ + // tmsserver (String) + // This points to the tile server you want to use. Use the full URL, with protocol (http/s) and trailing slash. + 'tmsserver' => 'https://www.openstreetmap.org', + + // nomserver (String) + 'nomserver' => 'https://nominatim.openstreetmap.org/search.php', + + // zoom (Integer) + // The default zoom level on the map. + // 1 will show the whole world and 18 is the highest zoom level available. + 'zoom' => 16, + + // marker (Integer) + 'marker' => 0, + ], +]; diff --git a/openstreetmap/config/openstreetmap.ini.php b/openstreetmap/config/openstreetmap.ini.php deleted file mode 100644 index 986843b4..00000000 --- a/openstreetmap/config/openstreetmap.ini.php +++ /dev/null @@ -1,23 +0,0 @@ -loadConfigFile(__DIR__. '/config/openstreetmap.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/openstreetmap.config.php'); } function openstreetmap_alterheader($a, &$navHtml) From 44d7a0b617acfc6f4dde38d856adafab419701a9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:15:18 -0500 Subject: [PATCH 08/12] [piwik] Update config file style/name --- piwik/README.md | 24 ++++++++++++++---------- piwik/config/piwik.config.php | 29 +++++++++++++++++++++++++++++ piwik/config/piwik.ini.php | 29 ----------------------------- piwik/piwik.php | 6 +++--- 4 files changed, 46 insertions(+), 42 deletions(-) create mode 100644 piwik/config/piwik.config.php delete mode 100644 piwik/config/piwik.ini.php diff --git a/piwik/README.md b/piwik/README.md index 44d906b6..9b35cc4b 100644 --- a/piwik/README.md +++ b/piwik/README.md @@ -20,20 +20,24 @@ Configuration The easiest way to configure this addon is by activating the admin panels of your ~friendica server and then enter the needed details on the config page for the addon. -If you don't want to use the admin panel, you can configure the addon through the config/local.ini.php file. +If you don't want to use the admin panel, you can configure the addon through the `config/local.config.php` file. -Open the config/local.ini.php file and add "piwik" to the list of activated addons. +Open the `config/local.config.php` file and add "piwik" to the list of activated addons. - [system] - addon = ...,piwik + 'system' => [ + ... + 'addon' => '...,piwik' + ... + ] -You can change 4 more configuration variables for the addon in the config/addon.ini.php file: +You can change 4 more configuration variables for the addon in the `config/addon.config.php` file: - [piwik] - baseurl = example.com/piwik/ - sideid = 1 - optout = true - async = false + 'piwik' => [ + 'baseurl' => 'example.com/piwik/', + 'sideid' => 1, + 'optout' => true, + 'async' => false, + ], Configuration fields --------------------- diff --git a/piwik/config/piwik.config.php b/piwik/config/piwik.config.php new file mode 100644 index 00000000..7543097c --- /dev/null +++ b/piwik/config/piwik.config.php @@ -0,0 +1,29 @@ + [ + // baseurl (String) + // This URL points to your Piwik installation. + // Use the absolute path, remember trailing slashes but ignore the protocol (http/s) part of the URL. + // Example: baseurl = example.com/piwik/ + 'baseurl' => '', + + // siteid (Integer) + // Change the *sideid* parameter to whatever ID you want to use for tracking your Friendica installation. + 'sideid' => '', + + // optout (Boolean) + // This defines whether or not a short notice about the utilization of Piwik will be displayed on every + // page of your Friendica site (at the bottom of the page with some spacing to the other content). + // Part of the note is a link that allows the visitor to set an opt-out cookie which will prevent visits + // from that user be tracked by Piwik. + 'optout' => true, + + // async (Boolean) + // This defines whether or not to use asynchronous tracking so pages load (or appear to load) faster. + 'async' => false, + ], +]; diff --git a/piwik/config/piwik.ini.php b/piwik/config/piwik.ini.php deleted file mode 100644 index b66c69c6..00000000 --- a/piwik/config/piwik.ini.php +++ /dev/null @@ -1,29 +0,0 @@ -loadConfigFile(__DIR__. '/config/piwik.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/piwik.config.php'); } function piwik_analytics($a,&$b) { @@ -66,7 +66,7 @@ function piwik_analytics($a,&$b) { $a->page['htmlhead'] .= ''; /* - * Get the configuration variables from the config/addon.ini.php file. + * Get the configuration variables from the config/addon.config.php file. */ $baseurl = Config::get('piwik', 'baseurl'); $siteid = Config::get('piwik', 'siteid'); From c5f5965148bd753c255f7d70fa1382528dcc19e6 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:15:44 -0500 Subject: [PATCH 09/12] [public_server] Update config file style/name --- public_server/README.md | 27 +++++++++-------- public_server/config/public_server.config.php | 30 +++++++++++++++++++ public_server/config/public_server.ini.php | 30 ------------------- public_server/public_server.php | 2 +- 4 files changed, 45 insertions(+), 44 deletions(-) create mode 100644 public_server/config/public_server.config.php delete mode 100644 public_server/config/public_server.ini.php diff --git a/public_server/README.md b/public_server/README.md index 7ba002e8..fecc38ba 100644 --- a/public_server/README.md +++ b/public_server/README.md @@ -6,20 +6,21 @@ Public Server is a Friendica addon which implements automatic account & post exp This is a modified version of the testdrive addon, DO NOT ACTIVATE AT THE SAME TIME AS THE TESTDRIVE ADDON. - [public_server] - ; When an account is created on the site, it is given a hard expiration date of - expiredays = 30 - ; Set the default days for posts to expire here - expireposts = 30 - ; Remove users who have never logged in after nologin days - nologin = 30 - ; Remove users who last logged in over flagusers days ago - flagusers = 146 - ; For users who last logged in over flagposts days ago set post expiry days to flagpostsexpire - flagposts = 90 - flagpostsexpire = 146 + 'public_server' => [ + // When an account is created on the site, it is given a hard expiration date of. 0 to disable. + 'expiredays' => 0, + // Set the default days for posts to expire here. 0 to disable. + 'expireposts' => 0, + // Remove users who have never logged in after nologin days. 0 to disable. + 'nologin' => 0, + // Remove users who last logged in over flagusers days ago. 0 to disable. + 'flagusers' => 0, + // For users who last logged in over flagposts days ago set post expiry days to flagpostsexpire. 0 to disable. + 'flagposts' => 0, + 'flagpostsexpire' => 0, + ], -Set these in your config/addon.ini.php file. By default nothing is defined in case the addon is activated accidentally. +Set these in your `config/addon.config.php` file. By default nothing is defined in case the addon is activated accidentally. They can be ommitted or set to 0 to disable each option. The default values are those used by friendica.eu, change these as desired. diff --git a/public_server/config/public_server.config.php b/public_server/config/public_server.config.php new file mode 100644 index 00000000..47ad4107 --- /dev/null +++ b/public_server/config/public_server.config.php @@ -0,0 +1,30 @@ + [ + // expiredays (Integer) + // When an account is created on the site, it is given a hard expiration date of. 0 to disable. + 'expiredays' => 0, + + // expireposts (Integer) + // Set the default days for posts to expire here. 0 to disable. + 'expireposts' => 0, + + // nologin (Integer) + // Remove users who have never logged in after nologin days. 0 to disable. + 'nologin' => 0, + + // flagusers (Integer) + // Remove users who last logged in over flagusers days ago. 0 to disable. + 'flagusers' => 0, + + // flagposts (Integer) + // flagpostsexpire (Integer) + // For users who last logged in over flagposts days ago set post expiry days to flagpostsexpire. 0 to disable. + 'flagposts' => 0, + 'flagpostsexpire' => 0, + ], +]; diff --git a/public_server/config/public_server.ini.php b/public_server/config/public_server.ini.php deleted file mode 100644 index 79b2ef46..00000000 --- a/public_server/config/public_server.ini.php +++ /dev/null @@ -1,30 +0,0 @@ -loadConfigFile(__DIR__. '/config/public_server.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/public_server.config.php'); } function public_server_register_account($a, $b) From d27ac641fc2aff767064412935263aa5b5d05d0a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:16:04 -0500 Subject: [PATCH 10/12] [pumpio] Update config file style/name --- pumpio/README.md | 11 ++++++++--- pumpio/config/pumpio.config.php | 21 +++++++++++++++++++++ pumpio/config/pumpio.ini.php | 21 --------------------- pumpio/pumpio.php | 2 +- 4 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 pumpio/config/pumpio.config.php delete mode 100644 pumpio/config/pumpio.ini.php diff --git a/pumpio/README.md b/pumpio/README.md index 9fb01055..33137984 100644 --- a/pumpio/README.md +++ b/pumpio/README.md @@ -1,6 +1,11 @@ -To let the connector work properly you should define an application name in config/addon.ini.php: +To let the connector work properly you should define an application name in `config/addon.config.php`: -[pumpio] -application_name = Name of you site + 'pumpio' => [ + 'application_name' => '', + // Displays forwarded posts like "wall-to-wall" posts. + 'wall-to-wall_share' => false, + // Given in minutes + 'poll_interval' => 5, + ], This name appears at pump.io and is important for not mirroring back posts that came from Friendica. diff --git a/pumpio/config/pumpio.config.php b/pumpio/config/pumpio.config.php new file mode 100644 index 00000000..4f3dc460 --- /dev/null +++ b/pumpio/config/pumpio.config.php @@ -0,0 +1,21 @@ + [ + // application_name (String) + // To let the connector work properly you should define an application name. + // This name appears at pump.io and is important for not mirroring back posts that came from Friendica. + 'application_name' => '', + + // wall-to-wall_share (Boolean) + // Displays forwarded posts like "wall-to-wall" posts. + 'wall-to-wall_share' => false, + + // poll_interval (Integer) + // Given in minutes + 'poll_interval' => 5, + ], +]; diff --git a/pumpio/config/pumpio.ini.php b/pumpio/config/pumpio.ini.php deleted file mode 100644 index cd5e732c..00000000 --- a/pumpio/config/pumpio.ini.php +++ /dev/null @@ -1,21 +0,0 @@ -loadConfigFile(__DIR__. '/config/pumpio.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/pumpio.config.php'); } function pumpio_hook_fork(App $a, array &$b) From 336276727f68a7c0cab469452f321dc990b44bad Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:16:20 -0500 Subject: [PATCH 11/12] [testdrive] Update config file style/name --- testdrive/README.md | 7 ++++--- testdrive/config/testdrive.config.php | 12 ++++++++++++ testdrive/config/testdrive.ini.php | 12 ------------ testdrive/testdrive.php | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 testdrive/config/testdrive.config.php delete mode 100644 testdrive/config/testdrive.ini.php diff --git a/testdrive/README.md b/testdrive/README.md index ad9414eb..59512aef 100644 --- a/testdrive/README.md +++ b/testdrive/README.md @@ -6,10 +6,11 @@ Testdrive is a Friendica addon which implements automatic account expiration so When an account is created on the site, it is given a hard expiration date of - [testdrive] - expiredays = 30 + 'testdrive' => [ + 'expiredays' => 30, + ], -Set this in your config/addon.ini.php file to allow a 30 day test drive period. +Set this in your `config/addon.config.php` file to allow a 30 day test drive period. By default no expiration period is defined in case the addon is activated accidentally. There is no opportunity to extend an expired account using this addon. diff --git a/testdrive/config/testdrive.config.php b/testdrive/config/testdrive.config.php new file mode 100644 index 00000000..c10acf82 --- /dev/null +++ b/testdrive/config/testdrive.config.php @@ -0,0 +1,12 @@ + [ + // expiredays (Integer) + // When an account is created on the site, it is given a hard expiration date of this many days. 0 to disable. + 'expiredays' => 0, + ], +]; diff --git a/testdrive/config/testdrive.ini.php b/testdrive/config/testdrive.ini.php deleted file mode 100644 index 8d3f8632..00000000 --- a/testdrive/config/testdrive.ini.php +++ /dev/null @@ -1,12 +0,0 @@ -loadConfigFile(__DIR__. '/config/testdrive.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/testdrive.config.php'); } function testdrive_globaldir_update($a,&$b) { From b655c18adb095c0f06af539bf8fd2f7f9917e070 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 02:16:41 -0500 Subject: [PATCH 12/12] [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)