*/
require_once 'mod/item.php';
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Util\Strings;
function ifttt_install()
{
Hook::register('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Hook::register('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_uninstall()
{
Hook::unregister('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Hook::unregister('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 = DI::pConfig()->get(local_user(), 'ifttt', 'key');
if (!$key) {
$key = Strings::getRandomHex(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:') . '