*/
require_once 'mod/item.php';
require_once 'include/items.php';
require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\Model\Item;
function ifttt_install()
{
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()
{
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()
{
}
function ifttt_content()
{
}
function ifttt_settings(App $a, &$s)
{
if (!local_user()) {
return;
}
$key = PConfig::get(local_user(), 'ifttt', 'key');
if (!$key) {
$key = random_string(20);
PConfig::set(local_user(), 'ifttt', 'key', $key);
}
$s .= '';
$s .= '
' . L10n::t('IFTTT Mirror') . '
';
$s .= '';
$s .= '
';
$s .= '';
$s .= '
' . L10n::t('IFTTT Mirror') . '
';
$s .= '';
$s .= '
';
$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:') . '