Instructions to create the swarm webhook with IFTTT';
$secret = $this->getConf('hook_secret');
if (empty($secret)) {
$exampleSecret = md5(time());
$settingsID = 'plugin____swarmwebhook____plugin_settings_name';
$configHRef = DOKU_REL . DOKU_SCRIPT . '?do=admin&page=config#' . $settingsID;
$configLink = '' . $this->getLang('configuration') . '';
$secretNeededMsg = sprintf(
$this->getLang('secret needed'),
$configLink,
'' . $exampleSecret . '
'
);
echo '
' . $secretNeededMsg . '
'; return; } echo $this->iftttInstructionsHTML(); echo $this->zapierInstructionsHTML(); } /** * Get the instructions for IFTTT * * @return string */ protected function iftttInstructionsHTML() { $secret = $this->getConf('hook_secret'); $html = $this->locale_xhtml('ifttt_instructions'); $html = str_replace('DOKU_URL', DOKU_URL, $html); $html = str_replace('$secret', hsc($secret), $html); return $html; } /** * Get the instructions for Zapier * * @return string */ protected function zapierInstructionsHTML() { $html = $this->locale_xhtml('zapier_instructions'); $html = str_replace('DOKU_URL', DOKU_URL, $html); return $html; } }