Fetch CDN jQuery without protocol; adapted ChangeLog formats.

This commit is contained in:
Matthias Mees 2013-07-25 11:21:54 +02:00
parent 5787068962
commit 5b7f5e47de
7 changed files with 2061 additions and 2056 deletions

View file

@ -1,9 +1,8 @@
1.11:
-----
1.13:
* Fetch jQuery without protocol
Fetch jquery via https
1.12:
* Fetch jquery via https
1.10:
-----
Add jquery to s9y backend
* Add jquery to s9y backend

View file

@ -23,13 +23,13 @@ class serendipity_event_jquery extends serendipity_event {
$propbag->add('description', EVENT_JQUERY_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Malte Paskuda');
$propbag->add('version', '1.12');
$propbag->add('version', '1.13');
$propbag->add('event_hooks', array('frontend_header' => true,
'backend_header' => true,
'backend_plugins_new_instance' => true
));
$propbag->add('groups', array('BACKEND_FEATURES'));
}
}
function generate_content(&$title) {
$title = $this->title;
@ -38,7 +38,7 @@ class serendipity_event_jquery extends serendipity_event {
function install() {
$this->order_to_first();
}
function event_hook($event, &$bag, &$eventData, $addData = null) {
global $serendipity;
@ -50,7 +50,7 @@ class serendipity_event_jquery extends serendipity_event {
case 'backend_header':
// Serendipity 1.6 has jquery bundled.
if ($serendipity['capabilities']['jquery']) return '';
echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>' . "\n";
echo '<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>' . "\n";
break;
case 'backend_plugins_new_instance':
@ -75,7 +75,7 @@ class serendipity_event_jquery extends serendipity_event {
// Fetch current sort_order of current plugin.
$q = "SELECT sort_order FROM {$serendipity['dbPrefix']}plugins WHERE name = '" . $this->instance . "'";
$cur = serendipity_db_query($q, true, 'num');
// Increase sort_order of all plugins before current plugin by one.
$q = "UPDATE {$serendipity['dbPrefix']}plugins SET sort_order = sort_order + 1 WHERE placement = '" . $addData['default_placement'] . "' AND sort_order < " . intval($cur[0]);
serendipity_db_query($q);

View file

@ -1,29 +1,33 @@
0.4.9.6:
Fetch jquery via https
0.4.9.7:
* Fetch jQuery without protocol
0.4.9.6:
* Fetch jquery via https
0.4.9.5:
Changed menu-order to have the recycler first
* Changed menu-order to have the recycler first
0.4.9:
Security: Escaped comments in backend
Fixed error when selecting no comments in analyse-menu
* Security: Escaped comments in backend
* Fixed error when selecting no comments in analyse-menu
0.4.8:
Added option to delete all comments when emptying recycler
* Added option to delete all comments when emptying recycler
0.4.7:
Added non-js-buttons in commentlist
* Added non-js-buttons in commentlist
0.4.6:
Smartified backend-menu
Added pagination to database-table
Added pagination to recycler
Fixed "race-condition" in recycler, will now only delete displayed
comments
Recycler will now show rating of comments
Added missing label for approval email link
* Smartified backend-menu
* Added pagination to database-table
* Added pagination to recycler
* Fixed "race-condition" in recycler, will now only delete displayed comments
* Recycler will now show rating of comments
* Added missing label for approval email link
0.4.5:
Fixed analysis-menu
Fixed error in classification, ignored some commentcomponents
* Fixed analysis-menu
* Fixed error in classification, ignored some commentcomponents
0.4.4:
* Added menu options in import menu for troja
@ -51,7 +55,7 @@
0.3.9.2:
* Deleting and recreating the database will now create the table with
the key
* Fixed php-error when requesting all comments from an empty
* Fixed php-error when requesting all comments from an empty
database
0.3.9.1:
@ -80,7 +84,7 @@
* Added a button to learn comments in the recycler again as spam when
emptying it.
* Added menu for analysing the ratings of a comment, showing the
the rating of each part
the rating of each part
0.3.6.1:
* Fixing restore of recyclercontent
@ -89,13 +93,13 @@
* Upon Request: Added date to recycler
* Added a "Mark all as ham"-button to the commentpage, using
fieldsets to separate plugin-buttons from the normal ones
0.3.5:
* Fixed possible infinite-loop when marking as spam
* Made the "mark selected as spam"-function more robust
* Upgrade: Fixed saving of old counter into the new system
* Named treatment "custom" better
0.3.4:
* Added workaround for "empty" pingbacks

View file

@ -1,6 +1,5 @@
{if $jquery_needed == true}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
{/if}
<style> {$css} </style>
<script src="{$path}serendipity_event_spamblock_bayes.js" type="text/javascript"></script>
@ -34,7 +33,7 @@
<a href="?serendipity[adminModule]=event_display&serendipity[adminAction]=spamblock_bayes&serendipity[subpage]=3">{$CONST.PLUGIN_EVENT_SPAMBLOCK_BAYES_MENU_LEARN}</a>
</li>
{/if}
{if $subpage == 4}
<li>
<h3><a href="?serendipity[adminModule]=event_display&serendipity[adminAction]=spamblock_bayes&serendipity[subpage]=4">{$CONST.PLUGIN_EVENT_SPAMBLOCK_BAYES_MENU_ANALYSIS}</a></h3>
@ -54,4 +53,4 @@
</li>
{/if}
</ul>
</div>
</div>

View file

@ -1,4 +1,7 @@
0.4:
0.7:
* Fetch jQuery without protocol
0.6:
* Fetch jquery via https
0.3:
@ -13,4 +16,4 @@
* Made images deletable
* Added Uploadbutton
* Added Rename function
* Minor usability improvements
* Minor usability improvements

View file

@ -25,7 +25,7 @@ class serendipity_event_template_editor extends serendipity_event {
$propbag->add('stackable', false);
$propbag->add('author', 'Malte Paskuda');
$propbag->add('license', 'GPL');
$propbag->add('version', '0.6');
$propbag->add('version', '0.7');
$propbag->add('requirements', array(
'serendipity' => '0.8'
));
@ -68,7 +68,7 @@ class serendipity_event_template_editor extends serendipity_event {
function event_hook($event, &$bag, &$eventData, $addData = null) {
global $serendipity;
$hooks = &$bag->get('event_hooks');
if (isset($hooks[$event])) {
switch($event) {
@ -199,23 +199,23 @@ class serendipity_event_template_editor extends serendipity_event {
echo '<p class="serendipityAdminMsgError">'.htmlspecialchars($serendipity['GET']['error']).'</p>';
}
#only necessary for delivering the javascript and css
$pluginPath = $this->pluginPath = $this->get_config('path', '');
if (empty($pluginPath) || $pluginPath == 'default' || $pluginPath == 'none' || $pluginPath == 'empty') {
$pluginPath = $this->pluginPath = $serendipity['baseURL'] . 'index.php?/plugin/';
}
if (!$serendipity['capabilities']['jquery']) {
echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>';
echo '<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>';
}
echo '<script src="'.$pluginPath.'jquery.jeditable.js" type="text/javascript"></script>
<script src="'.$pluginPath.'serendipity_event_template_editor.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="'.$pluginPath.'serendipity_event_template_editor.css" />
<link rel="stylesheet" type="text/css" href="'.$pluginPath.'serendipity_event_template_editor.css" />
<script type="text/javascript">pluginPath = "'.$pluginPath.'";</script>';
if (empty($serendipity['GET']['template_editor_path'])||is_dir($serendipity['serendipityPath'] . $serendipity['GET']['template_editor_path'])) {
#The path is our basic argument for selecting a file or a folder
$path = false;
@ -232,7 +232,7 @@ class serendipity_event_template_editor extends serendipity_event {
$this->showDirectories($path);
$this->showCreator($path);
}
} else {
if ($this->get_config('highlight', true)) {
echo '<script src="'.$pluginPath.'codemirror/codemirror.js" type="text/javascript"></script>';
@ -276,7 +276,7 @@ class serendipity_event_template_editor extends serendipity_event {
<input class="serendipityPrettyButton input_button" type="submit" value="'.PLUGIN_EVENT_TEMPLATE_EDITOR_UPLOAD.'" />
</form></div>';
}
}
function showCreator($path) {
@ -310,7 +310,7 @@ class serendipity_event_template_editor extends serendipity_event {
return;
}
}
$heading = $this->linkify("?&amp;serendipity[adminModule]=event_display&amp;serendipity[adminAction]=template_editor&serendipity[template_editor_path]=", $path, $serendipity['template']);
echo '<h3>'.$heading.'</h3>
@ -319,7 +319,7 @@ class serendipity_event_template_editor extends serendipity_event {
<textarea name="content" id="template_editor" cols="80" rows="38">'.htmlspecialchars($content).'</textarea>
<input class="serendipityPrettyButton input_button" type="submit" value="'.SAVE.'" />
</form>';
}
function showFiles($path=false) {
@ -333,7 +333,7 @@ class serendipity_event_template_editor extends serendipity_event {
$heading = $this->linkify("?&amp;serendipity[adminModule]=event_display&amp;serendipity[adminAction]=template_editor&serendipity[template_editor_path]=", $path, $cur_template);
echo '<h3 id="templateEditorPath">'. $heading.'</h3>';
if (empty($files)) {
return;
@ -379,7 +379,7 @@ class serendipity_event_template_editor extends serendipity_event {
return;
}
echo '<h3>'.PLUGIN_EVENT_TEMPLATE_SUBFOLDERS.'</h3>';
echo '<ul id="templateEditorFolderList" class="templateEditorList" >';
foreach ($dirs as $dir) {
echo "<li>
@ -389,7 +389,7 @@ class serendipity_event_template_editor extends serendipity_event {
</a>
</li>";
}
echo '</ul>';
echo '</ul>';
}
@ -448,7 +448,7 @@ class serendipity_event_template_editor extends serendipity_event {
global $serendipity;
$template_path = $serendipity['serendipity_path'] . $serendipity['templatePath'];
$cur_template = $serendipity['template'];
//fork only if not already forked
$info_txt = file_get_contents($template_path . $cur_template . '/info.txt');
@ -456,18 +456,18 @@ class serendipity_event_template_editor extends serendipity_event {
if (strpos($info_txt, 'Fork_of:') !== false) {
$forked = true;
}
if (! $forked) {
$fork_template = $cur_template . '_fork';
if (is_writable($template_path)) {
if ( ! is_dir($template_path . $fork_template)) {
$this->copy_directory($template_path . $cur_template, $template_path . $fork_template);
$info_txt = preg_replace('/Name: (.*)/', 'Name: ${1}_fork', $info_txt);
$info_txt = $info_txt . "\nFork_of: $cur_template";
file_put_contents($template_path . $fork_template . '/info.txt', $info_txt);
}
//Now that the fork is created we need to set it instantly
//but only if copying succeeded
if (is_dir($template_path . $fork_template)) {
@ -508,14 +508,14 @@ class serendipity_event_template_editor extends serendipity_event {
if ( $readdirectory == '.' || $readdirectory == '..' ) {
continue;
}
$PathDir = $source . '/' . $readdirectory;
$PathDir = $source . '/' . $readdirectory;
if ( is_dir( $PathDir ) ) {
$this->copy_directory( $PathDir, $destination . '/' . $readdirectory );
continue;
}
copy( $PathDir, $destination . '/' . $readdirectory );
}
$directory->close();
} else {
copy( $source, $destination );
@ -524,12 +524,12 @@ class serendipity_event_template_editor extends serendipity_event {
function debugMsg($msg) {
global $serendipity;
$this->debug_fp = @fopen ( $serendipity ['serendipityPath'] . 'templates_c/template_editor.log', 'a' );
if (! $this->debug_fp) {
return false;
}
if (empty ( $msg )) {
fwrite ( $this->debug_fp, "failure \n" );
} else {
@ -541,4 +541,4 @@ class serendipity_event_template_editor extends serendipity_event {
}
/* vim: set sts=4 ts=4 expandtab : */
?>
?>