Remote content try webhook button
This commit is contained in:
parent
0eacad9a95
commit
03e035cb98
@ -25,7 +25,7 @@ if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'init.php')) {
|
||||
if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) {
|
||||
include(PATH_THEMES.$site->theme().DS.'index.php');
|
||||
} 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
|
||||
|
@ -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 BLUDIT_VERSION = "'.BLUDIT_VERSION.'";'.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 DB_DATE_FORMAT = "'.DB_DATE_FORMAT.'";'.PHP_EOL;
|
||||
echo 'var AUTOSAVE_INTERVAL = "'.AUTOSAVE_INTERVAL.'";'.PHP_EOL;
|
||||
|
@ -39,6 +39,19 @@ class pluginRemoteContent extends Plugin {
|
||||
$html .= '<span class="tip">'.$language->get('Complete URL of the zip file').'</span>';
|
||||
$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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user