Remote content try webhook button

This commit is contained in:
Diego Najar 2019-01-27 12:46:34 +01:00
parent 0eacad9a95
commit 03e035cb98
3 changed files with 17 additions and 1 deletions

View File

@ -25,7 +25,7 @@ if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'init.php')) {
if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) { if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) {
include(PATH_THEMES.$site->theme().DS.'index.php'); include(PATH_THEMES.$site->theme().DS.'index.php');
} else { } else {
$L->p('Please check your theme configuration'); $L->p('Please check your theme configuration in the admin panel. Check for an active theme.');
} }
// Plugins after site loaded // Plugins after site loaded

View File

@ -8,6 +8,9 @@ echo 'var HTML_PATH_UPLOADS = "'.HTML_PATH_UPLOADS.'";'.PHP_EOL;
echo 'var HTML_PATH_UPLOADS_THUMBNAILS = "'.HTML_PATH_UPLOADS_THUMBNAILS.'";'.PHP_EOL; echo 'var HTML_PATH_UPLOADS_THUMBNAILS = "'.HTML_PATH_UPLOADS_THUMBNAILS.'";'.PHP_EOL;
echo 'var BLUDIT_VERSION = "'.BLUDIT_VERSION.'";'.PHP_EOL; echo 'var BLUDIT_VERSION = "'.BLUDIT_VERSION.'";'.PHP_EOL;
echo 'var BLUDIT_BUILD = "'.BLUDIT_BUILD.'";'.PHP_EOL; echo 'var BLUDIT_BUILD = "'.BLUDIT_BUILD.'";'.PHP_EOL;
echo 'var DOMAIN = "'.DOMAIN.'";'.PHP_EOL;
echo 'var DOMAIN_BASE = "'.DOMAIN_BASE.'";'.PHP_EOL;
echo 'var DOMAIN_CONTENT = "'.DOMAIN_CONTENT.'";'.PHP_EOL;
echo 'var DOMAIN_UPLOADS = "'.DOMAIN_UPLOADS.'";'.PHP_EOL; echo 'var DOMAIN_UPLOADS = "'.DOMAIN_UPLOADS.'";'.PHP_EOL;
echo 'var DB_DATE_FORMAT = "'.DB_DATE_FORMAT.'";'.PHP_EOL; echo 'var DB_DATE_FORMAT = "'.DB_DATE_FORMAT.'";'.PHP_EOL;
echo 'var AUTOSAVE_INTERVAL = "'.AUTOSAVE_INTERVAL.'";'.PHP_EOL; echo 'var AUTOSAVE_INTERVAL = "'.AUTOSAVE_INTERVAL.'";'.PHP_EOL;

View File

@ -39,6 +39,19 @@ class pluginRemoteContent extends Plugin {
$html .= '<span class="tip">'.$language->get('Complete URL of the zip file').'</span>'; $html .= '<span class="tip">'.$language->get('Complete URL of the zip file').'</span>';
$html .= '</div>'; $html .= '</div>';
$html .= '<hr>';
$html .= '<div>';
$html .= '<button type="button" id="jstryWebhook" class="btn btn-primary" onclick="tryWebhook()">'.$language->get('Try webhook').'</button>';
$html .= <<<EOF
<script>
function tryWebhook() {
var webhook = document.getElementById("jswebhook").value;
window.open(DOMAIN_BASE+webhook, '_blank');
}
</script>
EOF;
$html .= '</div>';
return $html; return $html;
} }