Skip to content

Commit 4ac0d09

Browse files
committed
Version 2.1.0 (Fix#1)
1 parent 2718605 commit 4ac0d09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+15260
-601
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
Changelog
22
=========
33

4+
Version 2.1.0 (2020-03-30)
5+
--------------------------
6+
7+
* Suppression de la dépendance a jQuery
8+
* Passage a la version 5.52.0 de CodeMirror
9+
* Changement de système de cryptage compatible PHP 7.2
10+
* Mise a jour support
11+
* Correction procédure désinstallation
12+
* Corrections divers
13+
14+
Version 2.0.1 (2016-03-05)
15+
--------------------------
16+
17+
* Correctif insertion cote public
18+
419
Version 2.0.0 (2015-10-16)
520
--------------------------
21+
622
* Première release publique

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
# README #
22

3-
Ce plugin pour [Dotclear](http://fr.dotclear.org/) permet d'inserer du code HTML dans les pages publiques depuis un editeur de code interne.
3+
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.
44

55
## Caractéristiques ##
6-
L'editeur de code utilise la coloration syntaxique de [CodeMirror](http://codemirror.net/)
6+
7+
L'éditeur de code utilise la coloration syntaxique de [CodeMirror](https://codemirror.net/)
78

89
## Pré-requis ##
10+
911
* Dotclear 2.8 ou plus
1012

1113
## Utilisation ##
12-
Le plugin met a disposition 2 editeurs de code HTML:
1314

14-
* Un editeur pour inserer du code dans le header (balise `<head>`)
15-
* Un editeur pour inserer du code dans le footer de la page
15+
Le plugin met a disposition 2 éditeurs de code HTML:
16+
17+
* Un éditeur pour insérer du code dans le header (balise `<head>`)
18+
* Un éditeur pour insérer du code dans le footer de la page
1619

1720
## Téléchargements ##
21+
1822
Vous pouvez télécharger les packages [ici](https://github.com/Gvx-/dcScript/releases)
1923

2024
## Signaler un dysfonctionnement ##
25+
2126
Vous pouvez signaler un dysfonctionnement ou faire une demande d’amélioration [ici](https://github.com/Gvx-/dcScript/issues/new)
2227

2328
## Licence ##
24-
Ce code est sous licence [GPL version 2.0](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
29+
30+
Ce code est sous licence [GPL version 2.0](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)

dcScript/_config.php

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
1-
<?php
2-
/* -- BEGIN LICENSE BLOCK -----------------------------------------------------
3-
* This file is part of plugin dcScript for Dotclear 2.
4-
* Copyright © 2014-2016 Gvx
5-
* Licensed under the GPL version 2.0 license.
6-
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
7-
* -- END LICENSE BLOCK -----------------------------------------------------*/
8-
if(!defined('DC_CONTEXT_ADMIN')) { return; }
9-
10-
dcPage::checkSuper();
11-
12-
if (isset($_POST['save'])) {
13-
try {
14-
$core->dcScript->settings('enabled', !empty($_POST['enabled']));
15-
$core->dcScript->settings('header_code_enabled', !empty($_POST['header_code_enabled']));
16-
$core->dcScript->settings('footer_code_enabled', !empty($_POST['footer_code_enabled']));
17-
$core->dcScript->settings('backup_ext', html::escapeHTML($_POST['backup']));
18-
$core->blog->triggerBlog();
19-
dcPage::addSuccessNotice(__('Configuration successfully updated.'));
20-
} catch(exception $e) {
21-
//$core->error->add($e->getMessage());
22-
$core->error->add(__('Unable to save the configuration'));
23-
}
24-
if(!empty($_GET['redir']) && strpos($_GET['redir'], 'p='.$core->dcScript->info('id')) === false) {
25-
$core->error->add(__('Redirection not found'));
26-
$core->adminurl->redirect('admin.home');
27-
}
28-
http::redirect($_REQUEST['redir']);
29-
}
30-
31-
echo
32-
'<div class="fieldset">
33-
<h3>'.__('Activation').'</h3>
34-
<p>
35-
'.form::checkbox('enabled','1',$core->dcScript->settings('enabled')).
36-
'<label class="classic" for="enabled">
37-
'.sprintf(__('Enable %s on this blog'), html::escapeHTML(__($core->dcScript->info('name')))).
38-
'</label>
39-
</p>
40-
<p class="form-note">'.__('Enable the plugin on this blog.').'</p>
41-
</div>
42-
<div id="options">
43-
<div class="fieldset">
44-
<h3>'.__('Active codes').'</h3>
45-
<div class="two-cols clear">
46-
<div class="col">
47-
<p>
48-
'.form::checkbox('header_code_enabled','1',$core->dcScript->settings('header_code_enabled'))
49-
.'<label class="classic" for="header_code_enabled">'.__('Enable header code').'</label>
50-
</p>
51-
<p class="form-note">'.__('Enable public header code.').'</p>
52-
</div>
53-
<div class="col">
54-
<p>
55-
'.form::checkbox('footer_code_enabled','1',$core->dcScript->settings('footer_code_enabled'))
56-
.'<label class="classic" for="footer_code_enabled">'.__('Enable footer code').'</label>
57-
</p>
58-
<p class="form-note">'.__('Enable public footer code.').'</p>
59-
</div>
60-
</div>
61-
<div class="clear"></div>
62-
</div>
63-
<div class="fieldset clear">
64-
<h3>'.__('Options').'</h3>
65-
<p>
66-
<label class="classic" for="backup">'.__('Extension Backup Files').' : </label>
67-
'.form::field('backup',25,255,$core->dcScript->settings('backup_ext'),'classic').'
68-
</p>
69-
<p class="form-note">'.__('Default extension backup files.').'</p>
70-
</div>
71-
</div>
72-
';
73-
dcPage::helpBlock('dcScript-config');
1+
<?php
2+
/* -- BEGIN LICENSE BLOCK -----------------------------------------------------
3+
* This file is part of plugin dcScript for Dotclear 2.
4+
* Copyright © 2014-2020Gvx
5+
* Licensed under the GPL version 2.0 license.
6+
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
7+
* -- END LICENSE BLOCK -----------------------------------------------------*/
8+
if(!defined('DC_CONTEXT_ADMIN')) { return; }
9+
10+
dcPage::checkSuper();
11+
12+
if (isset($_POST['save'])) {
13+
try {
14+
$core->dcScript->settings('enabled', !empty($_POST['enabled']), true);
15+
$core->dcScript->settings('header_code_enabled', !empty($_POST['header_code_enabled']), true);
16+
$core->dcScript->settings('footer_code_enabled', !empty($_POST['footer_code_enabled']), true);
17+
$core->dcScript->settings('backup_ext', html::escapeHTML($_POST['backup']), true);
18+
$core->blog->triggerBlog();
19+
dcPage::addSuccessNotice(__('Configuration successfully updated.'));
20+
} catch(exception $e) {
21+
//$core->error->add($e->getMessage());
22+
$core->error->add(__('Unable to save the configuration'));
23+
}
24+
if(!empty($_GET['redir']) && strpos($_GET['redir'], 'p='.$core->dcScript->info('id')) === false) {
25+
$core->error->add(__('Redirection not found'));
26+
$core->adminurl->redirect('admin.home');
27+
}
28+
http::redirect($_REQUEST['redir']);
29+
}
30+
31+
echo
32+
'<div class="fieldset">
33+
<h3>'.__('Activation').'</h3>
34+
<p>
35+
'.form::checkbox('enabled','1',$core->dcScript->settings('enabled', null, true)).
36+
'<label class="classic" for="enabled">
37+
'.sprintf(__('Enable %s on this blog'), html::escapeHTML(__($core->dcScript->info('name')))).
38+
'</label>
39+
</p>
40+
<p class="form-note">'.__('Enable the plugin on this blog.').'</p>
41+
</div>
42+
<div id="options">
43+
<div class="fieldset">
44+
<h3>'.__('Active codes').'</h3>
45+
<div class="two-cols clear">
46+
<div class="col">
47+
<p>
48+
'.form::checkbox('header_code_enabled','1',$core->dcScript->settings('header_code_enabled', null, true))
49+
.'<label class="classic" for="header_code_enabled">'.__('Enable header code').'</label>
50+
</p>
51+
<p class="form-note">'.__('Enable public header code.').'</p>
52+
</div>
53+
<div class="col">
54+
<p>
55+
'.form::checkbox('footer_code_enabled','1',$core->dcScript->settings('footer_code_enabled', null, true))
56+
.'<label class="classic" for="footer_code_enabled">'.__('Enable footer code').'</label>
57+
</p>
58+
<p class="form-note">'.__('Enable public footer code.').'</p>
59+
</div>
60+
</div>
61+
<div class="clear"></div>
62+
</div>
63+
<div class="fieldset clear">
64+
<h3>'.__('Options').'</h3>
65+
<p>
66+
<label class="classic" for="backup">'.__('Extension Backup Files').' : </label>
67+
'.form::field('backup',25,255,$core->dcScript->settings('backup_ext', null, true),'classic').'
68+
</p>
69+
<p class="form-note">'.__('Default extension backup files.').'</p>
70+
</div>
71+
</div>
72+
';
73+
dcPage::helpBlock('dcScript-config');

dcScript/_define.php

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
<?php
2-
/* -- BEGIN LICENSE BLOCK -----------------------------------------------------
3-
* This file is part of plugin dcScript for Dotclear 2.
4-
* Copyright © 2014-2016 Gvx
5-
* Licensed under the GPL version 2.0 license.
6-
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
7-
* -- END LICENSE BLOCK -----------------------------------------------------*/
8-
if(!defined('DC_RC_PATH')) { return; }
9-
10-
$this->registerModule(
11-
/* Name */ 'dcScript',
12-
/* Description*/ 'Add script for DC 2.8+',
13-
/* Author */ 'Gvx',
14-
/* Version */ '2.0.2',
15-
array(
16-
/* standard plugin options dotclear */
17-
'permissions' => 'dcScript.edit'
18-
, 'type' => 'plugin'
19-
, 'Priority' => 1000
20-
, 'support' /* url */ => 'http://forum.dotclear.org/viewtopic.php?pid=335785#p335785'
21-
, 'details' /* url */ => 'https://github.com/Gvx-/dcScript'
22-
, 'requires' /* id(s) */ => array(
23-
array('core', '2.8')
24-
)
25-
/* specific plugin options */
26-
, '_icon_small' => '/inc/icon-small.png'
27-
, '_icon_large' => '/inc/icon-large.png'
28-
)
29-
);
30-
31-
# ---------------------------------------------------------
32-
# use codemirror version 5.12
33-
# see: http://codemirror.net/
34-
# ---------------------------------------------------------
1+
<?php
2+
/* -- BEGIN LICENSE BLOCK -----------------------------------------------------
3+
* This file is part of plugin dcScript for Dotclear 2.
4+
* Copyright © 2014-2020 Gvx
5+
* Licensed under the GPL version 2.0 license.
6+
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
7+
* -- END LICENSE BLOCK -----------------------------------------------------*/
8+
if(!defined('DC_RC_PATH')) { return; }
9+
10+
$this->registerModule(
11+
/* Name */ 'dcScript',
12+
/* Description*/ 'Add script for DC 2.8+',
13+
/* Author */ 'Gvx',
14+
/* Version */ '2.1.0',
15+
array(
16+
/* standard plugin options dotclear */
17+
'permissions' => 'dcScript.edit'
18+
, 'type' => 'plugin'
19+
, 'Priority' => 1000
20+
, 'support' /* url */ => 'http://forum.dotclear.org/viewtopic.php?pid=335785#p335785'
21+
, 'details' /* url */ => 'https://github.com/Gvx-/dcScript'
22+
, 'requires' /* id(s) */ => array(
23+
array('core', '2.8')
24+
)
25+
/* specific plugin options */
26+
, '_icon_small' => '/inc/icon-small.png'
27+
, '_icon_large' => '/inc/icon-large.png'
28+
)
29+
);
30+
31+
# ---------------------------------------------------------
32+
# use codemirror version 5.52.0
33+
# see: http://codemirror.net/
34+
# ---------------------------------------------------------

dcScript/_prepend.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
<?php
2-
/* -- BEGIN LICENSE BLOCK -----------------------------------------------------
3-
* This file is part of plugin dcScript for Dotclear 2.
4-
* Copyright © 2014-2016 Gvx
5-
* Licensed under the GPL version 2.0 license.
6-
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
7-
* -- END LICENSE BLOCK -----------------------------------------------------*/
8-
if(!defined('DC_RC_PATH')) { return; }
9-
# common (public & admin)
10-
11-
# loading of plugin class
12-
$__autoload['dcPluginHelper024'] = dirname(__FILE__).'/inc/class.dcPluginHelper.php';
13-
$__autoload['dcScript'] = dirname(__FILE__).'/inc/class.dcScript.php';
14-
15-
# initialization
16-
$core->dcScript = new dcScript(basename(dirname(__FILE__)));
17-
18-
if(defined('DC_CONTEXT_ADMIN')) {
19-
# admin only
20-
21-
} else {
22-
# public only
23-
24-
}
1+
<?php
2+
/* -- BEGIN LICENSE BLOCK -----------------------------------------------------
3+
* This file is part of plugin dcScript for Dotclear 2.
4+
* Copyright © 2014-2016 Gvx
5+
* Licensed under the GPL version 2.0 license.
6+
* (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
7+
* -- END LICENSE BLOCK -----------------------------------------------------*/
8+
if(!defined('DC_RC_PATH')) { return; }
9+
# common (public & admin)
10+
11+
# loading of plugin class
12+
$__autoload['dcPluginHelper024b'] = dirname(__FILE__).'/inc/class.dcPluginHelper.php';
13+
$__autoload['dcScript'] = dirname(__FILE__).'/inc/class.dcScript.php';
14+
15+
# initialization
16+
$core->dcScript = new dcScript(basename(dirname(__FILE__)));
17+
18+
if(defined('DC_CONTEXT_ADMIN')) {
19+
# admin only
20+
21+
} else {
22+
# public only
23+
24+
}

dcScript/codemirror/LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others
1+
MIT License
2+
3+
Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others
24

35
Permission is hereby granted, free of charge, to any person obtaining a copy
46
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)