Browse Source

[geonames] Update config file style/name

pull/778/head
Hypolite Petovan 3 years ago
parent
commit
b87b840db5
4 changed files with 18 additions and 17 deletions
  1. +4
    -3
      geonames/README.md
  2. +12
    -0
      geonames/config/geonames.config.php
  3. +0
    -12
      geonames/config/geonames.ini.php
  4. +2
    -2
      geonames/geonames.php

+ 4
- 3
geonames/README.md View File

@ -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.

+ 12
- 0
geonames/config/geonames.config.php View File

@ -0,0 +1,12 @@
<?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 [
'geonames' => [
//username (String)
//The geonames.org API username
'username' => '',
],
];

+ 0
- 12
geonames/config/geonames.ini.php View File

@ -1,12 +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
[geonames]
; username (String)
; The geonames.org API username
username =
INI;
//Keep this line

+ 2
- 2
geonames/geonames.php View File

@ -7,7 +7,7 @@
*
*
* Pre-requisite: Register a username at geonames.org
* and set in config/addon.ini.php
* and set in config/addon.config.php
*
* [geonames]
* username = your_username
@ -78,7 +78,7 @@ function geonames_uninstall() {
function geonames_load_config(\Friendica\App $a)
{
$a->loadConfigFile(__DIR__. '/config/geonames.ini.php');
$a->loadConfigFile(__DIR__. '/config/geonames.config.php');
}
function geonames_post_hook($a, &$item) {


Loading…
Cancel
Save