Compare commits

..

No commits in common. "f2fce78e407750b8ee42645a8f7a5482673b7727" and "35b2aa65599ae6a1011f44927f8c1c81f138c43a" have entirely different histories.

24 changed files with 103 additions and 38 deletions

View file

@ -219,8 +219,7 @@ body.login {
PLUGINS
*/
.plugin-form label:not(:first-child),
.plugin-form > div:not(:first-child) > label {
.plugin-form label {
display: block;
margin-top: 1rem !important;
}
@ -360,4 +359,4 @@ img.profilePicture {
.switch-icon-publish {
color: #1cb11c;
}
}

View file

@ -27,23 +27,14 @@
<?php endif; ?>
</div>
<?php if ($plugin->description()): ?>
<p class="alert alert-primary">
<?php echo $plugin->description(); ?>
</p>
<?php endif; ?>
<?php
<div class="card">
<div class="card-body">
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
?>
<div class="card">
<div class="card-body plugin-form">
<?php
// Print the plugin form
echo $plugin->form();

View file

@ -200,7 +200,7 @@ function table($type) {
<button class="nav-link" id="sticky-tab" data-bs-toggle="tab" data-bs-target="#sticky" role="tab"><?php $L->p('Sticky') ?></button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="scheduled-tab" data-bs-toggle="tab" data-bs-target="#scheduled" role="tab"><?php $L->p('Scheduled') ?> <?php if (count($scheduled)>0) { echo '<span class="badge bg-primary">'.count($scheduled).'</span>'; } ?></button>
<button class="nav-link" id="scheduled-tab" data-bs-toggle="tab" data-bs-target="#scheduled" role="tab"><?php $L->p('Scheduled') ?> <?php if (count($scheduled)>0) { echo '<span class="badge badge-danger">'.count($scheduled).'</span>'; } ?></button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="draft-tab" data-bs-toggle="tab" data-bs-target="#draft" role="tab"><?php $L->p('Draft') ?></button>

View file

@ -17,7 +17,7 @@ echo "</div></div>";
?>
<p class="alert alert-primary"><?php echo $L->g("Activate or deactivate here plugins that'll be shown in the sidebar") ?></p>
<p class="alert alert-info"><?php echo $L->g("Activate or deactivate here plugins that'll be shown in the sidebar") ?></p>
<?php

View file

@ -20,7 +20,7 @@ foreach ($themes as $theme) {
echo '
<tr class="card-tablebody">
<td class="align-middle pt-3 pb-3">
<div>'.$theme['name'].($theme['dirname']==$site->theme()?'<span class="badge bg-primary ms-2">'.$L->g('Active').'</span>':'').'</div>
<div>'.$theme['name'].($theme['dirname']==$site->theme()?'<span class="badge badge-primary ms-2">'.$L->g('Active').'</span>':'').'</div>
<div class="mt-1">
';

View file

@ -15,7 +15,11 @@ class pluginAbout extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -17,7 +17,11 @@ class pluginCategories extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -15,8 +15,10 @@ class pluginCustomFieldsParser extends Plugin {
global $L;
global $site;
$html = '';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$jsondb = $this->getValue('jsondb', false);
$database = json_decode($jsondb, true);

View file

@ -17,7 +17,11 @@ class pluginDisqus extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('disqus-shortname') . '</label>';
$html .= '<input name="shortname" id="jsshortname" type="text" dir="auto" value="' . $this->getValue('shortname') . '">';
$html .= '<span class="tip">' . $L->get('Get the shortname from the Disqus general settings') . '</span>';

View file

@ -28,8 +28,13 @@ class pluginHitCounter extends Plugin
return $html;
}
// Show the description of the plugin in the settings
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
// Label of the plugin to show in the sidebar
$html = '<div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -18,7 +18,11 @@ class pluginHTMLCode extends Plugin {
{
global $L;
$html = '<h2>'.$L->g('Website').'</h2>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<h2>'.$L->g('Website').'</h2>';
$html .= '<div>';
$html .= '<label>Head</label>';

View file

@ -65,7 +65,11 @@ class pluginLinks extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input name="label" class="form-control" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -15,7 +15,11 @@ class pluginMaintenanceMode extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Enable maintenance mode') . '</label>';
$html .= '<select name="enable">';
$html .= '<option value="true" ' . ($this->getValue('enable') === true ? 'selected' : '') . '>Enabled</option>';

View file

@ -18,7 +18,11 @@ class pluginNavigation extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -16,7 +16,11 @@ class pluginOpenGraph extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Default image') . '</label>';
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" dir="auto" value="' . $this->getValue('defaultImage') . '" placeholder="https://">';
$html .= '<span class="tip">' . $L->g('set-a-default-image-for-content') . '</span>';

View file

@ -24,7 +24,11 @@ class pluginRemoteContent extends Plugin
return '<div class="alert alert-success">' . $language->get('the-extension-zip-is-not-installed') . '</div>';
}
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $language->get('Webhook') . '</label>';
$html .= '<input id="jswebhook" name="webhook" type="text" dir="auto" value="' . $this->getValue('webhook') . '">';
$html .= '<span class="tip">' . DOMAIN_BASE . $this->getValue('webhook') . '</span>';

View file

@ -11,7 +11,11 @@ class pluginRobots extends Plugin {
public function form()
{
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.DOMAIN.'/robots.txt</label>';
$html .= '<textarea name="robotstxt" id="jsrobotstxt">'.$this->getValue('robotstxt').'</textarea>';
$html .= '</div>';

View file

@ -16,7 +16,11 @@ class pluginRSS extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('RSS URL') . '</label>';
$html .= '<a href="' . Theme::rssUrl() . '">' . Theme::rssUrl() . '</a>';
$html .= '</div>';

View file

@ -21,7 +21,11 @@ class pluginSearch extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -15,7 +15,11 @@ class pluginSitemap extends Plugin {
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$L->get('Sitemap URL').'</label>';
$html .= '<a href="'.Theme::sitemapUrl().'">'.Theme::sitemapUrl().'</a>';
$html .= '</div>';

View file

@ -17,7 +17,11 @@ class pluginStaticPages extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -14,7 +14,11 @@ class pluginTags extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';

View file

@ -22,7 +22,11 @@ class pluginTinymce extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('toolbar-top') . '</label>';
$html .= '<input name="toolbar1" id="jstoolbar1" type="text" dir="auto" value="' . $this->getValue('toolbar1') . '">';
$html .= '</div>';

View file

@ -15,7 +15,11 @@ class pluginTwitterCards extends Plugin
{
global $L;
$html = '<div>';
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>' . $L->get('Default image') . '</label>';
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" dir="auto" value="' . $this->getValue('defaultImage') . '" placeholder="https://">';
$html .= '</div>';