-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
15,260 additions
and
601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
Changelog | ||
========= | ||
|
||
Version 2.1.0 (2020-03-30) | ||
-------------------------- | ||
|
||
* Suppression de la dépendance a jQuery | ||
* Passage a la version 5.52.0 de CodeMirror | ||
* Changement de système de cryptage compatible PHP 7.2 | ||
* Mise a jour support | ||
* Correction procédure désinstallation | ||
* Corrections divers | ||
|
||
Version 2.0.1 (2016-03-05) | ||
-------------------------- | ||
|
||
* Correctif insertion cote public | ||
|
||
Version 2.0.0 (2015-10-16) | ||
-------------------------- | ||
|
||
* Première release publique |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
# README # | ||
|
||
Ce plugin pour [Dotclear](http://fr.dotclear.org/) permet d'inserer du code HTML dans les pages publiques depuis un editeur de code interne. | ||
Ce plugin pour [Dotclear](https://fr.dotclear.org/) permet d'insérer du code HTML dans les pages publiques depuis un éditeur de code interne. | ||
|
||
## Caractéristiques ## | ||
L'editeur de code utilise la coloration syntaxique de [CodeMirror](http://codemirror.net/) | ||
|
||
L'éditeur de code utilise la coloration syntaxique de [CodeMirror](https://codemirror.net/) | ||
|
||
## Pré-requis ## | ||
|
||
* Dotclear 2.8 ou plus | ||
|
||
## Utilisation ## | ||
Le plugin met a disposition 2 editeurs de code HTML: | ||
|
||
* Un editeur pour inserer du code dans le header (balise `<head>`) | ||
* Un editeur pour inserer du code dans le footer de la page | ||
Le plugin met a disposition 2 éditeurs de code HTML: | ||
|
||
* Un éditeur pour insérer du code dans le header (balise `<head>`) | ||
* Un éditeur pour insérer du code dans le footer de la page | ||
|
||
## Téléchargements ## | ||
|
||
Vous pouvez télécharger les packages [ici](https://github.com/Gvx-/dcScript/releases) | ||
|
||
## Signaler un dysfonctionnement ## | ||
|
||
Vous pouvez signaler un dysfonctionnement ou faire une demande d’amélioration [ici](https://github.com/Gvx-/dcScript/issues/new) | ||
|
||
## Licence ## | ||
Ce code est sous licence [GPL version 2.0](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
|
||
Ce code est sous licence [GPL version 2.0](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
<?php | ||
/* -- BEGIN LICENSE BLOCK ----------------------------------------------------- | ||
* This file is part of plugin dcScript for Dotclear 2. | ||
* Copyright © 2014-2016 Gvx | ||
* Licensed under the GPL version 2.0 license. | ||
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
* -- END LICENSE BLOCK -----------------------------------------------------*/ | ||
if(!defined('DC_CONTEXT_ADMIN')) { return; } | ||
|
||
dcPage::checkSuper(); | ||
|
||
if (isset($_POST['save'])) { | ||
try { | ||
$core->dcScript->settings('enabled', !empty($_POST['enabled'])); | ||
$core->dcScript->settings('header_code_enabled', !empty($_POST['header_code_enabled'])); | ||
$core->dcScript->settings('footer_code_enabled', !empty($_POST['footer_code_enabled'])); | ||
$core->dcScript->settings('backup_ext', html::escapeHTML($_POST['backup'])); | ||
$core->blog->triggerBlog(); | ||
dcPage::addSuccessNotice(__('Configuration successfully updated.')); | ||
} catch(exception $e) { | ||
//$core->error->add($e->getMessage()); | ||
$core->error->add(__('Unable to save the configuration')); | ||
} | ||
if(!empty($_GET['redir']) && strpos($_GET['redir'], 'p='.$core->dcScript->info('id')) === false) { | ||
$core->error->add(__('Redirection not found')); | ||
$core->adminurl->redirect('admin.home'); | ||
} | ||
http::redirect($_REQUEST['redir']); | ||
} | ||
|
||
echo | ||
'<div class="fieldset"> | ||
<h3>'.__('Activation').'</h3> | ||
<p> | ||
'.form::checkbox('enabled','1',$core->dcScript->settings('enabled')). | ||
'<label class="classic" for="enabled"> | ||
'.sprintf(__('Enable %s on this blog'), html::escapeHTML(__($core->dcScript->info('name')))). | ||
'</label> | ||
</p> | ||
<p class="form-note">'.__('Enable the plugin on this blog.').'</p> | ||
</div> | ||
<div id="options"> | ||
<div class="fieldset"> | ||
<h3>'.__('Active codes').'</h3> | ||
<div class="two-cols clear"> | ||
<div class="col"> | ||
<p> | ||
'.form::checkbox('header_code_enabled','1',$core->dcScript->settings('header_code_enabled')) | ||
.'<label class="classic" for="header_code_enabled">'.__('Enable header code').'</label> | ||
</p> | ||
<p class="form-note">'.__('Enable public header code.').'</p> | ||
</div> | ||
<div class="col"> | ||
<p> | ||
'.form::checkbox('footer_code_enabled','1',$core->dcScript->settings('footer_code_enabled')) | ||
.'<label class="classic" for="footer_code_enabled">'.__('Enable footer code').'</label> | ||
</p> | ||
<p class="form-note">'.__('Enable public footer code.').'</p> | ||
</div> | ||
</div> | ||
<div class="clear"></div> | ||
</div> | ||
<div class="fieldset clear"> | ||
<h3>'.__('Options').'</h3> | ||
<p> | ||
<label class="classic" for="backup">'.__('Extension Backup Files').' : </label> | ||
'.form::field('backup',25,255,$core->dcScript->settings('backup_ext'),'classic').' | ||
</p> | ||
<p class="form-note">'.__('Default extension backup files.').'</p> | ||
</div> | ||
</div> | ||
'; | ||
dcPage::helpBlock('dcScript-config'); | ||
<?php | ||
/* -- BEGIN LICENSE BLOCK ----------------------------------------------------- | ||
* This file is part of plugin dcScript for Dotclear 2. | ||
* Copyright © 2014-2020Gvx | ||
* Licensed under the GPL version 2.0 license. | ||
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
* -- END LICENSE BLOCK -----------------------------------------------------*/ | ||
if(!defined('DC_CONTEXT_ADMIN')) { return; } | ||
|
||
dcPage::checkSuper(); | ||
|
||
if (isset($_POST['save'])) { | ||
try { | ||
$core->dcScript->settings('enabled', !empty($_POST['enabled']), true); | ||
$core->dcScript->settings('header_code_enabled', !empty($_POST['header_code_enabled']), true); | ||
$core->dcScript->settings('footer_code_enabled', !empty($_POST['footer_code_enabled']), true); | ||
$core->dcScript->settings('backup_ext', html::escapeHTML($_POST['backup']), true); | ||
$core->blog->triggerBlog(); | ||
dcPage::addSuccessNotice(__('Configuration successfully updated.')); | ||
} catch(exception $e) { | ||
//$core->error->add($e->getMessage()); | ||
$core->error->add(__('Unable to save the configuration')); | ||
} | ||
if(!empty($_GET['redir']) && strpos($_GET['redir'], 'p='.$core->dcScript->info('id')) === false) { | ||
$core->error->add(__('Redirection not found')); | ||
$core->adminurl->redirect('admin.home'); | ||
} | ||
http::redirect($_REQUEST['redir']); | ||
} | ||
|
||
echo | ||
'<div class="fieldset"> | ||
<h3>'.__('Activation').'</h3> | ||
<p> | ||
'.form::checkbox('enabled','1',$core->dcScript->settings('enabled', null, true)). | ||
'<label class="classic" for="enabled"> | ||
'.sprintf(__('Enable %s on this blog'), html::escapeHTML(__($core->dcScript->info('name')))). | ||
'</label> | ||
</p> | ||
<p class="form-note">'.__('Enable the plugin on this blog.').'</p> | ||
</div> | ||
<div id="options"> | ||
<div class="fieldset"> | ||
<h3>'.__('Active codes').'</h3> | ||
<div class="two-cols clear"> | ||
<div class="col"> | ||
<p> | ||
'.form::checkbox('header_code_enabled','1',$core->dcScript->settings('header_code_enabled', null, true)) | ||
.'<label class="classic" for="header_code_enabled">'.__('Enable header code').'</label> | ||
</p> | ||
<p class="form-note">'.__('Enable public header code.').'</p> | ||
</div> | ||
<div class="col"> | ||
<p> | ||
'.form::checkbox('footer_code_enabled','1',$core->dcScript->settings('footer_code_enabled', null, true)) | ||
.'<label class="classic" for="footer_code_enabled">'.__('Enable footer code').'</label> | ||
</p> | ||
<p class="form-note">'.__('Enable public footer code.').'</p> | ||
</div> | ||
</div> | ||
<div class="clear"></div> | ||
</div> | ||
<div class="fieldset clear"> | ||
<h3>'.__('Options').'</h3> | ||
<p> | ||
<label class="classic" for="backup">'.__('Extension Backup Files').' : </label> | ||
'.form::field('backup',25,255,$core->dcScript->settings('backup_ext', null, true),'classic').' | ||
</p> | ||
<p class="form-note">'.__('Default extension backup files.').'</p> | ||
</div> | ||
</div> | ||
'; | ||
dcPage::helpBlock('dcScript-config'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<?php | ||
/* -- BEGIN LICENSE BLOCK ----------------------------------------------------- | ||
* This file is part of plugin dcScript for Dotclear 2. | ||
* Copyright © 2014-2016 Gvx | ||
* Licensed under the GPL version 2.0 license. | ||
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
* -- END LICENSE BLOCK -----------------------------------------------------*/ | ||
if(!defined('DC_RC_PATH')) { return; } | ||
|
||
$this->registerModule( | ||
/* Name */ 'dcScript', | ||
/* Description*/ 'Add script for DC 2.8+', | ||
/* Author */ 'Gvx', | ||
/* Version */ '2.0.2', | ||
array( | ||
/* standard plugin options dotclear */ | ||
'permissions' => 'dcScript.edit' | ||
, 'type' => 'plugin' | ||
, 'Priority' => 1000 | ||
, 'support' /* url */ => 'http://forum.dotclear.org/viewtopic.php?pid=335785#p335785' | ||
, 'details' /* url */ => 'https://github.com/Gvx-/dcScript' | ||
, 'requires' /* id(s) */ => array( | ||
array('core', '2.8') | ||
) | ||
/* specific plugin options */ | ||
, '_icon_small' => '/inc/icon-small.png' | ||
, '_icon_large' => '/inc/icon-large.png' | ||
) | ||
); | ||
|
||
# --------------------------------------------------------- | ||
# use codemirror version 5.12 | ||
# see: http://codemirror.net/ | ||
# --------------------------------------------------------- | ||
<?php | ||
/* -- BEGIN LICENSE BLOCK ----------------------------------------------------- | ||
* This file is part of plugin dcScript for Dotclear 2. | ||
* Copyright © 2014-2020 Gvx | ||
* Licensed under the GPL version 2.0 license. | ||
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
* -- END LICENSE BLOCK -----------------------------------------------------*/ | ||
if(!defined('DC_RC_PATH')) { return; } | ||
|
||
$this->registerModule( | ||
/* Name */ 'dcScript', | ||
/* Description*/ 'Add script for DC 2.8+', | ||
/* Author */ 'Gvx', | ||
/* Version */ '2.1.0', | ||
array( | ||
/* standard plugin options dotclear */ | ||
'permissions' => 'dcScript.edit' | ||
, 'type' => 'plugin' | ||
, 'Priority' => 1000 | ||
, 'support' /* url */ => 'http://forum.dotclear.org/viewtopic.php?pid=335785#p335785' | ||
, 'details' /* url */ => 'https://github.com/Gvx-/dcScript' | ||
, 'requires' /* id(s) */ => array( | ||
array('core', '2.8') | ||
) | ||
/* specific plugin options */ | ||
, '_icon_small' => '/inc/icon-small.png' | ||
, '_icon_large' => '/inc/icon-large.png' | ||
) | ||
); | ||
|
||
# --------------------------------------------------------- | ||
# use codemirror version 5.52.0 | ||
# see: http://codemirror.net/ | ||
# --------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<?php | ||
/* -- BEGIN LICENSE BLOCK ----------------------------------------------------- | ||
* This file is part of plugin dcScript for Dotclear 2. | ||
* Copyright © 2014-2016 Gvx | ||
* Licensed under the GPL version 2.0 license. | ||
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
* -- END LICENSE BLOCK -----------------------------------------------------*/ | ||
if(!defined('DC_RC_PATH')) { return; } | ||
# common (public & admin) | ||
|
||
# loading of plugin class | ||
$__autoload['dcPluginHelper024'] = dirname(__FILE__).'/inc/class.dcPluginHelper.php'; | ||
$__autoload['dcScript'] = dirname(__FILE__).'/inc/class.dcScript.php'; | ||
|
||
# initialization | ||
$core->dcScript = new dcScript(basename(dirname(__FILE__))); | ||
|
||
if(defined('DC_CONTEXT_ADMIN')) { | ||
# admin only | ||
} else { | ||
# public only | ||
} | ||
<?php | ||
/* -- BEGIN LICENSE BLOCK ----------------------------------------------------- | ||
* This file is part of plugin dcScript for Dotclear 2. | ||
* Copyright © 2014-2016 Gvx | ||
* Licensed under the GPL version 2.0 license. | ||
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
* -- END LICENSE BLOCK -----------------------------------------------------*/ | ||
if(!defined('DC_RC_PATH')) { return; } | ||
# common (public & admin) | ||
|
||
# loading of plugin class | ||
$__autoload['dcPluginHelper024b'] = dirname(__FILE__).'/inc/class.dcPluginHelper.php'; | ||
$__autoload['dcScript'] = dirname(__FILE__).'/inc/class.dcScript.php'; | ||
|
||
# initialization | ||
$core->dcScript = new dcScript(basename(dirname(__FILE__))); | ||
|
||
if(defined('DC_CONTEXT_ADMIN')) { | ||
# admin only | ||
|
||
} else { | ||
# public only | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.