Bludit Discovery
This commit is contained in:
parent
913553e979
commit
ffc238a98a
11
bl-plugins/discovery/languages/de_CH.json
Normal file
11
bl-plugins/discovery/languages/de_CH.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Schnittstelle, für den Datenaustausch mit Bludit über das HTTP-Protokoll. Informationen zur Verwendung des Plugins unter <a href=\"https://docs.bludit.com/en/api/introduction\">API Introduction</a>."
|
||||
},
|
||||
"api-token": "API-Token",
|
||||
"amount-of-pages": "Anzahl Seiten",
|
||||
"this-is-the-maximum-of-pages-to-return-when-you-call-to": "Maximum der Seiten bei einem Aufruf /api/pages.",
|
||||
"this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "Der Token kann für Leserechte verwendet werden. Er wird bei bei einer Neuinstallation des Plugins erneuert."
|
||||
}
|
11
bl-plugins/discovery/languages/de_DE.json
Normal file
11
bl-plugins/discovery/languages/de_DE.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Schnittstelle, für den Datenaustausch mit Bludit über das HTTP-Protokoll. Informationen zur Verwendung des Plugins unter <a href=\"https://docs.bludit.com/en/api/introduction\">API Introduction</a>."
|
||||
},
|
||||
"api-token": "API-Token",
|
||||
"amount-of-pages": "Anzahl Seiten",
|
||||
"this-is-the-maximum-of-pages-to-return-when-you-call-to": "Maximum der Seiten bei einem Aufruf /api/pages.",
|
||||
"this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "Der Token kann für Leserechte verwendet werden. Er wird bei bei einer Neuinstallation des Plugins erneuert."
|
||||
}
|
7
bl-plugins/discovery/languages/en.json
Normal file
7
bl-plugins/discovery/languages/en.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Discovery",
|
||||
"description": ""
|
||||
}
|
||||
}
|
11
bl-plugins/discovery/languages/es.json
Normal file
11
bl-plugins/discovery/languages/es.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Interfaz para interactuar con Bludit mediante el protocolo HTTP. <br>Leer más sobre este plugin en <a href=\"https://docs.bludit.com/en/api/introduction\">API introducción</a>."
|
||||
},
|
||||
"api-token": "API Token",
|
||||
"amount-of-pages": "Cantidad de paginas",
|
||||
"this-is-the-maximum-of-pages-to-return-when-you-call-to": "Este es el máximo de páginas a devolver cuando llame a /api/pages.",
|
||||
"this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "Este token es para sólo lectura y se regenera cada vez que se instala el plugin."
|
||||
}
|
11
bl-plugins/discovery/languages/fr_FR.json
Normal file
11
bl-plugins/discovery/languages/fr_FR.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Interface pour interagir avec Bludit en utilisant le protocole HTTP. <br>En savoir plus sur ce plugin, en lisant <a href=\"https://docs.bludit.com/en/api/introduction\">l’introduction sur l’API</a>."
|
||||
},
|
||||
"api-token": "Jeton de l’API",
|
||||
"amount-of-pages": "Nombre de pages",
|
||||
"this-is-the-maximum-of-pages-to-return-when-you-call-to": "C’est le nombre maximal de pages à renvoyer lorsque vous appelez l’api par pages.",
|
||||
"this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "Ce jeton est en lecture seule et est régénéré à chaque fois que vous installez le plugin."
|
||||
}
|
11
bl-plugins/discovery/languages/ru_RU.json
Normal file
11
bl-plugins/discovery/languages/ru_RU.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Интерфейс для взаимодействия с Bludit по HTTP-протоколу. <br> Узнать больше про этот плагин <a href=\"https://docs.bludit.com/en/api/introduction\">API Introduction</a>."
|
||||
},
|
||||
"api-token": "API Tтокен",
|
||||
"amount-of-pages": "Количество страниц",
|
||||
"this-is-the-maximum-of-pages-to-return-when-you-call-to": "Максимальное количество возвращаемых страниц при обращении к /api/pages",
|
||||
"this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "Данные токен используется только для чтения, он обновляется при каждой переустановке плагина"
|
||||
}
|
10
bl-plugins/discovery/metadata.json
Normal file
10
bl-plugins/discovery/metadata.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "2.0",
|
||||
"releaseDate": "2017-06-15",
|
||||
"license": "MIT",
|
||||
"compatible": "2.0",
|
||||
"notes": ""
|
||||
}
|
35
bl-plugins/discovery/plugin.php
Normal file
35
bl-plugins/discovery/plugin.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
class pluginDiscovery extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->formButtons = false;
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $Language;
|
||||
|
||||
if (!pluginEnabled('API')) {
|
||||
$html = '<div style="width: 50%" class="uk-alert">Enable the plugin API to use this plugin.</div>';
|
||||
} else {
|
||||
$this->pingBludit();
|
||||
$html = '<div style="width: 50%" class="uk-alert uk-alert-success">Your Site is in sync with Bludit Discovery.</div>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
private function pingBludit()
|
||||
{
|
||||
global $plugins;
|
||||
|
||||
$API = $plugins['all']['pluginAPI'];
|
||||
$APIToken = $API->getValue('token');
|
||||
|
||||
$url = 'https://ping.bludit.com?site='.urlencode(DOMAIN_BASE).'&token='.urlencode($APIToken);
|
||||
TCP::http($url, $method='GET', $verifySSL=true, $timeOut=4, $followRedirections=false, $binary=false, $headers=false);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user