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

index b8ca824..02b9bfd 100644 (file)
@@ -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 (file)
index 0000000..75bab4f
--- /dev/null
@@ -0,0 +1,28 @@
+<?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 [
+       'gravatar' => [
+               // 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 (file)
index a07005a..0000000
+++ /dev/null
@@ -1,28 +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
-
-[gravatar]
-; 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
-
-INI;
-//Keep this line
\ No newline at end of file
index 49eec4a..6810555 100644 (file)
@@ -39,7 +39,7 @@ function gravatar_uninstall() {
 
 function gravatar_load_config(App $a)
 {
-       $a->loadConfigFile(__DIR__. '/config/gravatar.ini.php');
+       $a->loadConfigFile(__DIR__ . '/config/gravatar.config.php');
 }
 
 /**