X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ifttt%2Fifttt.php;h=bdb2b6076234c2ab808179dcb1b2b687eb08eec1;hb=9b77bbeafb8df13b363b2dc3e8975006a19761ab;hp=8a457df37aad16708a3b2e1790a2aae1e4a198ee;hpb=27b60e003f92dd9f3aebbeddb34ebb905488ca82;p=friendica-addons.git
diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php
index 8a457df3..bdb2b607 100644
--- a/ifttt/ifttt.php
+++ b/ifttt/ifttt.php
@@ -11,19 +11,21 @@ require_once 'include/items.php';
require_once 'include/text.php';
use Friendica\App;
+use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
function ifttt_install()
{
- register_hook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
- register_hook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
+ Addon::registerHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
+ Addon::registerHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_uninstall()
{
- unregister_hook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
- unregister_hook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
+ Addon::unregisterHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
+ Addon::unregisterHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_module()
@@ -50,35 +52,35 @@ function ifttt_settings(App $a, &$s)
}
$s .= '';
- $s .= '' . t('IFTTT Mirror') . ' ';
+ $s .= '' . L10n::t('IFTTT Mirror') . ' ';
$s .= ' ';
$s .= '
';
$s .= '
';
- $s .= '' . t('IFTTT Mirror') . ' ';
+ $s .= '' . L10n::t('IFTTT Mirror') . ' ';
$s .= ' ';
$s .= '
';
- $s .= '
' . t('Create an account at IFTTT . Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '
';
+ $s .= '
' . L10n::t('Create an account at IFTTT . Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '
';
$s .= '
URL ';
$s .= '
' . $a->get_baseurl() . '/ifttt/' . $a->user['nickname'] . '
';
$s .= '
Method ';
$s .= '
POST
';
$s .= '
Content Type ';
$s .= '
application/x-www-form-urlencoded
';
- $s .= '
' . t('Body for "new status message"') . ' ';
+ $s .= '
' . L10n::t('Body for "new status message"') . ' ';
$s .= '
' . htmlentities('key=' . $key . '&type=status&msg=<<<{{Message}}>>>&date=<<<{{UpdatedAt}}>>>&url=<<<{{PageUrl}}>>>') . '
';
- $s .= '
' . t('Body for "new photo upload"') . ' ';
+ $s .= '
' . L10n::t('Body for "new photo upload"') . ' ';
$s .= '
' . htmlentities('key=' . $key . '&type=photo&link=<<<{{Link}}>>>&image=<<<{{ImageSource}}>>>&msg=<<<{{Caption}}>>>&date=<<<{{CreatedAt}}>>>&url=<<<{{PageUrl}}>>>') . '
';
- $s .= '
' . t('Body for "new link post"') . ' ';
+ $s .= '
' . L10n::t('Body for "new link post"') . ' ';
$s .= '
' . htmlentities('key=' . $key . '&type=link&link=<<<{{Link}}>>>&title=<<<{{Title}}>>>&msg=<<<{{Message}}>>>&description=<<<{{Description}}>>>&date=<<<{{CreatedAt}}>>>&url=<<<{{PageUrl}}>>>') . '
';
$s .= '
';
$s .= '
';
- $s .= '' . t('Generate new key') . ' ';
+ $s .= '' . L10n::t('Generate new key') . ' ';
$s .= ' ';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
}