Mibew Messenger Community

General => Support => Русский (ru) => Topic started by: progressive on October 24, 2016, 11:38:31 AM

Title: Как включить плагины?
Post by: progressive on October 24, 2016, 11:38:31 AM
Что прописать в config.yml для плагинов:
Mibew:GeoIp
Mibew:GoogleMaps
Mibew:RealBan
Mibew:TitleNotification

Подскажите пожалуйста.
Title: Re: Как включить плагины?
Post by: faf on October 25, 2016, 10:51:29 AM
Вообще, в состав дистрибутива для каждого из официальных плагинов включён файл README.md. Там есть описание того, что можно / нужно записать в конфигурацию плагина (с примером). Написано, правда, по-английски.

Если очень лень, то вот реальный конфиг демо-установки (с вырезанной конфиденциальной информацией, естественно), на которой все указанные Вами плагины включены:

Code: [Select]
plugins:
    "Mibew:Emoji": # Plugin's configurations are described below
        ignore_emoticons: false
    "Mibew:GoogleMaps": # Plugin's configurations are described below
        api_key: "<тут какой-то ужасный ключ API>"
    "Mibew:TitleNotification": # Plugin's configurations are described below
        new_thread: true
        new_message: "both"
    "Mibew:GeoIp": # Plugin's configurations are described below
        database_path: "<тут какой-то страшный путь>/GeoIP/GeoLite2-City.mmdb"
Title: Re: Как включить плагины?
Post by: progressive on October 25, 2016, 01:37:21 PM
хочу еще прописать вот эти плагины:

Code: [Select]
"Wurrd:AuthAPI":
          client_id: TEST_CLIENT_ID
"Mibew:TitleNotification": # Plugin's configurations are described below
        new_thread: false
        new_message: "operator"  
"Mibew:PurgeHistory": # Plugin's configurations are described below
        timeout: 172800



Эта будет так?

Code: [Select]
plugins:
    "Mibew:Emoji": # Plugin's configurations are described below
        ignore_emoticons: false
    "Mibew:GoogleMaps": # Plugin's configurations are described below
        api_key: "AIzaSyDSq6swVj5N4gOR_FmtxnVdq3hoZYoU1D4"
    "Mibew:TitleNotification": # Plugin's configurations are described below
        new_thread: true
        new_message: "both"
    "Mibew:GeoIp": # Plugin's configurations are described below
        database_path: "GeoIp/db/GeoIP.mmdb"
"Wurrd:AuthAPI":
          client_id: TEST_CLIENT_ID
"Mibew:TitleNotification": # Plugin's configurations are described below
        new_thread: false
        new_message: "operator"  
"Mibew:PurgeHistory": # Plugin's configurations are described below
        timeout: 172800
 
Title: Re: Как включить плагины?
Post by: scalior on October 25, 2016, 03:10:13 PM

Code: [Select]
plugins:
    "Mibew:Emoji": # Plugin's configurations are described below
        ignore_emoticons: false
    "Mibew:GoogleMaps": # Plugin's configurations are described below
        api_key: "AIzaSyDSq6swVj5N4gOR_FmtxnVdq3hoZYoU1D4"
    "Mibew:TitleNotification": # Plugin's configurations are described below
        new_thread: true
        new_message: "both"
    "Mibew:GeoIp": # Plugin's configurations are described below
        database_path: "GeoIp/db/GeoIP.mmdb"
    "Wurrd:AuthAPI":
        client_id: TEST_CLIENT_ID
    "Mibew:TitleNotification": # Plugin's configurations are described below
        new_thread: false
        new_message: "operator"  
    "Mibew:PurgeHistory": # Plugin's configurations are described below
        timeout: 172800


Not sure if you noticed this. The YAML file format strongly depends on indentation (number of spaces before each line). Your config snippet was using tabs instead of spaces, so that config file wouldn't work. I have updated your code snippet above to show the changes. Use a plain text editor.
Title: Re: Как включить плагины?
Post by: faf on October 26, 2016, 04:20:51 PM
@progressive, настоятельно рекомендую сменить скомпрометированный Вами ключ для API Google. И больше не размещать (по крайней мере, на этом форуме) подобной конфиденциальной информации. Право слово, Вы бы ещё пароль в открытом доступе опубликовали...  ::)
Title: Re: Как включить плагины?
Post by: progressive on October 27, 2016, 02:37:06 AM
@progressive, настоятельно рекомендую сменить скомпрометированный Вами ключ для API Google. И больше не размещать (по крайней мере, на этом форуме) подобной конфиденциальной информации. Право слово, Вы бы ещё пароль в открытом доступе опубликовали...  ::)
Данный ключ сделать только для моего домена так что не чего страшного!