Merge branch 'master' into feature_indexCleanup
Conflicts: index.php
This commit is contained in:
commit
4d7b90af99
bundled-libs/Smarty/libs
docs
htmlarea
include
admin
compat.inc.phpdb
functions.inc.phpfunctions_config.inc.phpfunctions_entries_admin.inc.phpfunctions_images.inc.phpfunctions_installer.inc.phpfunctions_rss.inc.phpfunctions_smarty.inc.phpfunctions_upgrader.inc.phpgenpage.inc.phplang.inc.phpplugin_api.inc.phpplugin_api_extension.inc.phplang
plugins
serendipity_event_creativecommons
serendipity_event_emoticate
serendipity_event_entryproperties
serendipity_event_s9ymarkup
serendipity_event_spamblock
serendipity_event_spartacus
templates
@ -128,7 +128,7 @@
|
|||||||
<tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
|
<tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
|
||||||
<td><h3><font color=blue>${$vars@key}</font></h3>
|
<td><h3><font color=blue>${$vars@key}</font></h3>
|
||||||
{if isset($vars['nocache'])}<b>Nocache</b></br>{/if}
|
{if isset($vars['nocache'])}<b>Nocache</b></br>{/if}
|
||||||
{if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var:10:80 nofilter}{/if}
|
{if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var nofilter}{/if}
|
||||||
</td>
|
</td>
|
||||||
<td><h3>Value</h3>{$vars['value']|debug_print_var:10:80 nofilter}</td>
|
<td><h3>Value</h3>{$vars['value']|debug_print_var:10:80 nofilter}</td>
|
||||||
<td>{if isset($vars['attributes'])}<h3>Attributes</h3>{$vars['attributes']|debug_print_var nofilter} {/if}</td>
|
<td>{if isset($vars['attributes'])}<h3>Attributes</h3>{$vars['attributes']|debug_print_var nofilter} {/if}</td>
|
||||||
@ -141,7 +141,7 @@
|
|||||||
{foreach $config_vars as $vars}
|
{foreach $config_vars as $vars}
|
||||||
<tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
|
<tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
|
||||||
<td><h3><font color=blue>#{$vars@key}#</font></h3>
|
<td><h3><font color=blue>#{$vars@key}#</font></h3>
|
||||||
{if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var:10:80 nofilter}{/if}
|
{if isset($vars['scope'])}<b>Origin:</b> {$vars['scope']|debug_print_var nofilter}{/if}
|
||||||
</td>
|
</td>
|
||||||
<td>{$vars['value']|debug_print_var:10:80 nofilter}</td>
|
<td>{$vars['value']|debug_print_var:10:80 nofilter}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -154,7 +154,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{$id = ''}
|
{$id = ''}
|
||||||
{if $display_mode}{$id = "$offset$template_name"|md5}{/if}
|
{if $display_mode}{$id = "$offset$template_name"|md5}{/if}
|
||||||
_smarty_console = window.open("", "console{$id}", "width=680,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
|
_smarty_console = window.open("", "console{$id}", "width=1024,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
|
||||||
_smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
|
_smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
|
||||||
_smarty_console.document.close();
|
_smarty_console.document.close();
|
||||||
</script>
|
</script>
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
*/
|
*/
|
||||||
function smarty_modifier_debug_print_var($var, $max = 10, $length = 40, $depth = 0, $objects = array())
|
function smarty_modifier_debug_print_var($var, $max = 10, $length = 40, $depth = 0, $objects = array())
|
||||||
{
|
{
|
||||||
$_replace = array("\n" => '<i>\n</i>',
|
$_replace = array("\n" => '\n',
|
||||||
"\r" => '<i>\r</i>',
|
"\r" => '\r',
|
||||||
"\t" => '<i>\t</i>'
|
"\t" => '\t'
|
||||||
);
|
);
|
||||||
switch (gettype($var)) {
|
switch (gettype($var)) {
|
||||||
case 'array' :
|
case 'array' :
|
||||||
|
45
docs/NEWS
45
docs/NEWS
@ -1,6 +1,45 @@
|
|||||||
Version 2.1 ()
|
Version 2.1 ()
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Optimize scaleImage returns
|
||||||
|
|
||||||
|
* Fixed media item rename handler (#370)
|
||||||
|
|
||||||
|
* Fixed and enhanced multiple media redirects and path / name
|
||||||
|
related issues, as well as some better umlaut conversions
|
||||||
|
|
||||||
|
* Allow strict media directory selection by toggle filter
|
||||||
|
|
||||||
|
* Allow a better auto char conversion to media upload item names
|
||||||
|
|
||||||
|
* Added Start / End pagination to MediaLibrary and entries list
|
||||||
|
|
||||||
|
* Added new bulk image move ability to MediaLibrary. This fixes
|
||||||
|
several issues with rename AND remove and allows to automatically
|
||||||
|
check and set MediaLibrary item entry paths on MOVE.
|
||||||
|
Staticpages from v.4.52 are modified to support this too.
|
||||||
|
Now supports Quickblog (imageselectorplus) entry path repairs.
|
||||||
|
|
||||||
|
* Fix MediaLibrary objects not pass through into entryproperties
|
||||||
|
CustomFields
|
||||||
|
|
||||||
|
* Fix fatal error atom 1.0 issue; References #362
|
||||||
|
|
||||||
|
* Fix eraseEntryEditorCache script in preview_iframe updertHooks
|
||||||
|
IFRAME
|
||||||
|
|
||||||
|
* Fix the Serendipity template and file fallback chaining to work
|
||||||
|
more precise
|
||||||
|
|
||||||
|
* Disable CKEDITOR Source protection for Smarty and WP-Smarty like
|
||||||
|
markup, since now being usable w/o setting ACF OFF
|
||||||
|
|
||||||
|
* Set Serendipity var use_autosave in backend only
|
||||||
|
|
||||||
|
* Fix entries.inc fetching iframe event returning 1, when true and
|
||||||
|
added a new language constant change message for multilanguage
|
||||||
|
entry changes, instead of the wrongly used save message
|
||||||
|
|
||||||
* Fix importers to use the new mysqli API extension with PHP 5+
|
* Fix importers to use the new mysqli API extension with PHP 5+
|
||||||
|
|
||||||
* WIP: Added an internal cache to speedup s9y's site generation. Can
|
* WIP: Added an internal cache to speedup s9y's site generation. Can
|
||||||
@ -57,6 +96,12 @@ Version 2.1 ()
|
|||||||
* Some small enhancements to the error reporting
|
* Some small enhancements to the error reporting
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.0.3 ()
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Fix some backend entry form related event messages
|
||||||
|
|
||||||
|
|
||||||
Version 2.0.2 (July 24th, 2015)
|
Version 2.0.2 (July 24th, 2015)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @fileOverview The Serendipity CKEDITOR custom config file:
|
* @fileOverview The Serendipity CKEDITOR custom config file:
|
||||||
* ckeditor_s9y_config.js, v. 1.14, last modified 2015-07-13 by Ian
|
* ckeditor_s9y_config.js, v. 1.15, last modified 2015-08-15 by Ian
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,9 +40,9 @@ CKEDITOR.editorConfig = function( config ) {
|
|||||||
// allow S9y imageselectorplus plugin mediainsert tag codes
|
// allow S9y imageselectorplus plugin mediainsert tag codes
|
||||||
config.protectedSource.push( /<(mediainsert)[^>]*>[\s\S]*?<\/mediainsert>/img );
|
config.protectedSource.push( /<(mediainsert)[^>]*>[\s\S]*?<\/mediainsert>/img );
|
||||||
// allow a Smarty like {} tag syntax without inner whitespace, which would be some other code part.
|
// allow a Smarty like {} tag syntax without inner whitespace, which would be some other code part.
|
||||||
config.protectedSource.push( /\{[a-zA-Z\$].*?\}/gi );
|
//config.protectedSource.push( /\{[a-zA-Z\$].*?\}/gi ); // Smarty markup protection disabled, since now being usable w/o setting ACF OFF
|
||||||
// allow [[mytag]] [[{$mytag}]] [s9y-include-entry:XXX:YYY] widget tags for a markup replacement by S9y plugins (eg by third example with the staticblock serendipity_event_includeentry plugin)
|
// allow [[mytag]] [[{$mytag}]] [s9y-include-entry:XXX:YYY] widget tags for a markup replacement by S9y plugins (eg by third example with the staticblock serendipity_event_includeentry plugin)
|
||||||
config.protectedSource.push(/\[\[([^\[\]])+\]\]/g);
|
//config.protectedSource.push(/\[\[([^\[\]])+\]\]/g); // WP-Smarty like markup protection disabled, since now being usable w/o setting ACF OFF
|
||||||
/**
|
/**
|
||||||
CKEDITOR.protectedSource patterns used regex Escape sequences
|
CKEDITOR.protectedSource patterns used regex Escape sequences
|
||||||
\s any whitespace character;
|
\s any whitespace character;
|
||||||
|
@ -8,6 +8,7 @@ if (!serendipity_checkPermission('adminEntries')) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$per_page = array('12', '16', '50', '100');
|
||||||
$sort_order = array('timestamp' => DATE,
|
$sort_order = array('timestamp' => DATE,
|
||||||
'isdraft' => PUBLISH . '/' . DRAFT,
|
'isdraft' => PUBLISH . '/' . DRAFT,
|
||||||
'a.realname' => AUTHOR,
|
'a.realname' => AUTHOR,
|
||||||
@ -15,7 +16,6 @@ $sort_order = array('timestamp' => DATE,
|
|||||||
'last_modified' => LAST_UPDATED,
|
'last_modified' => LAST_UPDATED,
|
||||||
'title' => TITLE,
|
'title' => TITLE,
|
||||||
'id' => 'ID');
|
'id' => 'ID');
|
||||||
$per_page = array('12', '16', '50', '100');
|
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
@ -339,8 +339,10 @@ switch($serendipity['GET']['adminAction']) {
|
|||||||
foreach ((array)$serendipity['GET']['filter'] as $k => $v) {
|
foreach ((array)$serendipity['GET']['filter'] as $k => $v) {
|
||||||
$qString .= '&serendipity[filter]['. $k .']='. $v;
|
$qString .= '&serendipity[filter]['. $k .']='. $v;
|
||||||
}
|
}
|
||||||
|
$data['linkFirst'] = $qString . '&serendipity[page]=' . 0;
|
||||||
$data['linkPrevious'] = $qString . '&serendipity[page]=' . ($page-1);
|
$data['linkPrevious'] = $qString . '&serendipity[page]=' . ($page-1);
|
||||||
$data['linkNext'] = $qString . '&serendipity[page]=' . ($page+1);
|
$data['linkNext'] = $qString . '&serendipity[page]=' . ($page+1);
|
||||||
|
$data['linkLast'] = $qString . '&serendipity[page]='; // is done in tpl per $totalPages
|
||||||
|
|
||||||
$smartentries = array();
|
$smartentries = array();
|
||||||
foreach ($entries as $ey) {
|
foreach ($entries as $ey) {
|
||||||
@ -396,7 +398,11 @@ switch($serendipity['GET']['adminAction']) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'multidelete':
|
case 'multidelete':
|
||||||
if (!serendipity_checkFormToken() || !is_array($serendipity['POST']['multiDelete'])) {
|
if (!serendipity_checkFormToken()) {
|
||||||
|
return; // blank content page, but default token check parameter is presenting a XSRF message when false
|
||||||
|
}
|
||||||
|
if (!is_array($serendipity['POST']['multiDelete'])) {
|
||||||
|
echo '<div class="msg_notice"><span class="icon-attention-circled"></span> ' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '</div>'."\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,8 +440,8 @@ $data['entryForm'] = $entryForm;
|
|||||||
$data['errors'] = $errors;
|
$data['errors'] = $errors;
|
||||||
$data['get'] = $serendipity['GET']; // don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
|
$data['get'] = $serendipity['GET']; // don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
|
||||||
// make sure we've got these
|
// make sure we've got these
|
||||||
if(!isset($data['urltoken'])) $data['urltoken'] = serendipity_setFormToken('url');
|
if (!isset($data['urltoken'])) $data['urltoken'] = serendipity_setFormToken('url');
|
||||||
if(!isset($data['formtoken'])) $data['formtoken'] = serendipity_setFormToken();
|
if (!isset($data['formtoken'])) $data['formtoken'] = serendipity_setFormToken();
|
||||||
|
|
||||||
echo serendipity_smarty_show('admin/entries.inc.tpl', $data);
|
echo serendipity_smarty_show('admin/entries.inc.tpl', $data);
|
||||||
|
|
||||||
|
@ -14,6 +14,20 @@ if (!is_object($serendipity['smarty'])) {
|
|||||||
serendipity_smarty_init();
|
serendipity_smarty_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No echo output here, before the switch, since that matters renaming alerts!
|
||||||
|
|
||||||
|
// unset adminAction type to default, if an image was bulkmoved and the origin page reloaded
|
||||||
|
if (!is_array($serendipity['POST']) && $serendipity['GET']['adminAction'] == 'multidelete') {
|
||||||
|
unset($serendipity['GET']['adminAction']);
|
||||||
|
}
|
||||||
|
// Listens on toggle_dir STRICT to list items per directory, or include all sub directory items
|
||||||
|
if (empty($serendipity['GET']['toggle_dir']) && empty($serendipity['COOKIE']['serendipity_toggle_dir'])) {
|
||||||
|
$serendipity['GET']['toggle_dir'] = 'no'; // default
|
||||||
|
}
|
||||||
|
if (!empty($serendipity['COOKIE']['serendipity_toggle_dir'])) {
|
||||||
|
serendipity_restoreVar($serendipity['COOKIE']['serendipity_toggle_dir'], $serendipity['GET']['toggle_dir']);
|
||||||
|
}
|
||||||
|
|
||||||
switch ($serendipity['GET']['adminAction']) {
|
switch ($serendipity['GET']['adminAction']) {
|
||||||
|
|
||||||
case 'doSync':
|
case 'doSync':
|
||||||
@ -60,14 +74,13 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
$messages = array();
|
$messages = array();
|
||||||
$data['case_do_delete'] = true;
|
$data['case_do_delete'] = true;
|
||||||
$messages[] = serendipity_deleteImage($serendipity['GET']['fid']);
|
$messages[] = serendipity_deleteImage($serendipity['GET']['fid']);
|
||||||
$messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . RIP_ENTRY . '</span>', $serendipity['GET']['fid']);
|
$messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . RIP_ENTRY . "</span>\n", $serendipity['GET']['fid']);
|
||||||
|
|
||||||
$data['showML'] = showMediaLibrary();
|
$data['showML'] = showMediaLibrary();
|
||||||
$data['messages'] = $messages;
|
$data['messages'] = $messages;
|
||||||
unset($messages);
|
unset($messages);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case 'doMultiDelete':
|
case 'doMultiDelete':
|
||||||
if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete')) {
|
if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete')) {
|
||||||
break;
|
break;
|
||||||
@ -81,7 +94,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$image = serendipity_fetchImageFromDatabase($id);
|
$image = serendipity_fetchImageFromDatabase($id);
|
||||||
$messages[] = serendipity_deleteImage((int)$id);
|
$messages[] = serendipity_deleteImage((int)$id);
|
||||||
$messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . RIP_ENTRY . '</span>', $image['id'] . ' - ' . serendipity_specialchars($image['realname']));
|
$messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . RIP_ENTRY . "</span>\n", $image['id'] . ' - ' . serendipity_specialchars($image['realname']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data['showML'] = showMediaLibrary();
|
$data['showML'] = showMediaLibrary();
|
||||||
@ -108,10 +121,48 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'multidelete':
|
case 'multidelete':
|
||||||
if (!serendipity_checkFormToken() || !is_array($serendipity['POST']['multiDelete'])) {
|
if (!serendipity_checkFormToken()) {
|
||||||
|
return; // blank content page, but default token check parameter is presenting a XSRF message when false
|
||||||
|
}
|
||||||
|
if (!is_array($serendipity['POST']['multiDelete']) && isset($_POST['toggle_move'])) {
|
||||||
|
echo '<div class="msg_notice"><span class="icon-attention-circled"></span> ' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '</div>'."\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (is_array($serendipity['POST']['multiDelete']) && isset($serendipity['POST']['oldDir']) && empty($serendipity['POST']['newDir']) && isset($_POST['toggle_move'])) {
|
||||||
|
echo '<div class="msg_notice"><span class="icon-attention-circled"></span> ' . sprintf(MULTICHECK_NO_DIR, $_SERVER['HTTP_REFERER']) . '</div>'."\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// case bulk multimove (leave the fake oldDir being send as an empty dir)
|
||||||
|
if (isset($serendipity['POST']['oldDir']) && !empty($serendipity['POST']['newDir'])) {
|
||||||
|
$messages = array();
|
||||||
|
$multiMoveImages = $serendipity['POST']['multiDelete']; // The 'multiDelete' key name should better be renamed to 'multiCheck', but this would need to change 2k11/admin/serendipity_editor.js, images.inc.tpl, media_items.tpl, media_pane.tpl and this file
|
||||||
|
unset($serendipity['POST']['multiDelete']);
|
||||||
|
|
||||||
|
$oDir = ''; // oldDir is relative to Uploads/, since we can not specify a directory of a ML bulk move directly
|
||||||
|
$nDir = serendipity_specialchars((string)$serendipity['POST']['newDir']); // relative to Uploads/
|
||||||
|
|
||||||
|
if ($oDir != $nDir) {
|
||||||
|
foreach($multiMoveImages AS $mkey => $move_id) {
|
||||||
|
$file = serendipity_fetchImageFromDatabase((int)$move_id);
|
||||||
|
$oDir = $file['path']; // this now is the exact oldDir path of this ID
|
||||||
|
if (serendipity_moveMediaDirectory($oDir, $nDir, 'file', (int)$move_id, $file)) {
|
||||||
|
$messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . MEDIA_DIRECTORY_MOVED . "</span>\n", $nDir);
|
||||||
|
} else {
|
||||||
|
$messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . MEDIA_DIRECTORY_MOVE_ERROR . "</span>\n", $nDir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$data['messages'] = $messages;
|
||||||
|
unset($messages);
|
||||||
|
// remember to return to last selected media library directory
|
||||||
|
serendipity_restoreVar($serendipity['COOKIE']['serendipity_only_path'], $serendipity['GET']['only_path']);
|
||||||
|
// fall back
|
||||||
|
$data['case_default'] = true;
|
||||||
|
$data['showML'] = showMediaLibrary(true); // the true drives us back to selected directory :)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// case bulk multidelete
|
||||||
$ids = '';
|
$ids = '';
|
||||||
$data['rip_image'] = array();
|
$data['rip_image'] = array();
|
||||||
$data['case_multidelete'] = true;
|
$data['case_multidelete'] = true;
|
||||||
@ -131,19 +182,22 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'rename':
|
case 'rename':
|
||||||
$data['case_rename'] = true;
|
|
||||||
$serendipity['GET']['fid'] = (int)$serendipity['GET']['fid'];
|
$serendipity['GET']['fid'] = (int)$serendipity['GET']['fid'];
|
||||||
$file = serendipity_fetchImageFromDatabase($serendipity['GET']['fid']);
|
$file = serendipity_fetchImageFromDatabase($serendipity['GET']['fid']);
|
||||||
$serendipity['GET']['newname'] = serendipity_uploadSecure($serendipity['GET']['newname'], true);
|
|
||||||
|
|
||||||
if (!is_array($file) || !serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete') || (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) {
|
if (LANG_CHARSET == 'UTF-8') {
|
||||||
|
// yeah, turn on content to be a real utf-8 string, which it isn't at this point! Else serendipity_makeFilename() can not work!
|
||||||
|
$serendipity['GET']['newname'] = utf8_encode($serendipity['GET']['newname']);
|
||||||
|
}
|
||||||
|
$serendipity['GET']['newname'] = str_replace(' ', '_', $serendipity['GET']['newname']); // keep serendipity_uploadSecure(URL) whitespace convert behaviour, when using serendipity_makeFilename()
|
||||||
|
$serendipity['GET']['newname'] = serendipity_uploadSecure(serendipity_makeFilename($serendipity['GET']['newname']), true);
|
||||||
|
|
||||||
|
if (!is_array($file) || !serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete') ||
|
||||||
|
(!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// since this is a javascript action only, all event success/error action messages have moved into js
|
||||||
if (!serendipity_moveMediaDirectory(null, $serendipity['GET']['newname'], 'file', $serendipity['GET']['fid'], $file)) {
|
serendipity_moveMediaDirectory(null, $serendipity['GET']['newname'], 'file', $serendipity['GET']['fid'], $file);
|
||||||
$data['go_back'] = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'properties':
|
case 'properties':
|
||||||
@ -159,14 +213,17 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
$data['case_add'] = true;
|
$data['case_add'] = true;
|
||||||
$messages = array();
|
$messages = array();
|
||||||
if ($serendipity['POST']['adminSubAction'] == 'properties') {
|
if ($serendipity['POST']['adminSubAction'] == 'properties') {
|
||||||
|
serendipity_restoreVar($serendipity['COOKIE']['serendipity_only_path'], $serendipity['GET']['only_path']); // restore last set directory path, see true parameter
|
||||||
$properties = serendipity_parsePropertyForm();
|
$properties = serendipity_parsePropertyForm();
|
||||||
$image_id = $properties['image_id'];
|
$image_id = $properties['image_id'];
|
||||||
$created_thumbnail = true;
|
$created_thumbnail = true; //??
|
||||||
$data['showML'] = showMediaLibrary($messages, true);
|
$data['showML'] = showMediaLibrary(true); // in this case we do not need the location.href (removed)
|
||||||
|
$propdone = sprintf(MEDIA_PROPERTIES_DONE, $image_id);
|
||||||
|
$data['messages'] = '<span class="msg_success"><span class="icon-ok-circled"></span> '.DONE.'! ' . $propdone . "</span>\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$messages[] = '<span class="msg_notice"><span class="icon-info-circled"></span> ' . ADDING_IMAGE . '</span>';
|
$messages[] = '<span class="msg_notice"><span class="icon-info-circled"></span> ' . ADDING_IMAGE . "</span>\n";
|
||||||
|
|
||||||
$authorid = 0; // Only use access-control based on media directories, not images themselves
|
$authorid = 0; // Only use access-control based on media directories, not images themselves
|
||||||
|
|
||||||
@ -174,7 +231,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
|
|
||||||
$serendipity['POST']['imageurl'] = serendipity_specialchars($serendipity['POST']['imageurl']);
|
$serendipity['POST']['imageurl'] = serendipity_specialchars($serendipity['POST']['imageurl']);
|
||||||
|
|
||||||
// First find out whether to fetch a file or accept an upload
|
// First find out whether to fetch a hotlink file or accept an upload
|
||||||
if ($serendipity['POST']['imageurl'] != '' && $serendipity['POST']['imageurl'] != 'http://') {
|
if ($serendipity['POST']['imageurl'] != '' && $serendipity['POST']['imageurl'] != 'http://') {
|
||||||
if (!empty($serendipity['POST']['target_filename'][2])) {
|
if (!empty($serendipity['POST']['target_filename'][2])) {
|
||||||
// Faked hidden form 2 when submitting with JavaScript
|
// Faked hidden form 2 when submitting with JavaScript
|
||||||
@ -189,10 +246,11 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
$tindex = 1;
|
$tindex = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tfile = serendipity_uploadSecure(basename($tfile));
|
$tfile = str_replace(' ', '_', basename($tfile)); // keep serendipity_uploadSecure(URL) whitespace convert behaviour, when using serendipity_makeFilename()
|
||||||
|
$tfile = serendipity_uploadSecure(serendipity_makeFilename($tfile));
|
||||||
|
|
||||||
if (serendipity_isActiveFile($tfile)) {
|
if (serendipity_isActiveFile($tfile)) {
|
||||||
$messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_FORBIDDEN . '</span>', $tfile);
|
$messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_FORBIDDEN . "</span>\n", $tfile);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,13 +258,13 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
$target = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex] . $tfile;
|
$target = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex] . $tfile;
|
||||||
|
|
||||||
if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$tindex])) {
|
if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$tindex])) {
|
||||||
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . PERM_DENIED . '</span>';
|
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . PERM_DENIED . "</span>\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$realname = $tfile;
|
$realname = $tfile;
|
||||||
if (file_exists($target)) {
|
if (file_exists($target)) {
|
||||||
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . '</span>';
|
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "</span>\n";
|
||||||
$realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex]);
|
$realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,10 +273,10 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
serendipity_plugin_api::hook_event('backend_http_request', $options, 'image');
|
serendipity_plugin_api::hook_event('backend_http_request', $options, 'image');
|
||||||
serendipity_request_start();
|
serendipity_request_start();
|
||||||
$req = new HTTP_Request($serendipity['POST']['imageurl'], $options);
|
$req = new HTTP_Request($serendipity['POST']['imageurl'], $options);
|
||||||
// Try to get the URL
|
|
||||||
|
|
||||||
|
// Try to get the URL
|
||||||
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
|
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
|
||||||
$messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . REMOTE_FILE_NOT_FOUND . '</span>', $serendipity['POST']['imageurl']);
|
$messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . REMOTE_FILE_NOT_FOUND . "</span>\n", $serendipity['POST']['imageurl']);
|
||||||
} else {
|
} else {
|
||||||
// Fetch file
|
// Fetch file
|
||||||
$fContent = $req->getResponseBody();
|
$fContent = $req->getResponseBody();
|
||||||
@ -230,14 +288,14 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
$image_id = @serendipity_insertHotlinkedImageInDatabase($tfile, $serendipity['POST']['imageurl'], $authorid, null, $tempfile);
|
$image_id = @serendipity_insertHotlinkedImageInDatabase($tfile, $serendipity['POST']['imageurl'], $authorid, null, $tempfile);
|
||||||
$messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . HOTLINK_DONE . '</span>', $serendipity['POST']['imageurl'] , $tfile .'');
|
$messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . HOTLINK_DONE . "</span>\n", $serendipity['POST']['imageurl'] , $tfile .'');
|
||||||
serendipity_plugin_api::hook_event('backend_image_addHotlink', $tempfile);
|
serendipity_plugin_api::hook_event('backend_image_addHotlink', $tempfile);
|
||||||
} else {
|
} else {
|
||||||
$fp = fopen($target, 'w');
|
$fp = fopen($target, 'w');
|
||||||
fwrite($fp, $fContent);
|
fwrite($fp, $fContent);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
$messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . FILE_FETCHED . '</span>', $serendipity['POST']['imageurl'] , $tfile . '');
|
$messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . FILE_FETCHED . "</span>\n", $serendipity['POST']['imageurl'] , $tfile . '');
|
||||||
|
|
||||||
if (serendipity_checkMediaSize($target)) {
|
if (serendipity_checkMediaSize($target)) {
|
||||||
$thumbs = array(array(
|
$thumbs = array(array(
|
||||||
@ -249,7 +307,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
foreach($thumbs as $thumb) {
|
foreach($thumbs as $thumb) {
|
||||||
// Create thumbnail
|
// Create thumbnail
|
||||||
if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$tindex], $thumb['thumbSize'], $thumb['thumb']) ) {
|
if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$tindex], $thumb['thumbSize'], $thumb['thumb']) ) {
|
||||||
$messages[] = '<span class="msg_success"><span class="icon-ok-circled"></span> ' . THUMB_CREATED_DONE . '</span>';
|
$messages[] = '<span class="msg_success"><span class="icon-ok-circled"></span> ' . THUMB_CREATED_DONE . "</span>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,17 +349,18 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tfile = serendipity_uploadSecure(basename($tfile));
|
$tfile = str_replace(' ', '_', basename($tfile)); // keep serendipity_uploadSecure(URL) whitespace convert behaviour, when using serendipity_makeFilename()
|
||||||
|
$tfile = serendipity_uploadSecure(serendipity_makeFilename($tfile));
|
||||||
|
|
||||||
if (serendipity_isActiveFile($tfile)) {
|
if (serendipity_isActiveFile($tfile)) {
|
||||||
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_FORBIDDEN .' '. $tfile . '</span>';
|
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_FORBIDDEN .' '. $tfile . "</span>\n";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$serendipity['POST']['target_directory'][$idx] = serendipity_uploadSecure($serendipity['POST']['target_directory'][$idx], true, true);
|
$serendipity['POST']['target_directory'][$idx] = serendipity_uploadSecure($serendipity['POST']['target_directory'][$idx], true, true);
|
||||||
|
|
||||||
if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$idx])) {
|
if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$idx])) {
|
||||||
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . PERM_DENIED . '</span>';
|
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . PERM_DENIED . "</span>\n";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,13 +368,13 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
|
|
||||||
$realname = $tfile;
|
$realname = $tfile;
|
||||||
if (file_exists($target)) {
|
if (file_exists($target)) {
|
||||||
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . '</span>';
|
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "</span>\n";
|
||||||
$realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$idx]);
|
$realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Accept file
|
// Accept file
|
||||||
if (is_uploaded_file($uploadtmp) && serendipity_checkMediaSize($uploadtmp) && move_uploaded_file($uploadtmp, $target)) {
|
if (is_uploaded_file($uploadtmp) && serendipity_checkMediaSize($uploadtmp) && move_uploaded_file($uploadtmp, $target)) {
|
||||||
$messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . FILE_UPLOADED . '</span>', $uploadfile , $target);
|
$messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . FILE_UPLOADED . "</span>\n", $uploadfile , $target);
|
||||||
@umask(0000);
|
@umask(0000);
|
||||||
@chmod($target, 0664);
|
@chmod($target, 0664);
|
||||||
|
|
||||||
@ -328,7 +387,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
foreach($thumbs as $thumb) {
|
foreach($thumbs as $thumb) {
|
||||||
// Create thumbnail
|
// Create thumbnail
|
||||||
if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$idx], $thumb['thumbSize'], $thumb['thumb']) ) {
|
if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$idx], $thumb['thumbSize'], $thumb['thumb']) ) {
|
||||||
$messages[] = '<span class="msg_success"><span class="icon-ok-circled"></span> ' . THUMB_CREATED_DONE . '</span>';
|
$messages[] = '<span class="msg_success"><span class="icon-ok-circled"></span> ' . THUMB_CREATED_DONE . "</span>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +402,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
} else {
|
} else {
|
||||||
// necessary for the ajax-uplaoder to show upload errors
|
// necessary for the ajax-uplaoder to show upload errors
|
||||||
header("Internal Server Error", true, 500);
|
header("Internal Server Error", true, 500);
|
||||||
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_UNKNOWN_NOUPLOAD . '</span>';
|
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_UNKNOWN_NOUPLOAD . "</span>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,12 +419,12 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
foreach($new_media AS $nm) {
|
foreach($new_media AS $nm) {
|
||||||
serendipity_insertMediaProperty('base_hidden', '', $nm['image_id'], $hidden);
|
serendipity_insertMediaProperty('base_hidden', '', $nm['image_id'], $hidden);
|
||||||
}
|
}
|
||||||
$data['showML'] = showMediaLibrary(null, true);
|
$data['showML'] = showMediaLibrary(true);
|
||||||
}
|
}
|
||||||
$data['messages'] = $messages;
|
$data['messages'] = $messages;
|
||||||
|
unset($messages);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case 'directoryDoDelete':
|
case 'directoryDoDelete':
|
||||||
if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDirectories')) {
|
if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDirectories')) {
|
||||||
return;
|
return;
|
||||||
@ -396,6 +455,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data['case_directoryEdit'] = true;
|
$data['case_directoryEdit'] = true;
|
||||||
|
|
||||||
$use_dir = serendipity_uploadSecure($serendipity['GET']['dir']);
|
$use_dir = serendipity_uploadSecure($serendipity['GET']['dir']);
|
||||||
$checkpath = array(
|
$checkpath = array(
|
||||||
array(
|
array(
|
||||||
@ -408,17 +468,21 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($serendipity['POST']['save'])) {
|
if (!empty($serendipity['POST']['save'])) {
|
||||||
$newDir = serendipity_uploadSecure(serendipity_makeFilename($serendipity['POST']['newDir']));
|
// preserve moving subdir directories to serendipity_makeFilename(), preserves dir/subdir/ for example
|
||||||
$oldDir = serendipity_uploadSecure($serendipity['POST']['oldDir']);
|
$_newDir = $serendipity['POST']['newDir'];
|
||||||
|
$newfile = serendipity_makeFilename(basename($_newDir));
|
||||||
|
$newDir = (dirname($_newDir) != '.') ? dirname($_newDir) . '/' . $newfile : $newfile;
|
||||||
|
$oldDir = serendipity_uploadSecure($serendipity['POST']['oldDir']);
|
||||||
|
|
||||||
if ($oldDir != $newDir) {
|
if ($oldDir != $newDir) {
|
||||||
//is this possible?
|
//is this possible? Ian: YES! Change an already set directory.
|
||||||
ob_start();
|
ob_start();
|
||||||
serendipity_moveMediaDirectory($oldDir, $newDir);
|
serendipity_moveMediaDirectory($oldDir, $newDir);
|
||||||
$data['ob_serendipity_moveMediaDirectory'] = ob_get_contents();
|
$data['messages'] = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$use_dir = $newDir;
|
$use_dir = $newDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
serendipity_ACLGrant(0, 'directory', 'read', $serendipity['POST']['read_authors'], $use_dir);
|
serendipity_ACLGrant(0, 'directory', 'read', $serendipity['POST']['read_authors'], $use_dir);
|
||||||
serendipity_ACLGrant(0, 'directory', 'write', $serendipity['POST']['write_authors'], $use_dir);
|
serendipity_ACLGrant(0, 'directory', 'write', $serendipity['POST']['write_authors'], $use_dir);
|
||||||
$data['print_SETTINGS_SAVED_AT'] = sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S'));
|
$data['print_SETTINGS_SAVED_AT'] = sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S'));
|
||||||
@ -462,6 +526,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data['case_directoryDoCreate'] = true;
|
$data['case_directoryDoCreate'] = true;
|
||||||
|
|
||||||
$new_dir = serendipity_uploadSecure($serendipity['POST']['parent'] . '/' . serendipity_makeFilename($serendipity['POST']['name']), true);
|
$new_dir = serendipity_uploadSecure($serendipity['POST']['parent'] . '/' . serendipity_makeFilename($serendipity['POST']['name']), true);
|
||||||
$new_dir = str_replace(array('..', '//'), array('', '/'), $new_dir);
|
$new_dir = str_replace(array('..', '//'), array('', '/'), $new_dir);
|
||||||
|
|
||||||
@ -619,15 +684,25 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['case_scale'] = true;
|
$data['case_scale'] = true; // this allows to use the showML fallback too
|
||||||
$data['print_SCALING_IMAGE'] = sprintf(
|
if ($serendipity['GET']['width'] == $file['dimensions_width'] && $serendipity['GET']['height'] == $file['dimensions_height']) {
|
||||||
SCALING_IMAGE,
|
$data['messages'] = '<span class="msg_notice"><span class="icon-info-circled"></span> ' . MEDIA_RESIZE_EXISTS . '</span>';
|
||||||
$file['path'] . $file['name'] .'.'. $file['extension'],
|
} else {
|
||||||
(int)$serendipity['GET']['width'],
|
$data['print_SCALING_IMAGE'] = sprintf(
|
||||||
(int)$serendipity['GET']['height']
|
SCALING_IMAGE,
|
||||||
);
|
$file['path'] . $file['name'] .'.'. $file['extension'],
|
||||||
$data['extraParems'] = serendipity_generateImageSelectorParems();
|
(int)$serendipity['GET']['width'],
|
||||||
$data['print_serendipity_scaleImg'] = serendipity_scaleImg($serendipity['GET']['fid'], $serendipity['GET']['width'], $serendipity['GET']['height']);
|
(int)$serendipity['GET']['height']
|
||||||
|
);
|
||||||
|
$data['extraParems'] = serendipity_generateImageSelectorParems();
|
||||||
|
$scaleImg = serendipity_scaleImg($serendipity['GET']['fid'], $serendipity['GET']['width'], $serendipity['GET']['height']);
|
||||||
|
if (!empty($scaleImg) && is_string($scaleImg)) {
|
||||||
|
$data['scaleImgError'] = $scaleImg;
|
||||||
|
}
|
||||||
|
$data['is_done'] = true;
|
||||||
|
}
|
||||||
|
// fall back
|
||||||
|
$data['showML'] = showMediaLibrary();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'scaleSelect':
|
case 'scaleSelect':
|
||||||
@ -637,7 +712,7 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['extraParems'] = serendipity_generateImageSelectorParems("form");
|
$data['extraParems'] = serendipity_generateImageSelectorParems('form');
|
||||||
$data['case_scaleSelect'] = true;
|
$data['case_scaleSelect'] = true;
|
||||||
$s = getimagesize($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $file['name'] . ($file['extension'] ? '.'. $file['extension'] : ""));
|
$s = getimagesize($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $file['name'] . ($file['extension'] ? '.'. $file['extension'] : ""));
|
||||||
$data['img_width'] = $s[0];
|
$data['img_width'] = $s[0];
|
||||||
@ -675,55 +750,20 @@ switch ($serendipity['GET']['adminAction']) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
serendipity_restoreVar($serendipity['COOKIE']['serendipity_only_path'], $serendipity['GET']['only_path']);
|
|
||||||
$data['case_default'] = true;
|
$data['case_default'] = true;
|
||||||
$data['showML'] = showMediaLibrary();
|
$data['showML'] = showMediaLibrary();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
function showMediaLibrary($messages=false, $addvar_check = false, $smarty_vars = array()) {
|
|
||||||
global $serendipity;
|
|
||||||
|
|
||||||
if (!serendipity_checkPermission('adminImagesView')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$output = "";
|
|
||||||
|
|
||||||
// After upload, do not show the list to be able to proceed to
|
|
||||||
// media selection.
|
|
||||||
if ($addvar_check && !empty($GLOBALS['image_selector_addvars'])) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($serendipity['thumbPerPage'])) {
|
|
||||||
$serendipity['thumbPerPage'] = 2;
|
|
||||||
}
|
|
||||||
$smarty_vars = array(
|
|
||||||
'textarea' => isset($serendipity['GET']['textarea']) ? $serendipity['GET']['textarea'] : false,
|
|
||||||
'htmltarget' => isset($serendipity['GET']['htmltarget']) ? $serendipity['GET']['htmltarget'] : '',
|
|
||||||
'filename_only' => isset($serendipity['GET']['filename_only']) ? $serendipity['GET']['filename_only'] : false,
|
|
||||||
);
|
|
||||||
|
|
||||||
$show_upload = isset($serendipity['GET']['showUpload']) ? $serendipity['GET']['showUpload'] : false;
|
|
||||||
|
|
||||||
$output .= serendipity_displayImageList(
|
|
||||||
isset($serendipity['GET']['page']) ? $serendipity['GET']['page'] : 1,
|
|
||||||
$serendipity['thumbPerPage'],
|
|
||||||
isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true,
|
|
||||||
NULL,
|
|
||||||
$show_upload,
|
|
||||||
NULL,
|
|
||||||
$smarty_vars
|
|
||||||
);
|
|
||||||
return $output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($data['showML'])) {
|
if (! isset($data['showML'])) {
|
||||||
if (isset($_REQUEST['go_properties'])) {
|
if (isset($_REQUEST['go_properties'])) {
|
||||||
$data['showMLbutton'] = true;
|
$data['showMLbutton'] = true;
|
||||||
} else {
|
} else {
|
||||||
// always having the ML available is useful when switching the filter after adding an image, thus being in the add-case
|
// always having the ML available is useful when switching the filter after adding an image, thus being in the add-case (hotlink/upload)
|
||||||
$data['showML'] = showMediaLibrary();
|
if (isset($serendipity['POST']['imageurl'])) {
|
||||||
|
$data['showML'] = showMediaLibrary();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,20 +246,25 @@ $tasks = array(array('version' => '0.5.1',
|
|||||||
array('version' => '2.0.2',
|
array('version' => '2.0.2',
|
||||||
'function' => 'serendipity_removeDeadFiles_SPL',
|
'function' => 'serendipity_removeDeadFiles_SPL',
|
||||||
'title' => 'Removal of obsolete and still resting files in 2.0',
|
'title' => 'Removal of obsolete and still resting files in 2.0',
|
||||||
'arguments' => array(substr($serendipity['serendipityPath'], 0, -1), $dead_files_rest, array('internals'), true),
|
'arguments' => array(substr($serendipity['serendipityPath'], 0, -1), $dead_files_200, array('internals'), true),
|
||||||
'desc' => 'The following old dead files will additionally be removed from your system.<br><pre>' . implode(', ', $dead_files_rest) . '</pre>'),
|
'desc' => 'The following old dead files will be removed from your system.<br><pre>' . implode(', ', $dead_files_200) . '</pre>'),
|
||||||
|
|
||||||
array('version' => '2.0.2',
|
array('version' => '2.0.2',
|
||||||
'function' => 'recursive_directory_iterator',
|
'function' => 'recursive_directory_iterator',
|
||||||
'title' => 'Removal of obsolete and dead directories',
|
'title' => 'Removal of obsolete and dead directories',
|
||||||
'arguments' => array($dead_dirs_rest),
|
'arguments' => array($dead_dirs_200),
|
||||||
'desc' => 'The following old dead directories will additionally be removed from your system.<br><pre>' . implode(', ', $dead_dirs_rest) . '</pre>'),
|
'desc' => 'The following old dead directories will be removed from your system.<br><pre>' . implode(', ', $dead_dirs_200) . '</pre>'),
|
||||||
|
|
||||||
array('version' => '2.0.2',
|
array('version' => '2.0.2',
|
||||||
'function' => 'serendipity_upgrader_rewriteFeedIcon',
|
'function' => 'serendipity_upgrader_rewriteFeedIcon',
|
||||||
'title' => 'Rewrite path of big feedicon',
|
'title' => 'Rewrite path of big feedicon',
|
||||||
'desc' => 'Rewrite path of the big feedicon to not include the template path, since that path is not automatically detected'),
|
'desc' => 'Rewrite path of the big feedicon to not include the template path, since that path is not automatically detected'),
|
||||||
|
|
||||||
|
array('version' => '2.1.0',
|
||||||
|
'function' => 'serendipity_removeDeadFiles_SPL',
|
||||||
|
'title' => 'Removal of old dead files in v.2.0.2',
|
||||||
|
'arguments' => array(substr($serendipity['serendipityPath'], 0, -1), $dead_files_202, array('internals'), true),
|
||||||
|
'desc' => 'The following old dead files will be removed from your system.<br><pre>' . implode(', ', $dead_files_202) . '</pre>'),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ if (!function_exists('errorToExceptionHandler')) {
|
|||||||
// while being in tags like <select> to push on top of page, else return non javascript use $str just there
|
// while being in tags like <select> to push on top of page, else return non javascript use $str just there
|
||||||
// sadly we can not use HEREDOC notation here, since this does not execute the javascript after finished writing
|
// sadly we can not use HEREDOC notation here, since this does not execute the javascript after finished writing
|
||||||
echo "\n".'<script>
|
echo "\n".'<script>
|
||||||
if(typeof errorHandlerCreateDOM == "function") {
|
if (typeof errorHandlerCreateDOM == "function") {
|
||||||
var fragment = window.top.errorHandlerCreateDOM("Error redirect: '.addslashes($str).'");
|
var fragment = window.top.errorHandlerCreateDOM("Error redirect: '.addslashes($str).'");
|
||||||
document.body.insertBefore(fragment, document.body.childNodes[0]);
|
document.body.insertBefore(fragment, document.body.childNodes[0]);
|
||||||
}' . "\n</script>\n<noscript>" . $str . "</noscript>\n";
|
}' . "\n</script>\n<noscript>" . $str . "</noscript>\n";
|
||||||
|
@ -239,7 +239,7 @@ function serendipity_db_reconnect() {
|
|||||||
* Prepares a Serendipty query input to fully valid SQL. Replaces certain "template" variables.
|
* Prepares a Serendipty query input to fully valid SQL. Replaces certain "template" variables.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string SQL query with template variables to convert
|
* @param string SQL query with template variables to convert
|
||||||
* @return ressource SQL ressource handle of the executed query
|
* @return ressource SQL ressource handle of the executed query
|
||||||
*/
|
*/
|
||||||
function serendipity_db_schema_import($query) {
|
function serendipity_db_schema_import($query) {
|
||||||
|
@ -13,16 +13,16 @@ if (defined('S9Y_FRAMEWORK_FUNCTIONS')) {
|
|||||||
|
|
||||||
$serendipity['imageList'] = array();
|
$serendipity['imageList'] = array();
|
||||||
|
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/db/db.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/db/db.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/compat.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/compat.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/functions_config.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/functions_config.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/plugin_api.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/functions_images.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/functions_images.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/functions_installer.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/functions_installer.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/functions_entries.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/functions_entries.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/functions_comments.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/functions_comments.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/functions_permalinks.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/functions_permalinks.inc.php');
|
||||||
include_once(S9Y_INCLUDE_PATH . "include/functions_smarty.inc.php");
|
include_once(S9Y_INCLUDE_PATH . 'include/functions_smarty.inc.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Truncate a string to a specific length, multibyte aware. Appends '...' if successfully truncated
|
* Truncate a string to a specific length, multibyte aware. Appends '...' if successfully truncated
|
||||||
|
@ -254,18 +254,16 @@ function serendipity_set_user_var($name, $val, $authorid, $copy_to_s9y = true) {
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string The filename to search for in the selected template
|
* @param string The filename to search for in the selected template
|
||||||
* @param string The path selector that tells whether to return a HTTP or realpath
|
* @param string The path selector that tells whether to return a HTTP or realpath
|
||||||
* @param bool Enable to include frontend template fallback chaining (used for wysiwyg Editor custom config files)
|
* @param bool Enable to include frontend template fallback chaining (used for wysiwyg Editor custom config files, emoticons, etc)
|
||||||
|
* @param bool Enable to check into $serendipity['template'] or its engine, then fall back to $this->pluginFile dir (used by plugins via parseTemplate() method)
|
||||||
* @return string The full path+filename to the requested file
|
* @return string The full path+filename to the requested file
|
||||||
*/
|
*/
|
||||||
function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force_frontend_fallback = false) {
|
function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force_frontend_fallback = false, $simple_plugin_fallback = false) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
$directories = array();
|
$directories = array();
|
||||||
|
|
||||||
if (defined('IN_serendipity_admin') && $serendipity['smarty_preview'] == false) {
|
if (defined('IN_serendipity_admin') && $serendipity['smarty_preview'] == false) {
|
||||||
// Backend will always use our default backend (=defaultTemplate) as fallback.
|
|
||||||
$directories[] = isset($serendipity['template_backend']) ? $serendipity['template_backend'] . '/' : '';
|
|
||||||
|
|
||||||
if ($force_frontend_fallback) {
|
if ($force_frontend_fallback) {
|
||||||
// If enabled, even when within the admin suite it will be possible to reference files that
|
// If enabled, even when within the admin suite it will be possible to reference files that
|
||||||
// reside within a frontend-only template directory.
|
// reside within a frontend-only template directory.
|
||||||
@ -278,8 +276,12 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$directories[] = $serendipity['defaultTemplate'] .'/';
|
if (!$simple_plugin_fallback) {
|
||||||
$directories[] = 'default/';
|
// Backend will always use our default backend (=defaultTemplate) as fallback.
|
||||||
|
$directories[] = isset($serendipity['template_backend']) ? $serendipity['template_backend'] . '/' : '';
|
||||||
|
$directories[] = $serendipity['defaultTemplate'] .'/';
|
||||||
|
$directories[] = 'default/';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$directories[] = isset($serendipity['template']) ? $serendipity['template'] . '/' : '';
|
$directories[] = isset($serendipity['template']) ? $serendipity['template'] . '/' : '';
|
||||||
if (isset($serendipity['template_engine']) && $serendipity['template_engine'] != null) {
|
if (isset($serendipity['template_engine']) && $serendipity['template_engine'] != null) {
|
||||||
@ -289,11 +291,13 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Frontend templates currently need to fall back to "default" (see "idea"), so that they get the
|
if (!$simple_plugin_fallback) {
|
||||||
// output they desire. If templates are based on 2k11, the need to set "Engine: 2k11" in their info.txt
|
// Frontend templates currently need to fall back to "default" (see "idea"), so that they get the
|
||||||
// file.
|
// output they desire. If templates are based on 2k11, they need to set "Engine: 2k11" in their info.txt
|
||||||
$directories[] = 'default/';
|
// file.
|
||||||
$directories[] = $serendipity['defaultTemplate'] .'/';
|
$directories[] = 'default/';
|
||||||
|
$directories[] = $serendipity['defaultTemplate'] .'/';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($directories as $directory) {
|
foreach ($directories as $directory) {
|
||||||
@ -957,7 +961,7 @@ function serendipity_probeInstallation($item) {
|
|||||||
* Sets a HTTP header
|
* Sets a HTTP header
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string The HTTP headre to set
|
* @param string The HTTP header to set
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function serendipity_header($header) {
|
function serendipity_header($header) {
|
||||||
@ -1055,7 +1059,7 @@ function serendipity_getPostAuthSessionLanguage() {
|
|||||||
if ($serendipity['expose_s9y']) serendipity_header('X-Serendipity-InterfaceLangSource: Database');
|
if ($serendipity['expose_s9y']) serendipity_header('X-Serendipity-InterfaceLangSource: Database');
|
||||||
$lang = $serendipity['lang'];
|
$lang = $serendipity['lang'];
|
||||||
} else {
|
} else {
|
||||||
$lang = (isset($_SESSION['serendipityLanguage']))?$_SESSION['serendipityLanguage']:$serendipity['lang'];
|
$lang = (isset($_SESSION['serendipityLanguage'])) ? $_SESSION['serendipityLanguage'] : $serendipity['lang'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($serendipity['languages'][$lang])) {
|
if (!isset($serendipity['languages'][$lang])) {
|
||||||
|
@ -144,7 +144,9 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
|
|||||||
|
|
||||||
$template_vars['entry_template'] = serendipity_getTemplateFile('admin/entries.tpl', 'serendipityPath');
|
$template_vars['entry_template'] = serendipity_getTemplateFile('admin/entries.tpl', 'serendipityPath');
|
||||||
|
|
||||||
serendipity_smarty_init();
|
if (!is_object($serendipity['smarty'])) {
|
||||||
|
serendipity_smarty_init();
|
||||||
|
}
|
||||||
$serendipity['smarty']->registerPlugin('modifier', 'emit_htmlarea_code', 'serendipity_emit_htmlarea_code');
|
$serendipity['smarty']->registerPlugin('modifier', 'emit_htmlarea_code', 'serendipity_emit_htmlarea_code');
|
||||||
$serendipity['smarty']->assign('admin_view', 'entryform');
|
$serendipity['smarty']->assign('admin_view', 'entryform');
|
||||||
serendipity_plugin_api::hook_event('backend_entryform_smarty', $template_vars);
|
serendipity_plugin_api::hook_event('backend_entryform_smarty', $template_vars);
|
||||||
@ -153,7 +155,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
|
|||||||
}
|
}
|
||||||
|
|
||||||
function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
|
function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
|
||||||
# init == true when already editor was already initialized
|
# init == true when editor was already initialized
|
||||||
static $init = false;
|
static $init = false;
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
|
@ -36,11 +36,11 @@ function serendipity_isActiveFile($file) {
|
|||||||
* @access public
|
* @access public
|
||||||
* @param int The offset to start fetching media files
|
* @param int The offset to start fetching media files
|
||||||
* @param int How many items to fetch
|
* @param int How many items to fetch
|
||||||
* @param int The number (referenced varaible) of fetched items
|
* @param int The number (referenced variable) of fetched items
|
||||||
* @param string The "ORDER BY" sql part when fetching items
|
* @param string The "ORDER BY" sql part when fetching items
|
||||||
* @param string Order by DESC or ASC
|
* @param string Order by DESC or ASC
|
||||||
* @param string Only fetch files from a specific directory
|
* @param string Only fetch files from a specific directory
|
||||||
* @param string Only fetch specific filenames
|
* @param string Only fetch specific filenames (including check for realname match)
|
||||||
* @param string Only fetch media with specific keyword
|
* @param string Only fetch media with specific keyword
|
||||||
* @param array An array of restricting filter sets
|
* @param array An array of restricting filter sets
|
||||||
* @param boolean Apply strict directory checks, or include subdirectories?
|
* @param boolean Apply strict directory checks, or include subdirectories?
|
||||||
@ -322,7 +322,7 @@ function serendipity_deleteImage($id) {
|
|||||||
$file = serendipity_fetchImageFromDatabase($id);
|
$file = serendipity_fetchImageFromDatabase($id);
|
||||||
|
|
||||||
if (!is_array($file)) {
|
if (!is_array($file)) {
|
||||||
$messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . FILE_NOT_FOUND . '</span>', $id);
|
$messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . FILE_NOT_FOUND . "</span>\n", $id);
|
||||||
//return false;
|
//return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -344,9 +344,9 @@ function serendipity_deleteImage($id) {
|
|||||||
if (!$file['hotlink']) {
|
if (!$file['hotlink']) {
|
||||||
if (file_exists($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
|
if (file_exists($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
|
||||||
if (@unlink($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
|
if (@unlink($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
|
||||||
$messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETE_FILE . '</span>', $dFile);
|
$messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETE_FILE . "</span>\n", $dFile);
|
||||||
} else {
|
} else {
|
||||||
$messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . DELETE_FILE_FAIL . '</span>', $dFile);
|
$messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . DELETE_FILE_FAIL . "</span>\n", $dFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
serendipity_plugin_api::hook_event('backend_media_delete', $dThumb);
|
serendipity_plugin_api::hook_event('backend_media_delete', $dThumb);
|
||||||
@ -355,14 +355,14 @@ function serendipity_deleteImage($id) {
|
|||||||
$dfThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dfnThumb;
|
$dfThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dfnThumb;
|
||||||
|
|
||||||
if (@unlink($dfThumb)) {
|
if (@unlink($dfThumb)) {
|
||||||
$messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETE_THUMBNAIL . '</span>', $dfnThumb);
|
$messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETE_THUMBNAIL . "</span>\n", $dfnThumb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . FILE_NOT_FOUND . '</span>', $dFile);
|
$messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . FILE_NOT_FOUND . "</span>\n", $dFile);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$messages .= sprintf('<span class="msg_hint"><span class="icon-help-circled"></span> ' . DELETE_HOTLINK_FILE . '</span>', $file['name']);
|
$messages .= sprintf('<span class="msg_hint"><span class="icon-help-circled"></span> ' . DELETE_HOTLINK_FILE . "</span>\n", $file['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}images WHERE id = ". (int)$id);
|
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}images WHERE id = ". (int)$id);
|
||||||
@ -494,8 +494,8 @@ function serendipity_insertHotlinkedImageInDatabase($filename, $url, $authorid =
|
|||||||
|
|
||||||
$sql = serendipity_db_query($query);
|
$sql = serendipity_db_query($query);
|
||||||
if (is_string($sql)) {
|
if (is_string($sql)) {
|
||||||
echo '<span class="block_level">' . $query . '</span>';
|
echo '<span class="block_level">' . $query . "</span>\n";
|
||||||
echo '<span class="block_level">' . $sql . '</span>';
|
echo '<span class="block_level">' . $sql . "</span>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$image_id = serendipity_db_insert_id('images', 'id');
|
$image_id = serendipity_db_insert_id('images', 'id');
|
||||||
@ -540,7 +540,6 @@ function serendipity_insertImageInDatabase($filename, $directory, $authorid = 0,
|
|||||||
$height = $fdim[1];
|
$height = $fdim[1];
|
||||||
$mime = $fdim['mime'];
|
$mime = $fdim['mime'];
|
||||||
|
|
||||||
|
|
||||||
$query = sprintf(
|
$query = sprintf(
|
||||||
"INSERT INTO {$serendipity['dbPrefix']}images (
|
"INSERT INTO {$serendipity['dbPrefix']}images (
|
||||||
name,
|
name,
|
||||||
@ -582,8 +581,8 @@ function serendipity_insertImageInDatabase($filename, $directory, $authorid = 0,
|
|||||||
|
|
||||||
$sql = serendipity_db_query($query);
|
$sql = serendipity_db_query($query);
|
||||||
if (is_string($sql)) {
|
if (is_string($sql)) {
|
||||||
echo '<span class="block_level">' . $query . '</span>';
|
echo '<span class="block_level">' . $query . "</span>\n";
|
||||||
echo '<span class="block_level">' . $sql . '</span>';
|
echo '<span class="block_level">' . $sql . "</span>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$image_id = serendipity_db_insert_id('images', 'id');
|
$image_id = serendipity_db_insert_id('images', 'id');
|
||||||
@ -594,7 +593,6 @@ function serendipity_insertImageInDatabase($filename, $directory, $authorid = 0,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a thumbnail for an image
|
* Create a thumbnail for an image
|
||||||
*
|
*
|
||||||
@ -677,7 +675,7 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb
|
|||||||
}
|
}
|
||||||
exec($cmd, $output, $result);
|
exec($cmd, $output, $result);
|
||||||
if ($result != 0) {
|
if ($result != 0) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n";
|
||||||
$r = false; // return failure
|
$r = false; // return failure
|
||||||
} else {
|
} else {
|
||||||
touch($outfile);
|
touch($outfile);
|
||||||
@ -720,13 +718,17 @@ function serendipity_scaleImg($id, $width, $height) {
|
|||||||
$cmd = escapeshellcmd($serendipity['convert']) . ' -scale ' . serendipity_escapeshellarg($width . 'x' . $height) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile);
|
$cmd = escapeshellcmd($serendipity['convert']) . ' -scale ' . serendipity_escapeshellarg($width . 'x' . $height) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile);
|
||||||
exec($cmd, $output, $result);
|
exec($cmd, $output, $result);
|
||||||
if ( $result != 0 ) {
|
if ( $result != 0 ) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n";
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
unset($output, $result);
|
unset($output, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
serendipity_updateImageInDatabase(array('dimensions_width' => $width, 'dimensions_height' => $height, 'size' => @filesize($outfile)), $id);
|
if ($result == 0) {
|
||||||
return true;
|
serendipity_updateImageInDatabase(array('dimensions_width' => $width, 'dimensions_height' => $height, 'size' => @filesize($outfile)), $id);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -767,7 +769,7 @@ function serendipity_rotateImg($id, $degrees) {
|
|||||||
$cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile);
|
$cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile);
|
||||||
exec($cmd, $output, $result);
|
exec($cmd, $output, $result);
|
||||||
if ( $result != 0 ) {
|
if ( $result != 0 ) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n";
|
||||||
}
|
}
|
||||||
unset($output, $result);
|
unset($output, $result);
|
||||||
|
|
||||||
@ -775,7 +777,7 @@ function serendipity_rotateImg($id, $degrees) {
|
|||||||
$cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infileThumb) . ' ' . serendipity_escapeshellarg($outfileThumb);
|
$cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infileThumb) . ' ' . serendipity_escapeshellarg($outfileThumb);
|
||||||
exec($cmd, $output, $result);
|
exec($cmd, $output, $result);
|
||||||
if ( $result != 0 ) {
|
if ( $result != 0 ) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n";
|
||||||
}
|
}
|
||||||
unset($output, $result);
|
unset($output, $result);
|
||||||
|
|
||||||
@ -788,7 +790,6 @@ function serendipity_rotateImg($id, $degrees) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates thumbnails for all images in the upload dir
|
* Creates thumbnails for all images in the upload dir
|
||||||
*
|
*
|
||||||
@ -829,13 +830,14 @@ function serendipity_generateThumbs() {
|
|||||||
if ($returnsize !== false ) {
|
if ($returnsize !== false ) {
|
||||||
// Only print the resize message the first time
|
// Only print the resize message the first time
|
||||||
if (!$msg_printed) {
|
if (!$msg_printed) {
|
||||||
printf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . RESIZE_BLAHBLAH, THUMBNAIL_SHORT . '</span>');
|
$resizemedia = sprintf(RESIZE_BLAHBLAH, THUMBNAIL_SHORT);
|
||||||
|
printf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . $resizemedia . "</span>\n");
|
||||||
echo "\n" . '<ul class="serendipityFileList">' . "\n";
|
echo "\n" . '<ul class="serendipityFileList">' . "\n";
|
||||||
$msg_printed = true;
|
$msg_printed = true;
|
||||||
}
|
}
|
||||||
echo '<li>' . $sThumb . ': ' . $returnsize['width'] . 'x' . $returnsize['height'] . "</li>\n";
|
echo '<li>' . $sThumb . ': ' . $returnsize['width'] . 'x' . $returnsize['height'] . "</li>\n";
|
||||||
if (!file_exists($newThumb)) {
|
if (!file_exists($newThumb)) {
|
||||||
printf('<li><span class="msg_error"><span class="icon-attention"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb);
|
printf('<li><span class="msg_error"><span class="icon-attention-circled"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb);
|
||||||
} else {
|
} else {
|
||||||
$update = true;
|
$update = true;
|
||||||
}
|
}
|
||||||
@ -843,7 +845,7 @@ function serendipity_generateThumbs() {
|
|||||||
} elseif (!file_exists($oldThumb) && !file_exists($newThumb) && $fdim[0] <= $serendipity['thumbSize'] && $fdim[1] <= $serendipity['thumbSize']) {
|
} elseif (!file_exists($oldThumb) && !file_exists($newThumb) && $fdim[0] <= $serendipity['thumbSize'] && $fdim[1] <= $serendipity['thumbSize']) {
|
||||||
if (!$msg_printed) {
|
if (!$msg_printed) {
|
||||||
$resizethumb = sprintf(RESIZE_BLAHBLAH, THUMB);
|
$resizethumb = sprintf(RESIZE_BLAHBLAH, THUMB);
|
||||||
printf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . $resizethumb . '</span>');
|
printf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . $resizethumb . "</span>\n");
|
||||||
echo "\n" . '<ul class="serendipityFileList">' . "\n";
|
echo "\n" . '<ul class="serendipityFileList">' . "\n";
|
||||||
$msg_printed = true;
|
$msg_printed = true;
|
||||||
}
|
}
|
||||||
@ -852,7 +854,7 @@ function serendipity_generateThumbs() {
|
|||||||
printf('<li>' . THUMBNAIL_USING_OWN . '</li>' . "\n", $sThumb);
|
printf('<li>' . THUMBNAIL_USING_OWN . '</li>' . "\n", $sThumb);
|
||||||
$update = true;
|
$update = true;
|
||||||
} else {
|
} else {
|
||||||
printf('<li><span class="msg_error"><span class="icon-attention"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb);
|
printf('<li><span class="msg_error"><span class="icon-attention-circled"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1104,7 +1106,7 @@ function serendipity_syncThumbs($deleteThumbs = false) {
|
|||||||
$f = serendipity_parseFileName($files[$x]);
|
$f = serendipity_parseFileName($files[$x]);
|
||||||
if (empty($f[1]) || $f[1] == $files[$x]) {
|
if (empty($f[1]) || $f[1] == $files[$x]) {
|
||||||
// No extension means bad file most probably. Skip it.
|
// No extension means bad file most probably. Skip it.
|
||||||
printf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . SKIPPING_FILE_EXTENSION . '</span>', $files[$x]);
|
printf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . SKIPPING_FILE_EXTENSION . "</span>\n", $files[$x]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1118,7 +1120,7 @@ function serendipity_syncThumbs($deleteThumbs = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!is_readable($ffull) || filesize($ffull) == 0) {
|
if (!is_readable($ffull) || filesize($ffull) == 0) {
|
||||||
printf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . SKIPPING_FILE_UNREADABLE . '</span>', $files[$x]);
|
printf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . SKIPPING_FILE_UNREADABLE . "</span>\n", $files[$x]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1297,7 +1299,6 @@ function serendipity_rotate_image_gd($infilename, $outfilename, $degrees)
|
|||||||
return array($newwidth, $newheight);
|
return array($newwidth, $newheight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resize an image (GDLib)
|
* Resize an image (GDLib)
|
||||||
*
|
*
|
||||||
@ -1364,7 +1365,7 @@ function serendipity_resize_image_gd($infilename, $outfilename, $newwidth, $newh
|
|||||||
* @param int Image height
|
* @param int Image height
|
||||||
* @param int Target dimension size
|
* @param int Target dimension size
|
||||||
* @param string Dimension to constrain ('width', 'height', 'largest',
|
* @param string Dimension to constrain ('width', 'height', 'largest',
|
||||||
'smallest'; defaults to original behavior, 'largest')
|
* 'smallest'; defaults to original behavior, 'largest')
|
||||||
* @return array An array with the scaled width and height
|
* @return array An array with the scaled width and height
|
||||||
*/
|
*/
|
||||||
function serendipity_calculate_aspect_size($width, $height, $size, $constraint = null) {
|
function serendipity_calculate_aspect_size($width, $height, $size, $constraint = null) {
|
||||||
@ -1451,7 +1452,8 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
|
|||||||
global $serendipity;
|
global $serendipity;
|
||||||
static $debug = false;
|
static $debug = false;
|
||||||
|
|
||||||
$extraParems = serendipity_generateImageSelectorParems();
|
$extraParems = serendipity_generateImageSelectorParems();
|
||||||
|
$rootDirStrict = ($serendipity['GET']['toggle_dir'] == 'yes') ? true : false; // default
|
||||||
|
|
||||||
$serendipity['GET']['only_path'] = serendipity_uploadSecure($limit_path . $serendipity['GET']['only_path'], true);
|
$serendipity['GET']['only_path'] = serendipity_uploadSecure($limit_path . $serendipity['GET']['only_path'], true);
|
||||||
$serendipity['GET']['only_filename'] = serendipity_specialchars(str_replace(array('*', '?'), array('%', '_'), $serendipity['GET']['only_filename']));
|
$serendipity['GET']['only_filename'] = serendipity_specialchars(str_replace(array('*', '?'), array('%', '_'), $serendipity['GET']['only_filename']));
|
||||||
@ -1604,12 +1606,16 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
|
|||||||
(isset($serendipity['GET']['only_path']) ? $serendipity['GET']['only_path'] : ''),
|
(isset($serendipity['GET']['only_path']) ? $serendipity['GET']['only_path'] : ''),
|
||||||
(isset($serendipity['GET']['only_filename']) ? $serendipity['GET']['only_filename'] : ''),
|
(isset($serendipity['GET']['only_filename']) ? $serendipity['GET']['only_filename'] : ''),
|
||||||
(isset($serendipity['GET']['keywords']) ? $serendipity['GET']['keywords'] : ''),
|
(isset($serendipity['GET']['keywords']) ? $serendipity['GET']['keywords'] : ''),
|
||||||
(isset($serendipity['GET']['filter']) ? $serendipity['GET']['filter'] : '')
|
(isset($serendipity['GET']['filter']) ? $serendipity['GET']['filter'] : ''),
|
||||||
|
$rootDirStrict
|
||||||
);
|
);
|
||||||
|
|
||||||
$pages = ceil($totalImages / $perPage);
|
$pages = ceil($totalImages / $perPage);
|
||||||
$linkPrevious = '?' . $extraParems . 'serendipity[page]=' . ($page-1);
|
$linkPrevious = '?' . $extraParems . '&serendipity[page]=' . ($page-1);
|
||||||
$linkNext = '?' . $extraParems . 'serendipity[page]=' . ($page+1);
|
$linkNext = '?' . $extraParems . '&serendipity[page]=' . ($page+1);
|
||||||
|
// Keep the inner to be build first. Now add first and last. Has to do with adding $param to $extraParems.
|
||||||
|
$linkFirst = '?' . $extraParems . '&serendipity[page]=' . 1;
|
||||||
|
$linkLast = '?' . $extraParems . '&serendipity[page]=' . $pages;
|
||||||
if (is_null($lineBreak)) {
|
if (is_null($lineBreak)) {
|
||||||
$lineBreak = floor(750 / ($serendipity['thumbSize'] + 20));
|
$lineBreak = floor(750 / ($serendipity['thumbSize'] + 20));
|
||||||
}
|
}
|
||||||
@ -1651,11 +1657,14 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
|
|||||||
'show_upload' => $show_upload,
|
'show_upload' => $show_upload,
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
'pages' => $pages,
|
'pages' => $pages,
|
||||||
|
'linkFirst' => $linkFirst,
|
||||||
'linkNext' => $linkNext,
|
'linkNext' => $linkNext,
|
||||||
'linkPrevious' => $linkPrevious,
|
'linkPrevious' => $linkPrevious,
|
||||||
|
'linkLast' => $linkLast,
|
||||||
'extraParems' => $extraParems,
|
'extraParems' => $extraParems,
|
||||||
'totalImages' => $totalImages
|
'totalImages' => $totalImages
|
||||||
));
|
));
|
||||||
|
|
||||||
return serendipity_showMedia(
|
return serendipity_showMedia(
|
||||||
$serendipity['imageList'],
|
$serendipity['imageList'],
|
||||||
$paths,
|
$paths,
|
||||||
@ -1667,12 +1676,13 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
|
|||||||
);
|
);
|
||||||
} // End serendipity_displayImageList()
|
} // End serendipity_displayImageList()
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the url-parameters needed when generating the ML to select an image to add to the editor, to store the relevant options (like which textarea to add it to)
|
* Generate the url-parameters needed when generating the ML to select an image to add to the editor,
|
||||||
|
* to store the relevant options (like which textarea to add it to)
|
||||||
*
|
*
|
||||||
|
* @param string Url or Form format
|
||||||
*/
|
*/
|
||||||
function serendipity_generateImageSelectorParems($format="url") {
|
function serendipity_generateImageSelectorParems($format = 'url') {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
$sortParams = array('perpage', 'order', 'ordermode');
|
$sortParams = array('perpage', 'order', 'ordermode');
|
||||||
@ -1713,19 +1723,18 @@ function serendipity_generateImageSelectorParems($format="url") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($parems as $param => $value) {
|
foreach ($parems as $param => $value) {
|
||||||
if ($format == "form") {
|
if ($format == "form") {
|
||||||
$extraParems .= '<input type="hidden" name="'. $param .'" value="'. serendipity_specialchars($value) .'" />';
|
$extraParems .= '<input type="hidden" name="'. $param .'" value="'. serendipity_specialchars($value) .'">'."\n";
|
||||||
} else {
|
} else {
|
||||||
$extraParems .= $param.'='. serendipity_specialchars($value) .'&';
|
$extraParems .= $param.'='. serendipity_specialchars($value) .'&';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $extraParems;
|
return rtrim($extraParems, '&');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a media item is an image
|
* Check if a media item is an image
|
||||||
*
|
*
|
||||||
@ -1807,12 +1816,12 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) {
|
|||||||
if ($serious && @unlink($basedir . $file)) {
|
if ($serious && @unlink($basedir . $file)) {
|
||||||
printf('<li><span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETING_FILE . ' ' . DONE . "</span></li>\n", $file);
|
printf('<li><span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETING_FILE . ' ' . DONE . "</span></li>\n", $file);
|
||||||
} else {
|
} else {
|
||||||
printf('<li><span class="msg_error"><span class="icon-attention"></span> ' . DELETING_FILE . ' ' . ERROR . "</span></li>\n", $file);
|
printf('<li><span class="msg_error"><span class="icon-attention-circled"></span> ' . DELETING_FILE . ' ' . ERROR . "</span></li>\n", $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</ul>\n";
|
echo "</ul>\n";
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . ERROR_DIRECTORY_NOT_EMPTY . '</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_DIRECTORY_NOT_EMPTY . "</span>\n";
|
||||||
echo "<ul>\n";
|
echo "<ul>\n";
|
||||||
foreach($filestack AS $f => $file) {
|
foreach($filestack AS $f => $file) {
|
||||||
echo '<li>' . $file . "</li>\n";
|
echo '<li>' . $file . "</li>\n";
|
||||||
@ -1826,7 +1835,7 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) {
|
|||||||
printf(DIRECTORY_DELETE_SUCCESS, $directory);
|
printf(DIRECTORY_DELETE_SUCCESS, $directory);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(DIRECTORY_DELETE_FAILED, $directory);
|
printf(DIRECTORY_DELETE_FAILED, $directory);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
}
|
}
|
||||||
@ -1835,7 +1844,6 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively walk a directory tree
|
* Recursively walk a directory tree
|
||||||
*
|
*
|
||||||
@ -2011,7 +2019,8 @@ function serendipity_getimagesize($file, $ft_mime = '', $suf = '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the available fields of the media database
|
* Get the available fields of the media database, except name,
|
||||||
|
* since this is handled extra and hardcoded as 'only_filename'
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return array Array with available, sortable fields
|
* @return array Array with available, sortable fields
|
||||||
@ -2023,10 +2032,10 @@ function serendipity_getImageFields() {
|
|||||||
$x = array(
|
$x = array(
|
||||||
'i.date' => array('desc' => SORT_ORDER_DATE,
|
'i.date' => array('desc' => SORT_ORDER_DATE,
|
||||||
'type' => 'date'
|
'type' => 'date'
|
||||||
),
|
)/*,
|
||||||
|
|
||||||
'i.name' => array('desc' => SORT_ORDER_NAME
|
'i.name' => array('desc' => SORT_ORDER_NAME
|
||||||
),
|
),*/
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2034,10 +2043,10 @@ function serendipity_getImageFields() {
|
|||||||
$x = array(
|
$x = array(
|
||||||
'i.date' => array('desc' => SORT_ORDER_DATE,
|
'i.date' => array('desc' => SORT_ORDER_DATE,
|
||||||
'type' => 'date'
|
'type' => 'date'
|
||||||
),
|
),/*,
|
||||||
|
|
||||||
'i.name' => array('desc' => SORT_ORDER_NAME
|
'i.name' => array('desc' => SORT_ORDER_NAME
|
||||||
),
|
),*/
|
||||||
|
|
||||||
'i.authorid' => array('desc' => AUTHOR,
|
'i.authorid' => array('desc' => AUTHOR,
|
||||||
'type' => 'authors'
|
'type' => 'authors'
|
||||||
@ -2206,7 +2215,7 @@ function serendipity_directoryACL(&$paths, $type = 'read') {
|
|||||||
if ($granted === false) {
|
if ($granted === false) {
|
||||||
// We are not allowed to access this element
|
// We are not allowed to access this element
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ACL for ' . $info['relpath'] . " DENIED.</span>";
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ACL for ' . $info['relpath'] . " DENIED.</span>";
|
||||||
}
|
}
|
||||||
unset($paths[$idx]);
|
unset($paths[$idx]);
|
||||||
} else {
|
} else {
|
||||||
@ -2218,7 +2227,7 @@ function serendipity_directoryACL(&$paths, $type = 'read') {
|
|||||||
|
|
||||||
if (count($paths) < $startCount) {
|
if (count($paths) < $startCount) {
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ACL denied all.</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ACL denied all.</span>';
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2227,7 +2236,7 @@ function serendipity_directoryACL(&$paths, $type = 'read') {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build the name of a thumbnail image file.
|
* Build the name of a thumbnail image file.
|
||||||
*
|
*
|
||||||
* @author MTG
|
* @author MTG
|
||||||
@ -2330,7 +2339,7 @@ function serendipity_showPropertyForm(&$new_media, $keywordsPerBlock = 3, $is_ed
|
|||||||
if (isset($GLOBALS['image_selector_addvars']) && is_array($GLOBALS['image_selector_addvars'])) {
|
if (isset($GLOBALS['image_selector_addvars']) && is_array($GLOBALS['image_selector_addvars'])) {
|
||||||
// These variables may come from serendipity_admin_image_selector.php to show embedded upload form
|
// These variables may come from serendipity_admin_image_selector.php to show embedded upload form
|
||||||
foreach($GLOBALS['image_selector_addvars'] AS $imgsel_key => $imgsel_val) {
|
foreach($GLOBALS['image_selector_addvars'] AS $imgsel_key => $imgsel_val) {
|
||||||
$editform_hidden .= ' <input type="hidden" name="serendipity[' . serendipity_specialchars($imgsel_key) . ']" value="' . serendipity_specialchars($imgsel_val) . '" />' . "\n";
|
$editform_hidden .= ' <input type="hidden" name="serendipity[' . serendipity_specialchars($imgsel_key) . ']" value="' . serendipity_specialchars($imgsel_val) . '">' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2891,9 +2900,13 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin
|
|||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
$form_hidden = '';
|
$form_hidden = '';
|
||||||
foreach($serendipity['GET'] AS $g_key => $g_val) {
|
// do not add, if not for the default media list form
|
||||||
if (!is_array($g_val) && $g_key != 'page') {
|
if (($serendipity['GET']['adminAction'] == 'default' || empty($serendipity['GET']['adminAction'])) && !$serendipity['GET']['fid']) {
|
||||||
$form_hidden .= '<input type="hidden" name="serendipity[' . $g_key . ']" value="' . serendipity_specialchars($g_val) . '" />';
|
foreach($serendipity['GET'] AS $g_key => $g_val) {
|
||||||
|
// do not add token, since this is assigned separately to properties and list forms
|
||||||
|
if (!is_array($g_val) && $g_key != 'page' && $g_key != 'token') {
|
||||||
|
$form_hidden .= ' <input type="hidden" name="serendipity[' . $g_key . ']" value="' . serendipity_specialchars($g_val) . '">'."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2907,7 +2920,7 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin
|
|||||||
'lineBreakP' => round(1/$lineBreak*100),
|
'lineBreakP' => round(1/$lineBreak*100),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'enclose' => $enclose,
|
'enclose' => $enclose,
|
||||||
'zoomIMG' => serendipity_getTemplateFile('admin/img/big_zoom.png'),
|
/* 'zoomIMG' => serendipity_getTemplateFile('admin/img/big_zoom.png'),
|
||||||
'renameIMG' => serendipity_getTemplateFile('admin/img/big_rename.png'),
|
'renameIMG' => serendipity_getTemplateFile('admin/img/big_rename.png'),
|
||||||
'resizeIMG' => serendipity_getTemplateFile('admin/img/big_resize.png'),
|
'resizeIMG' => serendipity_getTemplateFile('admin/img/big_resize.png'),
|
||||||
'rotatecwIMG' => serendipity_getTemplateFile('admin/img/big_rotate_cw.png'),
|
'rotatecwIMG' => serendipity_getTemplateFile('admin/img/big_rotate_cw.png'),
|
||||||
@ -2915,36 +2928,29 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin
|
|||||||
'configureIMG' => serendipity_getTemplateFile('admin/img/configure.png'),
|
'configureIMG' => serendipity_getTemplateFile('admin/img/configure.png'),
|
||||||
'deleteIMG' => serendipity_getTemplateFile('admin/img/big_delete.png'),
|
'deleteIMG' => serendipity_getTemplateFile('admin/img/big_delete.png'),
|
||||||
'prevIMG' => serendipity_getTemplateFile('admin/img/previous.png'),
|
'prevIMG' => serendipity_getTemplateFile('admin/img/previous.png'),
|
||||||
'nextIMG' => serendipity_getTemplateFile('admin/img/next.png'),
|
'nextIMG' => serendipity_getTemplateFile('admin/img/next.png'),*/
|
||||||
'token' => serendipity_setFormToken(),
|
'token' => serendipity_setFormToken(),
|
||||||
'form_hidden' => $form_hidden,
|
'form_hidden' => $form_hidden,
|
||||||
'blimit_path' => empty($smarty_vars['limit_path']) ? '':basename($smarty_vars['limit_path']),
|
'blimit_path' => empty($smarty_vars['limit_path']) ? '' : basename($smarty_vars['limit_path']),
|
||||||
'only_path' => $serendipity['GET']['only_path'],
|
'only_path' => $serendipity['GET']['only_path'],
|
||||||
'only_filename' => $serendipity['GET']['only_filename'],
|
'only_filename' => $serendipity['GET']['only_filename'],
|
||||||
'sortorder' => $serendipity['GET']['sortorder'],
|
'sortorder' => $serendipity['GET']['sortorder'],
|
||||||
'keywords_selected' => $serendipity['GET']['keywords'],
|
'keywords_selected' => $serendipity['GET']['keywords'],
|
||||||
'filter' => $serendipity['GET']['filter'],
|
'filter' => $serendipity['GET']['filter'],
|
||||||
'sort_order' => serendipity_getImageFields(),
|
'sort_order' => serendipity_getImageFields(),
|
||||||
|
'simpleFilters' => $serendipity['simpleFilters'],
|
||||||
|
'toggle_dir' => empty($serendipity['GET']['toggle_dir']) ? 'no' : $serendipity['GET']['toggle_dir'],
|
||||||
'authors' => serendipity_fetchUsers(),
|
'authors' => serendipity_fetchUsers(),
|
||||||
'sort_row_interval' => array(8, 16, 50, 100),
|
'sort_row_interval' => array(8, 16, 50, 100),
|
||||||
'nr_files' => count($file),
|
'nr_files' => count($file),
|
||||||
'keywords' => explode(';', $serendipity['mediaKeywords']),
|
'keywords' => explode(';', $serendipity['mediaKeywords']),
|
||||||
'thumbSize' => $serendipity['thumbSize'],
|
'thumbSize' => $serendipity['thumbSize'],
|
||||||
'sortParams' => array('perpage', 'order', 'ordermode'),
|
'sortParams' => array('perpage', 'order', 'ordermode')
|
||||||
'filterParams' => array('only_path', 'only_filename')
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
foreach($media['sortParams'] AS $sortParam) {
|
|
||||||
$serendipity['smarty']->assign(array("get_sortorder_$sortParam" => $serendipity['GET']['sortorder'][$sortParam]));
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($media['filterParams'] AS $filterParam) {
|
|
||||||
$serendipity['smarty']->assign(array("$filterParam" => $serendipity['GET'][$filterParam]));
|
|
||||||
}
|
|
||||||
|
|
||||||
$media = array_merge($media, $smarty_vars);
|
$media = array_merge($media, $smarty_vars);
|
||||||
$media['files'] =& $file;
|
$media['files'] =& $file;
|
||||||
|
|
||||||
if (count($paths) > 0) {
|
if (count($paths) > 0) {
|
||||||
$media['paths'] =& $paths;
|
$media['paths'] =& $paths;
|
||||||
} else {
|
} else {
|
||||||
@ -3322,7 +3328,7 @@ function serendipity_checkMediaSize($file) {
|
|||||||
|
|
||||||
if (!empty($serendipity['maxFileSize'])) {
|
if (!empty($serendipity['maxFileSize'])) {
|
||||||
if (filesize($file) > $serendipity['maxFileSize']) {
|
if (filesize($file) > $serendipity['maxFileSize']) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(MEDIA_UPLOAD_SIZEERROR . '<br />', (int)$serendipity['maxFileSize']);
|
printf(MEDIA_UPLOAD_SIZEERROR . '<br />', (int)$serendipity['maxFileSize']);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
return false;
|
return false;
|
||||||
@ -3337,7 +3343,7 @@ function serendipity_checkMediaSize($file) {
|
|||||||
|
|
||||||
if (!empty($serendipity['maxImgWidth'])) {
|
if (!empty($serendipity['maxImgWidth'])) {
|
||||||
if ($dim[0] > $serendipity['maxImgWidth']) {
|
if ($dim[0] > $serendipity['maxImgWidth']) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(MEDIA_UPLOAD_DIMERROR . '<br />', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']);
|
printf(MEDIA_UPLOAD_DIMERROR . '<br />', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
return false;
|
return false;
|
||||||
@ -3346,7 +3352,7 @@ function serendipity_checkMediaSize($file) {
|
|||||||
|
|
||||||
if (!empty($serendipity['maxImgHeight'])) {
|
if (!empty($serendipity['maxImgHeight'])) {
|
||||||
if ($dim[1] > $serendipity['maxImgHeight']) {
|
if ($dim[1] > $serendipity['maxImgHeight']) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(MEDIA_UPLOAD_DIMERROR . '<br />', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']);
|
printf(MEDIA_UPLOAD_DIMERROR . '<br />', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
return false;
|
return false;
|
||||||
@ -3360,43 +3366,65 @@ function serendipity_checkMediaSize($file) {
|
|||||||
/**
|
/**
|
||||||
* Moves a media directory
|
* Moves a media directory
|
||||||
*
|
*
|
||||||
* @param string The old directory
|
* @param string The old directory.
|
||||||
|
* This can be NULL or (an empty / a) STRING for re-name/multiCheck move comparison events
|
||||||
* @param string The new directory
|
* @param string The new directory
|
||||||
* @param string The type of what to remove (dir|file|filedir)
|
* @param string The type of what to remove (dir|file|filedir)
|
||||||
* @param string An item id of a file
|
* @param string An item id of a file
|
||||||
|
* @param array Result of serendipity_fetchImageFromDatabase($id)
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_id = null, $file = null) {
|
function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_id = null, $file = null) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
$real_oldDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir;
|
// paranoid case for updating an old image id entry - else we have a new entry incrementary
|
||||||
$real_newDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir;
|
if (is_null($item_id) && isset($file['id']) && $file['id'] > 0) $item_id = $file['id'];
|
||||||
|
|
||||||
|
if (!$item_id || $item_id < 1) {
|
||||||
|
// only print message if not posting a case_directoryEdit submit
|
||||||
|
if (empty($serendipity['POST']['save'])) {
|
||||||
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
|
printf(ERROR_FILE_NOT_EXISTS, $item_id);
|
||||||
|
echo "</span>\n";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prepare data for the database, any hooks and the real file move, by case AREA:
|
||||||
|
// DIR = Media directory form edit,
|
||||||
|
// FILE = File rename or File bulk move,
|
||||||
|
// FILEDIR = Media properties form edit
|
||||||
|
|
||||||
|
// images.inc case 'directoryEdit', which is ML Directories form, via ML case 'directorySelect'
|
||||||
if ($type == 'dir') {
|
if ($type == 'dir') {
|
||||||
|
|
||||||
|
$real_oldDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir;
|
||||||
|
$real_newDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir;
|
||||||
|
|
||||||
if (!is_dir($real_oldDir)) {
|
if (!is_dir($real_oldDir)) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(ERROR_FILE_NOT_EXISTS, '<span class="block_level">' . $oldDir . '</span>');
|
printf(ERROR_FILE_NOT_EXISTS, $oldDir);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_dir($real_newDir)) {
|
if (is_dir($real_newDir)) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(ERROR_FILE_EXISTS, '<span class="block_level">' . $newDir . '</span>');
|
printf(ERROR_FILE_EXISTS, $newDir);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rename($real_oldDir, $real_newDir)) {
|
if (!rename($real_oldDir, $real_newDir)) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(MEDIA_DIRECTORY_MOVE_ERROR, '<span class="block_level">' . $newDir . '</span>');
|
printf(MEDIA_DIRECTORY_MOVE_ERROR, $newDir);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<span class="msg_success"><span class="icon-ok-circled"></span> ';
|
echo '<span class="msg_success"><span class="icon-ok-circled"></span> ';
|
||||||
printf(MEDIA_DIRECTORY_MOVED, '<span class="block_level">' . $newDir . '</span>');
|
printf(MEDIA_DIRECTORY_MOVED, $newDir);
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
|
|
||||||
$dirs = serendipity_db_query("SELECT id, path
|
$dirs = serendipity_db_query("SELECT id, path
|
||||||
@ -3429,77 +3457,203 @@ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_i
|
|||||||
AND artifact_index = '" . serendipity_db_escape_string($dir['artifact_index']) . "'");
|
AND artifact_index = '" . serendipity_db_escape_string($dir['artifact_index']) . "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// hook into staticpage for the renaming regex replacements
|
||||||
|
// first and last two are null - only differ by being set already by their default var for the last two
|
||||||
|
$renameValues = array(array(
|
||||||
|
'from' => null,
|
||||||
|
'to' => null,
|
||||||
|
'thumb' => $serendipity['thumbSuffix'],
|
||||||
|
'fthumb' => null,
|
||||||
|
'oldDir' => $oldDir,
|
||||||
|
'newDir' => $newDir,
|
||||||
|
'type' => $type,
|
||||||
|
'item_id' => $item_id,
|
||||||
|
'file' => $file
|
||||||
|
));
|
||||||
|
// Changing a ML directory via directoryEdit needs to run through entries too!
|
||||||
|
serendipity_plugin_api::hook_event('backend_media_rename', $renameValues);
|
||||||
|
|
||||||
if ($type == 'file') {
|
// case 'rename' OR 'multidelete' (bulk multimove)
|
||||||
|
} else if ($type == 'file') {
|
||||||
|
|
||||||
|
// active in mean of eval or executable
|
||||||
if (serendipity_isActiveFile(basename($newDir))) {
|
if (serendipity_isActiveFile(basename($newDir))) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ';
|
||||||
printf(ERROR_FILE_FORBIDDEN, serendipity_specialchars($newDir));
|
printf(ERROR_FILE_FORBIDDEN, serendipity_specialchars($newDir));
|
||||||
echo "</span>\n";
|
echo "</span>\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!empty($file['hotlink'])) {
|
||||||
if ($file['hotlink']) {
|
$newHotlinkFile = (false === strpos($newDir, $file['extension'])) ? $newDir . (empty($file['extension']) ? '' : '.' . $file['extension']) : $newDir;
|
||||||
serendipity_updateImageInDatabase(array('realname' => $newDir, 'name' => $newDir), $item_id);
|
serendipity_updateImageInDatabase(array('realname' => $newHotlinkFile, 'name' => $newDir), $item_id);
|
||||||
} else {
|
} else {
|
||||||
$file_new = $file['path'] . $newDir . (empty($file['extension']) ? '' : '.');
|
$parts = pathinfo($newDir);
|
||||||
$file_old = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.');
|
|
||||||
|
|
||||||
$newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_new . $file['extension'];
|
// build new, thumb and old file names relative to Serendipity root path
|
||||||
$oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_old . $file['extension'];
|
if ($oldDir === null && $newDir != 'uploadRoot') {
|
||||||
if ($newDir != '' && file_exists($oldfile) && !file_exists($newfile)) {
|
|
||||||
$renameValues = array(array(
|
|
||||||
'from' => $oldfile,
|
|
||||||
'to' => $newfile,
|
|
||||||
'thumb' => $serendipity['thumbSuffix'],
|
|
||||||
'fthumb' => $file['thumbnail_name'],
|
|
||||||
'oldDir' => $oldDir,
|
|
||||||
'newDir' => $newDir,
|
|
||||||
'type' => $type,
|
|
||||||
'item_id'=> $item_id,
|
|
||||||
'file' => $file
|
|
||||||
));
|
|
||||||
|
|
||||||
serendipity_plugin_api::hook_event('backend_media_rename', $renameValues);
|
// case single file re-name event (newDir = newName is passed without path!)
|
||||||
|
$newName = $newDir; // for better readability
|
||||||
|
// do we really need this?
|
||||||
|
if ($parts['extension'] != $file['extension']) {
|
||||||
|
$file_new = $file['path'] . $newName . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
$file_old = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
} else {
|
||||||
|
$file_new = $file['path'] . $newName;
|
||||||
|
$file_old = $file['path'] . $file['name'];
|
||||||
|
}
|
||||||
|
// build full thumb file names
|
||||||
|
$file_newthumb = $file['path'] . $newName . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
$file_oldthumb = $file['path'] . $file['name'] . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
$newThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_newthumb;
|
||||||
|
$oldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_oldthumb;
|
||||||
|
|
||||||
// Rename file
|
} else {
|
||||||
rename($renameValues[0]['from'], $renameValues[0]['to']);
|
|
||||||
|
|
||||||
foreach($renameValues AS $renameData) {
|
// case bulkmove event (newDir is passed inclusive path! and normally w/o the filename, but we better check this though)
|
||||||
// Rename thumbnail
|
$newDir = ($newDir == 'uploadRoot') ? '' : $newDir; // Take care: remove temporary 'uploadRoot' string, in case of moving a subdir file into upload root by bulkmove
|
||||||
@rename($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $file['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']),
|
$_newDir = str_replace($file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']), '', $newDir);
|
||||||
$serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $newDir . (!empty($file['thumbnail_name']) ? '.' . $renameData['thumb'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']));
|
// do we really need this?
|
||||||
|
if ($parts['extension'] != $file['extension']) {
|
||||||
|
$file_new = $_newDir . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
$file_old = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
} else {
|
||||||
|
$file_new = $_newDir . $file['name'];
|
||||||
|
$file_old = $file['path'] . $file['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
serendipity_updateImageInDatabase(array('thumbnail_name' => $renameValues[0]['thumb'], 'realname' => $newDir, 'name' => $newDir), $item_id);
|
}
|
||||||
$oldDir = $file_old;
|
|
||||||
$newDir = $file_new;
|
// build full origin and new file path names
|
||||||
$real_oldDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir;
|
$newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_new;
|
||||||
$real_newDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir;
|
$oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_old;
|
||||||
// Forward user to overview (we don't want the user's back button to rename things again)
|
|
||||||
|
// check files existence
|
||||||
|
if (file_exists($oldfile) && !file_exists($newfile)) {
|
||||||
|
|
||||||
|
// for the paranoid, securely check these build filenames again, since we really need a real file set to continue!
|
||||||
|
$newparts = pathinfo($newfile);
|
||||||
|
if ($newparts['dirname'] == '.' || (!empty($file['extension']) && empty($newparts['extension'])) || empty($newparts['filename'])) {
|
||||||
|
// error new file build mismatch
|
||||||
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $newfile . ' ' . ERROR_SOMETHING . "</span>\n";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Case re-name event, keeping a possible moved directory name for a single file
|
||||||
|
if ($oldDir === null) {
|
||||||
|
// Move the origin file
|
||||||
|
@rename($oldfile, $newfile);
|
||||||
|
// do not re-name again, if item has no thumb name (eg zip object file case) and old thumb actually exists (possible missing pdf preview image on WinOS with IM)
|
||||||
|
if (($newThumb != $newfile) && file_exists($oldThumb)) {
|
||||||
|
// the thumb file
|
||||||
|
@rename($oldThumb, $newThumb); // Keep both rename() error disabled, since we have to avoid any output in renaiming cases
|
||||||
|
}
|
||||||
|
|
||||||
|
// hook into staticpage for the renaming regex replacements
|
||||||
|
$renameValues = array(array(
|
||||||
|
'from' => $oldfile,
|
||||||
|
'to' => $newfile,
|
||||||
|
'thumb' => $serendipity['thumbSuffix'],
|
||||||
|
'fthumb' => $file['thumbnail_name'],
|
||||||
|
'oldDir' => $oldDir,
|
||||||
|
'newDir' => $newDir,
|
||||||
|
'type' => $type,
|
||||||
|
'item_id' => $item_id,
|
||||||
|
'file' => $file
|
||||||
|
));
|
||||||
|
serendipity_plugin_api::hook_event('backend_media_rename', $renameValues);
|
||||||
|
|
||||||
|
// renaming filenames has to update mediaproperties if set
|
||||||
|
$q = "UPDATE {$serendipity['dbPrefix']}mediaproperties
|
||||||
|
SET value = '" . serendipity_db_escape_string($newName . (empty($file['extension']) ? '' : '.' . $file['extension'])) . "'
|
||||||
|
WHERE mediaid = " . (int)$item_id . ' AND property = "realname" AND value = "' . $file['realname'] . '"';
|
||||||
|
serendipity_db_query($q);
|
||||||
|
$q = "UPDATE {$serendipity['dbPrefix']}mediaproperties
|
||||||
|
SET value = '" . serendipity_db_escape_string($newName) . "'
|
||||||
|
WHERE mediaid = " . (int)$item_id . ' AND property = "name" AND value = "' . $file['name'] .'"';
|
||||||
|
serendipity_db_query($q);
|
||||||
|
$q = "UPDATE {$serendipity['dbPrefix']}mediaproperties
|
||||||
|
SET value = '" . serendipity_db_escape_string($newName . (empty($file['extension']) ? '' : '.' . $file['extension'])) . "'
|
||||||
|
WHERE mediaid = " . (int)$item_id . ' AND property = "TITLE" AND value = "' . $file['realname'] .'"';
|
||||||
|
serendipity_db_query($q);
|
||||||
|
|
||||||
|
serendipity_updateImageInDatabase(array('thumbnail_name' => $renameValues[0]['thumb'], 'realname' => $newName . (empty($file['extension']) ? '' : '.' . $file['extension']), 'name' => $newName), $item_id);
|
||||||
|
|
||||||
|
// Forward user to overview (we don't want the user's back button to rename things again) ?? What does this do? Check!!!
|
||||||
|
}
|
||||||
|
|
||||||
|
// Case Move or Bulkmove event
|
||||||
|
// newDir can now be used for the uploads directory root path too
|
||||||
|
// Do not allow an empty string or not set newDir for the build call so we do not conflict with rename calls, which are single files only and is done above
|
||||||
|
// BULKMOVE vars oldfile and newfile are fullpath based see above
|
||||||
|
elseif (!empty($newfile)) {
|
||||||
|
|
||||||
|
if ($newDir == 'uploadRoot') $newDir = ''; // now move back into root of /uploads dir
|
||||||
|
|
||||||
|
// hook into staticpage for the renaming regex replacements
|
||||||
|
$renameValues = array(array(
|
||||||
|
'from' => $oldfile,
|
||||||
|
'to' => $newfile,
|
||||||
|
'thumb' => $serendipity['thumbSuffix'],
|
||||||
|
'fthumb' => $file['thumbnail_name'],
|
||||||
|
'oldDir' => $oldDir,
|
||||||
|
'newDir' => $newDir,
|
||||||
|
'type' => $type,
|
||||||
|
'item_id' => $item_id,
|
||||||
|
'file' => $file
|
||||||
|
));
|
||||||
|
serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); // eg. for staticpage entries path regex replacements
|
||||||
|
|
||||||
|
// Move the origin file
|
||||||
|
try { rename($oldfile, $newfile); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; }
|
||||||
|
|
||||||
|
// do still need this? YES, it is definitely false, so we would not need the ternary
|
||||||
|
// Rename newDir + file name in case it is called by the Bulk Move and not by rename
|
||||||
|
$newDirFile = (false === strpos($newDir, $file['name'])) ? $newDir . $file['name'] : $newDir;
|
||||||
|
|
||||||
|
foreach($renameValues AS $renameData) {
|
||||||
|
// build full thumb file names
|
||||||
|
$thisOldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $renameData['oldDir'] . $file['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '.' . $serendipity['thumbSuffix']) . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
$thisNewThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDirFile . (!empty($file['thumbnail_name']) ? '.' . $renameData['thumb'] : '.' . $serendipity['thumbSuffix']) . (empty($file['extension']) ? '' : '.' . $file['extension']);
|
||||||
|
// Check for existent old thumb files first, to not need to disable rename by @rename()
|
||||||
|
if (($thisNewThumb != $newfile) && file_exists($thisOldThumb)) {
|
||||||
|
// the thumb file and catch any wrong renaming
|
||||||
|
try { rename($thisOldThumb, $thisNewThumb); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
serendipity_updateImageInDatabase(array('thumbnail_name' => $renameValues[0]['thumb'], 'path' => $newDir, 'realname' => $file['realname'], 'name' => $file['name']), $item_id);
|
||||||
|
// Forward user to overview (we don't want the user's back button to rename things again)
|
||||||
|
} else {
|
||||||
|
//void
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!file_exists($oldfile)) {
|
if (!file_exists($oldfile)) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . ERROR_FILE_NOT_EXISTS . '</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_NOT_EXISTS . "</span>\n";
|
||||||
} elseif (file_exists($newfile)) {
|
} elseif (file_exists($newfile)) {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . ERROR_FILE_EXISTS . '</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_EXISTS . "</span>\n";
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="msg_error"><span class="icon-attention"></span> ' . ERROR_SOMETHING . '</span>';
|
echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . "</span>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// used solely by serendipity_parsePropertyForm base_properties when changing the file selected path within mediaproperties form
|
||||||
} elseif ($type == 'filedir') {
|
} elseif ($type == 'filedir') {
|
||||||
|
|
||||||
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}images
|
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}images
|
||||||
SET path = '" . serendipity_db_escape_string($newDir) . "'
|
SET path = '" . serendipity_db_escape_string($newDir) . "'
|
||||||
WHERE id = " . (int)$item_id);
|
WHERE id = " . (int)$item_id);
|
||||||
$pick = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}images
|
$pick = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}images
|
||||||
WHERE id = " . (int)$item_id, true, 'assoc');
|
WHERE id = " . (int)$item_id, true, 'assoc');
|
||||||
|
|
||||||
// Move thumbs
|
// Move thumbs - Rebuild full origin and new file path names by the new picked file array
|
||||||
$oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']);
|
$oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']);
|
||||||
$newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']);
|
$newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']);
|
||||||
|
|
||||||
|
// hook into staticpage for the renaming regex replacements
|
||||||
$renameValues = array(array(
|
$renameValues = array(array(
|
||||||
'from' => $oldfile,
|
'from' => $oldfile,
|
||||||
'to' => $newfile,
|
'to' => $newfile,
|
||||||
@ -3509,71 +3663,166 @@ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_i
|
|||||||
'newDir' => $newDir,
|
'newDir' => $newDir,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'item_id' => $item_id,
|
'item_id' => $item_id,
|
||||||
'file' => $file,
|
'file' => $pick,
|
||||||
'name' => $pick['name']
|
'name' => $pick['name']
|
||||||
));
|
));
|
||||||
|
|
||||||
serendipity_plugin_api::hook_event('backend_media_rename', $renameValues);
|
serendipity_plugin_api::hook_event('backend_media_rename', $renameValues);
|
||||||
|
|
||||||
// Rename file
|
// Move the origin file
|
||||||
rename($renameValues[0]['from'], $renameValues[0]['to']);
|
try { rename($oldfile, $newfile); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; }
|
||||||
|
|
||||||
foreach($renameValues AS $renameData) {
|
foreach($renameValues AS $renameData) {
|
||||||
// Rename thumbnail
|
$thisOldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']);
|
||||||
@rename($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']),
|
$thisNewThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (!empty($pick['thumbnail_name']) ? '.' . $pick['thumbnail_name'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']);
|
||||||
$serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (!empty($pick['thumbnail_name']) ? '.' . $pick['thumbnail_name'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']));
|
// Move the thumb file and catch any wrong renaming
|
||||||
|
try { rename($thisOldThumb, $thisNewThumb); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; }
|
||||||
|
}
|
||||||
|
// no need to use serendipity_updateImageInDatabase() here since already done in this case start
|
||||||
|
// ???? Forward user to overview (we don't want the user's back button to rename things again)
|
||||||
|
|
||||||
|
// prepare for message
|
||||||
|
$thisnew = (empty($newDir) ? $serendipity['uploadPath'] : '') . $newDir . $pick['name'];
|
||||||
|
$thisExt = isset($pick['extension']) ? '.'.$pick['extension'] : '';
|
||||||
|
|
||||||
|
if (file_exists($newfile)) {
|
||||||
|
echo '<span class="msg_success"><span class="icon-ok-circled"></span> ';
|
||||||
|
printf(MEDIA_DIRECTORY_MOVED, $thisnew . $thisExt);
|
||||||
|
echo "</span>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$oldDir .= $pick['name'];
|
} // case dir, file, filedir end
|
||||||
$newDir .= $pick['name'];
|
|
||||||
} elseif ($type == 'dir') {
|
|
||||||
$renameValues = array(array(
|
|
||||||
'from' => $oldfile,
|
|
||||||
'to' => $newfile,
|
|
||||||
'thumb' => $serendipity['thumbSuffix'],
|
|
||||||
'fthumb' => $file['thumbnail_name'],
|
|
||||||
'oldDir' => $oldDir,
|
|
||||||
'newDir' => $newDir,
|
|
||||||
'type' => $type,
|
|
||||||
'item_id' => $item_id,
|
|
||||||
'file' => $file
|
|
||||||
));
|
|
||||||
|
|
||||||
serendipity_plugin_api::hook_event('backend_media_rename', $renameValues);
|
// Entry REPLACEMENT AREA
|
||||||
}
|
|
||||||
|
|
||||||
// Only MySQL supported, since I don't know how to use REGEXPs differently.
|
// Only MySQL supported, since I don't know how to use REGEXPs differently. // Ian: we should improve this to all!
|
||||||
if ($serendipity['dbType'] != 'mysql' && $serendipity['dbType'] != 'mysqli') {
|
if ($serendipity['dbType'] != 'mysql' && $serendipity['dbType'] != 'mysqli') {
|
||||||
echo '<span class="block_level">' . MEDIA_DIRECTORY_MOVE_ENTRY . '</span>';
|
echo '<span class="msg_notice"><span class="icon-info-circled"></span> ' . MEDIA_DIRECTORY_MOVE_ENTRY . "</span>\n";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$q = "SELECT id, body, extended
|
// Prepare the SELECT query for filetypes
|
||||||
FROM {$serendipity['dbPrefix']}entries
|
if ($type == 'filedir' || $type == 'file') {
|
||||||
WHERE body REGEXP '(src=|href=|window.open.)(\'|\")(" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDir) . "|" . serendipity_db_escape_string($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDir) . ")'
|
|
||||||
OR extended REGEXP '(src=|href=|window.open.)(\'|\")(" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDir) . "|" . serendipity_db_escape_string($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDir) . ")'
|
|
||||||
";
|
|
||||||
|
|
||||||
$dirs = serendipity_db_query($q);
|
// get the right $file, which is array or null, by type
|
||||||
if (is_array($dirs)) {
|
$_file = ($type == 'filedir') ? $pick : $file;
|
||||||
foreach($dirs AS $dir) {
|
// check oldDir in bulkmove case
|
||||||
$dir['body'] = preg_replace('@(src=|href=|window.open.)(\'|")(' . preg_quote($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDir) . '|' . preg_quote($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDir) . ')@', '\1\2' . $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $newDir, $dir['body']);
|
$oldDir = ($type == 'file' && !is_null($oldDir)) ? str_replace($_file['name'].'.'.$_file['extension'], '', $oldDir) : $oldDir;
|
||||||
$dir['extended'] = preg_replace('@(src=|href=|window.open.)(\'|")(' . preg_quote($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDir) . '|' . preg_quote($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDir) . ')@', '\1\2' . $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $newDir, $dir['extended']);
|
|
||||||
|
// Path patterns to SELECT en detail to not pick path parts in a loop
|
||||||
|
if ($oldDir === null) {// care for file renaming with oldpath
|
||||||
|
$oldDirFile = $_file['path'] . $_file['name'] . (($_file['extension']) ? '.'.$_file['extension'] : '');
|
||||||
|
$oldDirThumb = $_file['path'] . $_file['name'] . '.' . $_file['thumbnail_name'] . (($_file['extension']) ? '.'.$_file['extension'] : '');
|
||||||
|
} else {
|
||||||
|
$oldDirFile = $oldDir . $_file['name'] . (($_file['extension']) ? '.'.$_file['extension'] : '');
|
||||||
|
$oldDirThumb = $oldDir . $_file['name'] . '.' . $_file['thumbnail_name'] . (($_file['extension']) ? '.'.$_file['extension'] : '');
|
||||||
|
}
|
||||||
|
if ($type == 'filedir' && !isset($newDirFile)) {
|
||||||
|
$newDirFile = (strpos($newDir, $_file['name']) === FALSE) ? $newDir . $_file['name'] : $newDir;
|
||||||
|
}
|
||||||
|
if ($type == 'file' && $oldDir === null) {
|
||||||
|
$newDirFile = (empty($newDirFile)) ? $newDir : $newDirFile; // for file renamings $newDirFile has to be $newDir ( which is subdir and new NAME w/o ext)
|
||||||
|
}
|
||||||
|
$ispOldFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile;
|
||||||
|
|
||||||
|
} elseif($type == 'dir') {
|
||||||
|
// since this is case 'dir', we do not have a filename and have to rename replacement File vars to oldDir and newDir values for the update preg_replace match
|
||||||
|
$oldDirFile = $oldDir;
|
||||||
|
$newDirFile = $newDir;
|
||||||
|
$ispOldFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile . (($_file['extension']) ? '.'.$_file['extension'] : '');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Please note: imageselectorplus plugin quickblog is either quickblog:FullPath or quickblog:|?(none|plugin|js|_blank)|FullPath
|
||||||
|
// SELECTing the entries uses a more detailled approach to be as precise as possible, thus we need to reset these vars for the preg_replace later on in some cases
|
||||||
|
$q = "SELECT id, body, extended
|
||||||
|
FROM {$serendipity['dbPrefix']}entries
|
||||||
|
WHERE body REGEXP '(src=|href=|window.open.|<!--quickblog:)(\'|\"|\\\|?(plugin|none|js|_blank)?\\\|?)(" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . "|" . serendipity_db_escape_String($ispOldFile) . ")'
|
||||||
|
OR extended REGEXP '(src=|href=|window.open.)(\'|\")(" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . ")'
|
||||||
|
";
|
||||||
|
$entries = serendipity_db_query($q, false, 'assoc');
|
||||||
|
|
||||||
|
if (is_array($entries) && !empty($entries)) {
|
||||||
|
// here we need to match thumbs too, so we do not want the extension, see detailled SELECT regex note
|
||||||
|
if ($type == 'file' && $oldDir === null) {
|
||||||
|
$_ispOldFile = $oldfile; // these vars are more exact in every case
|
||||||
|
$_ispNewFile = $newfile; // dito
|
||||||
|
$oldDirFile = $_file['path'] . $oldDirFile; // oldDirFile is missing a possible subdir path for the preg_replace
|
||||||
|
$newDirFile = $_file['path'] . $newDirFile; // newDirFile - dito
|
||||||
|
} else {
|
||||||
|
$_ispOldFile = $ispOldFile;
|
||||||
|
$_ispNewFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $newDirFile . (($_file['extension']) ? '.'.$_file['extension'] : '');
|
||||||
|
}
|
||||||
|
// last paranoidal check
|
||||||
|
$_oldDirFile = (strpos($oldDirFile, $_file['extension']) === FALSE) ? $oldDirFile : $oldDir . $_file['name'];
|
||||||
|
|
||||||
|
// what we actually need here, is oldDirFile w/o EXT to newDirFile w/o EXT and full ispOldFile path to full ispNewFile path !!!
|
||||||
|
foreach($entries AS $entry) {
|
||||||
|
$entry['body'] = preg_replace('@(src=|href=|window.open.)(\'|")(' . preg_quote($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . '|' . preg_quote($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . ')@', '\1\2' . $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $newDirFile, $entry['body']);
|
||||||
|
$entry['body'] = preg_replace('@(<!--quickblog:)(\\|?(plugin|none|js|_blank)?\\|?)(' . preg_quote($_ispOldFile) . ')@', '\1\2' . $_ispNewFile, $entry['body']);
|
||||||
|
$entry['extended'] = preg_replace('@(src=|href=|window.open.)(\'|")(' . preg_quote($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . '|' . preg_quote($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . ')@', '\1\2' . $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $newDirFile, $entry['extended']);
|
||||||
|
|
||||||
$uq = "UPDATE {$serendipity['dbPrefix']}entries
|
$uq = "UPDATE {$serendipity['dbPrefix']}entries
|
||||||
SET body = '" . serendipity_db_escape_string($dir['body']) . "' ,
|
SET body = '" . serendipity_db_escape_string($entry['body']) . "' ,
|
||||||
extended = '" . serendipity_db_escape_string($dir['extended']) . "'
|
extended = '" . serendipity_db_escape_string($entry['extended']) . "'
|
||||||
WHERE id = " . serendipity_db_escape_string($dir['id']);
|
WHERE id = " . serendipity_db_escape_string($entry['id']);
|
||||||
serendipity_db_query($uq);
|
serendipity_db_query($uq);
|
||||||
}
|
}
|
||||||
|
|
||||||
$imgmovedtodir = sprintf(MEDIA_DIRECTORY_MOVE_ENTRIES, count($dirs));
|
if ($oldDir !== null){
|
||||||
printf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . $imgmovedtodir . '</span>');
|
$imgmovedtodir = sprintf(MEDIA_DIRECTORY_MOVE_ENTRIES, count($entries));
|
||||||
|
echo '<span class="msg_notice"><span class="icon-info-circled"></span> ' . $imgmovedtodir . "</span>\n";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the Media Library
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param bool default false
|
||||||
|
* @param array $smarty_vars
|
||||||
|
* @return string Image list
|
||||||
|
*/
|
||||||
|
function showMediaLibrary($addvar_check = false, $smarty_vars = array()) {
|
||||||
|
global $serendipity;
|
||||||
|
|
||||||
|
if (!serendipity_checkPermission('adminImagesView')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$output = '';
|
||||||
|
|
||||||
|
// After upload, do not show the list to be able to proceed to
|
||||||
|
// media selection.
|
||||||
|
if ($addvar_check && !empty($GLOBALS['image_selector_addvars'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($serendipity['thumbPerPage'])) {
|
||||||
|
$serendipity['thumbPerPage'] = 2;
|
||||||
|
}
|
||||||
|
$smarty_vars = array(
|
||||||
|
'textarea' => isset($serendipity['GET']['textarea']) ? $serendipity['GET']['textarea'] : false,
|
||||||
|
'htmltarget' => isset($serendipity['GET']['htmltarget']) ? $serendipity['GET']['htmltarget'] : '',
|
||||||
|
'filename_only' => isset($serendipity['GET']['filename_only']) ? $serendipity['GET']['filename_only'] : false,
|
||||||
|
);
|
||||||
|
|
||||||
|
$show_upload = isset($serendipity['GET']['showUpload']) ? $serendipity['GET']['showUpload'] : false;
|
||||||
|
|
||||||
|
$output .= serendipity_displayImageList(
|
||||||
|
isset($serendipity['GET']['page']) ? $serendipity['GET']['page'] : 1,
|
||||||
|
$serendipity['thumbPerPage'],
|
||||||
|
isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true,
|
||||||
|
NULL,
|
||||||
|
$show_upload,
|
||||||
|
NULL,
|
||||||
|
$smarty_vars
|
||||||
|
);
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all available media directories
|
* Gets all available media directories
|
||||||
*
|
*
|
||||||
|
@ -84,7 +84,7 @@ function serendipity_updateLocalConfig($dbName, $dbPrefix, $dbHost, $dbUser, $db
|
|||||||
. "\t Serendipity configuration file\n";
|
. "\t Serendipity configuration file\n";
|
||||||
$file_mark = "\n\t// End of Serendipity configuration file"
|
$file_mark = "\n\t// End of Serendipity configuration file"
|
||||||
. "\n\t// You can place your own special variables after here:\n";
|
. "\n\t// You can place your own special variables after here:\n";
|
||||||
$file_end = "\n?>\n";
|
$file_end = "\n?>";
|
||||||
$file_personal = '';
|
$file_personal = '';
|
||||||
|
|
||||||
preg_match('@' . preg_quote($file_start) . '.*' . preg_quote($file_mark) . '(.+)' . preg_quote($file_end) . '@imsU', $oldconfig, $match);
|
preg_match('@' . preg_quote($file_start) . '.*' . preg_quote($file_mark) . '(.+)' . preg_quote($file_end) . '@imsU', $oldconfig, $match);
|
||||||
|
@ -23,7 +23,7 @@ if (defined('S9Y_FRAMEWORK_RSS')) {
|
|||||||
* @param array A superarray of entries to output
|
* @param array A superarray of entries to output
|
||||||
* @param string The version/type of a RSS/Atom feed to display (atom1_0, rss2_0 etc)
|
* @param string The version/type of a RSS/Atom feed to display (atom1_0, rss2_0 etc)
|
||||||
* @param boolean If true, this is a comments feed. If false, it's an Entry feed.
|
* @param boolean If true, this is a comments feed. If false, it's an Entry feed.
|
||||||
* @param boolean Indicates if this feed is a fulltext feed (true) or only excercpt (false)
|
* @param boolean Indicates if this feed is a fulltext feed (true) or only excerpt (false)
|
||||||
* @param boolean Indicates if E-Mail addresses should be shown (true) or hidden (false)
|
* @param boolean Indicates if E-Mail addresses should be shown (true) or hidden (false)
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -155,7 +155,7 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'atom1.0':
|
case 'atom1.0':
|
||||||
$entry_hook = 'frontend_display:atom-1.0:per_entry';
|
$entry_hook = 'frontend_display:atom-1.0:per_entry';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1215,7 +1215,7 @@ function serendipity_smarty_show($template, $data = null, $debugtype = null, $de
|
|||||||
|
|
||||||
$serendipity['smarty']->assign($data);
|
$serendipity['smarty']->assign($data);
|
||||||
|
|
||||||
$tplfile = serendipity_getTemplateFile($template, 'serendipityPath');
|
$tplfile = ($template == 'preview_iframe.tpl') ? serendipity_getTemplateFile($template, 'serendipityPath', true) : serendipity_getTemplateFile($template, 'serendipityPath');
|
||||||
if ($debug !== null) {
|
if ($debug !== null) {
|
||||||
if ($debugtype == "HTML") {
|
if ($debugtype == "HTML") {
|
||||||
$debug = "<!-- Dynamically fetched " . htmlspecialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " -->\n";
|
$debug = "<!-- Dynamically fetched " . htmlspecialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " -->\n";
|
||||||
@ -1224,5 +1224,5 @@ function serendipity_smarty_show($template, $data = null, $debugtype = null, $de
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $debug . $serendipity['smarty']->fetch($tplfile);
|
return $debug . $serendipity['smarty']->fetch('file:'. $tplfile);
|
||||||
}
|
}
|
@ -156,7 +156,7 @@ $dead_htmlarea_dirs = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
/* A list of old Serendipity files which were not marked obsolet with 2.0.0 upgrade - now 2.0.2 */
|
/* A list of old Serendipity files which were not marked obsolet with 2.0.0 upgrade - now 2.0.2 */
|
||||||
$dead_files_rest = array(
|
$dead_files_200 = array(
|
||||||
'serendipity_editor.js',
|
'serendipity_editor.js',
|
||||||
'serendipity_define.js.php',
|
'serendipity_define.js.php',
|
||||||
'bundled-libs/dragdrop.js',
|
'bundled-libs/dragdrop.js',
|
||||||
@ -181,13 +181,19 @@ $dead_files_rest = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
/* A list of old lib directories which were not marked obsolet with 2.0.0 upgrade - now 2.0.2 */
|
/* A list of old lib directories which were not marked obsolet with 2.0.0 upgrade - now 2.0.2 */
|
||||||
$dead_dirs_rest = array(
|
$dead_dirs_200 = array(
|
||||||
$serendipity['serendipityPath'] . 'htmlarea/plugins/ImageManage',
|
$serendipity['serendipityPath'] . 'htmlarea/plugins/ImageManage',
|
||||||
$serendipity['serendipityPath'] . 'htmlarea/plugins',
|
$serendipity['serendipityPath'] . 'htmlarea/plugins',
|
||||||
$serendipity['serendipityPath'] . 'bundled-libs/YahooUI/treeview',
|
$serendipity['serendipityPath'] . 'bundled-libs/YahooUI/treeview',
|
||||||
$serendipity['serendipityPath'] . 'bundled-libs/YahooUI'
|
$serendipity['serendipityPath'] . 'bundled-libs/YahooUI'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* A list of old or beta Serendipity files which were not marked obsolet with the 2.0.2 upgrade */
|
||||||
|
$dead_files_202 = array(
|
||||||
|
'templates/default/admin/media_showitem.tpl',
|
||||||
|
'templates/2k11/admin/media_showitem.tpl'
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* recursive directory call to purge files and directories
|
* recursive directory call to purge files and directories
|
||||||
*
|
*
|
||||||
|
@ -14,7 +14,7 @@ $uri_addData = array(
|
|||||||
'startpage' => false,
|
'startpage' => false,
|
||||||
'uriargs' => implode('/', serendipity_getUriArguments($uri, true)),
|
'uriargs' => implode('/', serendipity_getUriArguments($uri, true)),
|
||||||
'view' => $serendipity['view'],
|
'view' => $serendipity['view'],
|
||||||
'viewtype' => $serendipity['viewtype']
|
'viewtype' => isset($serendipity['viewtype']) ? $serendipity['viewtype'] : ''
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((empty($uri_addData['uriargs']) || trim($uri_addData['uriargs']) == $serendipity['indexFile']) && empty($serendipity['GET']['subpage'])) {
|
if ((empty($uri_addData['uriargs']) || trim($uri_addData['uriargs']) == $serendipity['indexFile']) && empty($serendipity['GET']['subpage'])) {
|
||||||
|
@ -14,7 +14,7 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
|
|||||||
$charset = serendipity_getCharset();
|
$charset = serendipity_getCharset();
|
||||||
|
|
||||||
// The following variable can be set in serendipity_config_local.inc.php to force your templates being able to use language override includes
|
// The following variable can be set in serendipity_config_local.inc.php to force your templates being able to use language override includes
|
||||||
if ($serendipity['useTemplateLanguage']) {
|
if (isset($serendipity['useTemplateLanguage']) && $serendipity['useTemplateLanguage'] === true) {
|
||||||
if (defined('S9Y_DATA_PATH')) {
|
if (defined('S9Y_DATA_PATH')) {
|
||||||
@include_once (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
|
@include_once (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
|
||||||
@include_once (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
|
@include_once (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
|
||||||
|
@ -25,11 +25,11 @@ $serendipity['core_events']['backend_header']['jquery'] = 'serendipity_plugin_a
|
|||||||
function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData, $addData) {
|
function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData, $addData) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
// Only execute if current template does not have its own jquery.js file
|
// Only execute if current template (only) does not have its own jquery.js file
|
||||||
// jquery can be disabled if a template's config.inc.php or a plugin sets
|
// jquery can be disabled if a template's config.inc.php or a plugin sets
|
||||||
// $serendipity['capabilities']['jquery'] = false
|
// $serendipity['capabilities']['jquery'] = false
|
||||||
|
|
||||||
$check = serendipity_getTemplateFile('jquery.js');
|
$check = file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/jquery.js');
|
||||||
if (!$check && $serendipity['capabilities']['jquery']) {
|
if (!$check && $serendipity['capabilities']['jquery']) {
|
||||||
?>
|
?>
|
||||||
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
|
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
|
||||||
@ -46,11 +46,11 @@ function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData,
|
|||||||
function serendipity_plugin_api_backend_header($event_name, &$bag, &$eventData, $addData) {
|
function serendipity_plugin_api_backend_header($event_name, &$bag, &$eventData, $addData) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
// Only execute if current template does not have its own jquery.js file
|
// Only execute if current template does not have its own backend_jquery.js file
|
||||||
// jquery can be disabled if a template's config.inc.php or a plugin sets
|
// jquery can be disabled if a template's config.inc.php or a plugin sets
|
||||||
// $serendipity['capabilities']['jquery'] = false
|
// $serendipity['capabilities']['jquery'] = false
|
||||||
|
|
||||||
$check = serendipity_getTemplateFile('jquery_backend.js');
|
$check = serendipity_getTemplateFile('jquery_backend.js', 'serendipityPath', true);
|
||||||
if (!$check && $serendipity['capabilities']['jquery_backend']) {
|
if (!$check && $serendipity['capabilities']['jquery_backend']) {
|
||||||
?>
|
?>
|
||||||
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
|
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
|
||||||
@ -95,7 +95,8 @@ function errorHandlerCreateDOM(htmlStr) {
|
|||||||
|
|
||||||
case 'backend_save':
|
case 'backend_save':
|
||||||
case 'backend_publish':
|
case 'backend_publish':
|
||||||
echo '<script>$(document).ready(function() { if(Modernizr.indexeddb) { serendipity.eraseEntryEditorCache(); } });</script>';
|
// this is preview_iframe.tpl updertHooks
|
||||||
|
echo '<script>document.addEventListener("DOMContentLoaded", function() { if (window.parent.Modernizr.indexedDB) { window.parent.serendipity.eraseEntryEditorCache(); } });</script>';
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
@ -1636,13 +1637,14 @@ class serendipity_plugin
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string template filename (no directory!)
|
* @param string template filename (no directory!)
|
||||||
|
* @param bool Called by a plugin (defaults true), since we do not have a theme using it yet
|
||||||
* @return string Parsed Smarty return
|
* @return string Parsed Smarty return
|
||||||
*/
|
*/
|
||||||
function &parseTemplate($filename) {
|
function &parseTemplate($filename, $plugin = true) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
$filename = basename($filename);
|
$filename = basename($filename);
|
||||||
$tfile = serendipity_getTemplateFile($filename, 'serendipityPath');
|
$tfile = serendipity_getTemplateFile($filename, 'serendipityPath', true, $plugin); // use the simple plugin fallback stairway
|
||||||
if (!$tfile || $tfile == $filename) {
|
if (!$tfile || $tfile == $filename) {
|
||||||
$tfile = dirname($this->pluginFile) . '/' . $filename;
|
$tfile = dirname($this->pluginFile) . '/' . $filename;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
# $Id: plugin_api.inc.php 1168 2006-04-29 13:06:11Z garvinhicking $
|
|
||||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||||
# All rights reserved. See LICENSE file for licensing details
|
# All rights reserved. See LICENSE file for licensing details
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ include('include/functions_routing.inc.php');
|
|||||||
header('Content-Type: text/html; charset='. LANG_CHARSET);
|
header('Content-Type: text/html; charset='. LANG_CHARSET);
|
||||||
|
|
||||||
if ($serendipity['CacheControl']) {
|
if ($serendipity['CacheControl']) {
|
||||||
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2')) {
|
if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2')) {
|
||||||
header('Cache-Control: no-cache, pre-check=0, post-check=0');
|
header('Cache-Control: no-cache, pre-check=0, post-check=0');
|
||||||
} else {
|
} else {
|
||||||
header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
|
header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
|
||||||
|
@ -1102,3 +1102,4 @@
|
|||||||
@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.');
|
@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.');
|
||||||
@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org');
|
@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org');
|
||||||
@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.');
|
@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.');
|
||||||
|
|
||||||
|
@ -1 +1,10 @@
|
|||||||
@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.');
|
@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. <a href="%s">Return to previous page</a>.');
|
||||||
|
@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. <a href="%s">Return to previous page</a>.');
|
||||||
|
@define('BULKMOVE_INFO', 'Multi move helper');
|
||||||
|
@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. <strong>Note:</strong> This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries be rewritten to point to the new location.');
|
||||||
|
@define('FIRST_PAGE', 'First Page');
|
||||||
|
@define('LAST_PAGE', 'Last Page');
|
||||||
|
@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.');
|
||||||
|
@define('DIRECTORY_INFO', 'Directory info helper');
|
||||||
|
@define('DIRECTORY_INFO_DESC', 'Directories are based to their physical folder directory name. If you want to change or move directories with items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the MediaLibrary and after all, delete the now emptied old directory here. Or edit the old directory via the edit directory button below and rename it to whatever you like (existing subdir/ +) newname. This will move all directories and items and rename entry path too.');
|
||||||
|
@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!');
|
||||||
|
@ -1102,3 +1102,4 @@
|
|||||||
@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.');
|
@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.');
|
||||||
@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org');
|
@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org');
|
||||||
@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.');
|
@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.');
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php # $Id$
|
<?php
|
||||||
|
|
||||||
@serendipity_plugin_api::load_language(dirname(__FILE__));
|
@serendipity_plugin_api::load_language(dirname(__FILE__));
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
1.9:
|
||||||
|
----
|
||||||
|
* changed fetching path in emoticons.inc.php file.
|
||||||
|
Theme emoticons do not need a fallback into another theme.
|
||||||
|
|
||||||
|
|
||||||
1.8:
|
1.8:
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -23,49 +23,50 @@
|
|||||||
. . . etc
|
. . . etc
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
$myThemePath = $serendipity['serendipityHTTPPath'] . $serendipity['templatePath'] . $serendipity['template'];
|
||||||
$serendipity['custom_emoticons_regexp'] = true;
|
$serendipity['custom_emoticons_regexp'] = true;
|
||||||
$serendipity['custom_emoticons'] = array(
|
$serendipity['custom_emoticons'] = array(
|
||||||
"\:'\(" => serendipity_getTemplateFile('img/emoticons/cry.png', 'serendipityHTTPPath', true),
|
"\:'\(" => $myThemePath . '/img/emoticons/cry.png',
|
||||||
|
|
||||||
'\:\-?\)' => serendipity_getTemplateFile('img/emoticons/smile.png', 'serendipityHTTPPath', true),
|
'\:\-?\)' => $myThemePath . '/img/emoticons/smile.png',
|
||||||
|
|
||||||
'\:\-?\|' => serendipity_getTemplateFile('img/emoticons/normal.png', 'serendipityHTTPPath', true),
|
'\:\-?\|' => $myThemePath . '/img/emoticons/normal.png',
|
||||||
|
|
||||||
'\:\-?O' => serendipity_getTemplateFile('img/emoticons/eek.png', 'serendipityHTTPPath', true),
|
'\:\-?O' => $myThemePath . '/img/emoticons/eek.png',
|
||||||
|
|
||||||
'\:\-?\(' => serendipity_getTemplateFile('img/emoticons/sad.png', 'serendipityHTTPPath', true),
|
'\:\-?\(' => $myThemePath . '/img/emoticons/sad.png',
|
||||||
|
|
||||||
'8\-?\)' => serendipity_getTemplateFile('img/emoticons/cool.png', 'serendipityHTTPPath', true),
|
'8\-?\)' => $myThemePath . '/img/emoticons/cool.png',
|
||||||
|
|
||||||
'\:\-?D' => serendipity_getTemplateFile('img/emoticons/laugh.png', 'serendipityHTTPPath', true),
|
'\:\-?D' => $myThemePath . '/img/emoticons/laugh.png',
|
||||||
|
|
||||||
'\:\-?P' => serendipity_getTemplateFile('img/emoticons/tongue.png', 'serendipityHTTPPath', true),
|
'\:\-?P' => $myThemePath . '/img/emoticons/tongue.png',
|
||||||
|
|
||||||
';\-?\)' => serendipity_getTemplateFile('img/emoticons/wink.png', 'serendipityHTTPPath', true),
|
';\-?\)' => $myThemePath . '/img/emoticons/wink.png',
|
||||||
|
|
||||||
'\:anger\:' => serendipity_getTemplateFile('img/emoticons/anger.png', 'serendipityHTTPPath', true),
|
'\:anger\:' => $myThemePath . '/img/emoticons/anger.png',
|
||||||
|
|
||||||
'\:\$' => serendipity_getTemplateFile('img/emoticons/shame.png', 'serendipityHTTPPath', true),
|
'\:\$' => $myThemePath . '/img/emoticons/shame.png',
|
||||||
|
|
||||||
'\:grmpf\:' => serendipity_getTemplateFile('img/emoticons/grmpf.png', 'serendipityHTTPPath', true),
|
'\:grmpf\:' => $myThemePath . '/img/emoticons/grmpf.png',
|
||||||
|
|
||||||
'\:grrr\:' => serendipity_getTemplateFile('img/emoticons/grrr.png', 'serendipityHTTPPath', true),
|
'\:grrr\:' => $myThemePath . '/img/emoticons/grrr.png',
|
||||||
|
|
||||||
'\:haha\:' => serendipity_getTemplateFile('img/emoticons/haha.png', 'serendipityHTTPPath', true),
|
'\:haha\:' => $myThemePath . '/img/emoticons/haha.png',
|
||||||
|
|
||||||
'\:\)' => serendipity_getTemplateFile('img/emoticons/happy.png', 'serendipityHTTPPath', true),
|
'\:\)' => $myThemePath . '/img/emoticons/happy.png',
|
||||||
|
|
||||||
'\:hero\:' => serendipity_getTemplateFile('img/emoticons/hero.png', 'serendipityHTTPPath', true),
|
'\:hero\:' => $myThemePath . '/img/emoticons/hero.png',
|
||||||
|
|
||||||
'\:ko\:' => serendipity_getTemplateFile('img/emoticons/ko.png', 'serendipityHTTPPath', true),
|
'\:ko\:' => $myThemePath . '/img/emoticons/ko.png',
|
||||||
|
|
||||||
'\:safe\:' => serendipity_getTemplateFile('img/emoticons/safe.png', 'serendipityHTTPPath', true),
|
'\:safe\:' => $myThemePath . '/img/emoticons/safe.png',
|
||||||
|
|
||||||
'\:still\:' => serendipity_getTemplateFile('img/emoticons/still.png', 'serendipityHTTPPath', true),
|
'\:still\:' => $myThemePath . '/img/emoticons/still.png',
|
||||||
|
|
||||||
'\:\(' => serendipity_getTemplateFile('img/emoticons/unhappy.png', 'serendipityHTTPPath', true),
|
'\:\(' => $myThemePath . '/img/emoticons/unhappy.png',
|
||||||
|
|
||||||
'\:o\:' => serendipity_getTemplateFile('img/emoticons/whistle.png', 'serendipityHTTPPath', true),
|
'\:o\:' => $myThemePath . '/img/emoticons/whistle.png',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
@ -14,7 +14,7 @@ class serendipity_event_emoticate extends serendipity_event
|
|||||||
$propbag->add('description', PLUGIN_EVENT_EMOTICATE_DESC);
|
$propbag->add('description', PLUGIN_EVENT_EMOTICATE_DESC);
|
||||||
$propbag->add('stackable', false);
|
$propbag->add('stackable', false);
|
||||||
$propbag->add('author', 'Serendipity Team');
|
$propbag->add('author', 'Serendipity Team');
|
||||||
$propbag->add('version', '1.8');
|
$propbag->add('version', '1.9');
|
||||||
$propbag->add('requirements', array(
|
$propbag->add('requirements', array(
|
||||||
'serendipity' => '0.8',
|
'serendipity' => '0.8',
|
||||||
'smarty' => '2.6.7',
|
'smarty' => '2.6.7',
|
||||||
@ -73,7 +73,12 @@ class serendipity_event_emoticate extends serendipity_event
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Hijack global variable $serendipity['custom_emoticons'] if it exists */
|
/* Hijack global variable $serendipity['custom_emoticons'] if it exists */
|
||||||
$hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true);
|
if ($serendipity['version'][0] > 1) {
|
||||||
|
// called in backend too, but uses frontend fallback. Advise to use the Plugin simple approach 4th parameter!
|
||||||
|
$hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true, true);
|
||||||
|
} else {
|
||||||
|
$hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true);
|
||||||
|
}
|
||||||
if (@file_exists($hijack_file)) {
|
if (@file_exists($hijack_file)) {
|
||||||
@include $hijack_file; // This file contains $serendipity['custom_emoticons'] and maybe $serendipity['custom_emoticons_regexp']
|
@include $hijack_file; // This file contains $serendipity['custom_emoticons'] and maybe $serendipity['custom_emoticons_regexp']
|
||||||
if (isset($serendipity['custom_emoticons']) && is_array($serendipity['custom_emoticons'])) {
|
if (isset($serendipity['custom_emoticons']) && is_array($serendipity['custom_emoticons'])) {
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
1.38:
|
||||||
|
-----
|
||||||
|
* Fixed preview of extended properties by 1.37
|
||||||
|
* Added some parameters for requirement
|
||||||
|
|
||||||
1.37:
|
1.37:
|
||||||
-----
|
-----
|
||||||
* Added image preview to extended properties if value is image format (Don Chambers)
|
* Added image preview to extended properties if value is image format (Don Chambers)
|
@ -15,11 +15,11 @@ class serendipity_event_entryproperties extends serendipity_event
|
|||||||
$propbag->add('description', PLUGIN_EVENT_ENTRYPROPERTIES_DESC);
|
$propbag->add('description', PLUGIN_EVENT_ENTRYPROPERTIES_DESC);
|
||||||
$propbag->add('stackable', false);
|
$propbag->add('stackable', false);
|
||||||
$propbag->add('author', 'Garvin Hicking');
|
$propbag->add('author', 'Garvin Hicking');
|
||||||
$propbag->add('version', '1.37');
|
$propbag->add('version', '1.38');
|
||||||
$propbag->add('requirements', array(
|
$propbag->add('requirements', array(
|
||||||
'serendipity' => '0.8',
|
'serendipity' => '1.6',
|
||||||
'smarty' => '2.6.7',
|
'smarty' => '2.6.27',
|
||||||
'php' => '4.1.0'
|
'php' => '5.1.0'
|
||||||
));
|
));
|
||||||
$propbag->add('event_hooks', array(
|
$propbag->add('event_hooks', array(
|
||||||
'frontend_fetchentries' => true,
|
'frontend_fetchentries' => true,
|
||||||
@ -466,25 +466,27 @@ class serendipity_event_entryproperties extends serendipity_event
|
|||||||
<?php
|
<?php
|
||||||
foreach($fields AS $fieldname) {
|
foreach($fields AS $fieldname) {
|
||||||
$fieldparts = explode(':', $fieldname);
|
$fieldparts = explode(':', $fieldname);
|
||||||
$fieldname = $fieldparts[0];
|
$fieldname = $fieldparts[0];
|
||||||
$fieldname = serendipity_specialchars(trim($fieldname));
|
$_fieldname = serendipity_specialchars(trim($fieldname));
|
||||||
|
|
||||||
if (isset($serendipity['POST']['properties'][$fieldname])) {
|
if (isset($serendipity['POST']['properties'][$_fieldname])) {
|
||||||
$value = $serendipity['POST']['properties'][$fieldname];
|
$value = $serendipity['POST']['properties'][$_fieldname];
|
||||||
} elseif (!empty($eventData['properties']['ep_' . $fieldname])) {
|
} elseif (!empty($eventData['properties']['ep_' . $_fieldname])) {
|
||||||
$value = $eventData['properties']['ep_' . $fieldname];
|
$value = $eventData['properties']['ep_' . $_fieldname];
|
||||||
} else {
|
} else {
|
||||||
$value = trim(str_replace($special_to, $special_read, $fieldparts[1]));
|
$value = trim(str_replace($special_to, $special_read, $fieldparts[1]));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="ep_column_<?php echo $fieldname; ?>" class="clearfix form_area media_choose">
|
<div id="ep_column_<?php echo $_fieldname; ?>" class="clearfix form_area media_choose">
|
||||||
<label for="prop<?php echo $fieldname; ?>"><?php echo $fieldname; ?></label>
|
<label for="prop<?php echo $_fieldname; ?>"><?php echo $_fieldname; ?></label>
|
||||||
<textarea id="prop<?php echo $fieldname; ?>" class="change_preview" name="serendipity[properties][<?php echo $fieldname; ?>]" data-configitem="prop<?php echo $fieldname; ?>"><?php echo serendipity_specialchars($value); ?></textarea>
|
<textarea id="prop<?php echo $_fieldname; ?>" class="change_preview" name="serendipity[properties][<?php echo $_fieldname; ?>]" data-configitem="prop<?php echo $_fieldname; ?>"><?php echo serendipity_specialchars($value); ?></textarea>
|
||||||
<button class="customfieldMedia" type="button" name="insImage" title="<?php echo MEDIA ; ?>"><span class="icon-picture"></span><span class="visuallyhidden"><?php echo MEDIA ; ?></span></button>
|
<button class="customfieldMedia" type="button" name="insImage" title="<?php echo MEDIA ; ?>"><span class="icon-picture"></span><span class="visuallyhidden"><?php echo MEDIA ; ?></span></button>
|
||||||
<figure id="prop<?php echo $fieldname; ?>_preview">
|
<?php if (preg_match('/(\.jpg|\.png|\.bmp)$/', $value)) { ?>
|
||||||
<?php if (preg_match('/(\.jpg|\.png|\.bmp)$/', $value)) { echo '<figcaption>' . PREVIEW . '</figcaption>'; } ?>
|
<figure id="prop<?php echo $_fieldname; ?>_preview">
|
||||||
<img src="<?php if (preg_match('/(\.jpg|\.png|\.bmp)$/', $value)) {echo $value; }?>" alt="">
|
<figcaption><?php echo PREVIEW; ?></figcaption>
|
||||||
|
<img src="<?php echo $value; ?>" alt=""/>
|
||||||
</figure>
|
</figure>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php # $Id$
|
<?php
|
||||||
|
|
||||||
@serendipity_plugin_api::load_language(dirname(__FILE__));
|
@serendipity_plugin_api::load_language(dirname(__FILE__));
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ class serendipity_event_s9ymarkup extends serendipity_event
|
|||||||
$propbag->add('description', PLUGIN_EVENT_S9YMARKUP_DESC);
|
$propbag->add('description', PLUGIN_EVENT_S9YMARKUP_DESC);
|
||||||
$propbag->add('stackable', false);
|
$propbag->add('stackable', false);
|
||||||
$propbag->add('author', 'Serendipity Team');
|
$propbag->add('author', 'Serendipity Team');
|
||||||
$propbag->add('version', '1.3');
|
$propbag->add('version', '1.4');
|
||||||
$propbag->add('requirements', array(
|
$propbag->add('requirements', array(
|
||||||
'serendipity' => '0.8',
|
'serendipity' => '0.8',
|
||||||
'smarty' => '2.6.7',
|
'smarty' => '2.6.7',
|
||||||
@ -112,21 +112,21 @@ class serendipity_event_s9ymarkup extends serendipity_event
|
|||||||
|
|
||||||
function _s9y_markup($text) {
|
function _s9y_markup($text) {
|
||||||
$text = str_replace('\_', chr(1), $text);
|
$text = str_replace('\_', chr(1), $text);
|
||||||
$text = preg_replace('/#([[:alnum:]]+?)#/','&\1;',$text);
|
$text = preg_replace('/#([[:alnum:]]+?)#/','&\1;', $text);
|
||||||
$text = preg_replace('/\b_([\S ]+?)_\b/','<u>\1</u>',$text);
|
$text = preg_replace('/\b\s_([\S ]+?)_\s\b/',' <u>\1</u> ', $text);
|
||||||
$text = str_replace(chr(1), '\_', $text);
|
$text = str_replace(chr(1), '\_', $text);
|
||||||
|
|
||||||
// bold
|
// bold
|
||||||
$text = str_replace('\*',chr(1),$text);
|
$text = str_replace('\*',chr(1), $text);
|
||||||
$text = str_replace('**',chr(2),$text);
|
$text = str_replace('**',chr(2), $text);
|
||||||
$text = preg_replace('/(\S)\*(\S)/','\1' . chr(1) . '\2',$text);
|
$text = preg_replace('/(\S)\*(\S)/','\1' . chr(1) . '\2', $text);
|
||||||
$text = preg_replace('/\B\*([^*]+)\*\B/','<strong>\1</strong>',$text);
|
$text = preg_replace('/\B\*([^*]+)\*\B/','<strong>\1</strong>', $text);
|
||||||
$text = str_replace(chr(2),'**',$text);
|
$text = str_replace(chr(2),'**', $text);
|
||||||
$text = str_replace(chr(1),'\*',$text);
|
$text = str_replace(chr(1),'\*', $text);
|
||||||
|
|
||||||
// $text = preg_replace('/\|([0-9a-fA-F]+?)\|([\S ]+?)\|/','<font color="\1">\2</font>',$text);
|
// $text = preg_replace('/\|([0-9a-fA-F]+?)\|([\S ]+?)\|/', '<font color="\1">\2</font>',$text);
|
||||||
$text = preg_replace('/\^([[:alnum:]]+?)\^/','<sup>\1</sup>',$text);
|
$text = preg_replace('/\^([[:alnum:]]+?)\^/','<sup>\1</sup>', $text);
|
||||||
$text = preg_replace('/\@([[:alnum:]]+?)\@/','<sub>\1</sub>',$text);
|
$text = preg_replace('/\@([[:alnum:]]+?)\@/','<sub>\1</sub>', $text);
|
||||||
$text = preg_replace('/([\\\])([*#_|^@%])/', '\2', $text);
|
$text = preg_replace('/([\\\])([*#_|^@%])/', '\2', $text);
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php #
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
@ -6,88 +6,88 @@
|
|||||||
* @translated 2009/06/03
|
* @translated 2009/06/03
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_TITLE', 'Spamschutz');
|
@define('PLUGIN_EVENT_SPAMBLOCK_TITLE', 'Spamschutz');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_DESC', 'Mehrere Möglichkeiten, um Kommentarspam einzudämmen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_DESC', 'Mehrere Möglichkeiten, um Kommentarspam einzudämmen');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ERROR_BODY', 'Spamschutz: Ungültiger Kommentar!');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ERROR_BODY', 'Spamschutz: Ungültiger Kommentar!');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ERROR_IP', 'Spamschutz: Ein weiterer Kommentar kann innerhalb so kurzer Zeit nicht übermittelt werden.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ERROR_IP', 'Spamschutz: Ein weiterer Kommentar kann innerhalb so kurzer Zeit nicht übermittelt werden.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ERROR_KILLSWITCH', 'Dieses Blog ist im "Notfall Kommentar"-Modus. Bitte kommen Sie später wieder.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ERROR_KILLSWITCH', 'Dieses Blog ist im "Notfall Kommentar"-Modus. Bitte kommen Sie später wieder.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_BODYCLONE', 'Keine doppelten Kommentare erlauben');
|
@define('PLUGIN_EVENT_SPAMBLOCK_BODYCLONE', 'Keine doppelten Kommentare erlauben');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_BODYCLONE_DESC', 'Verbietet Benutzern einen Kommentar zu übermitteln, der gleichlautend bereits besteht.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_BODYCLONE_DESC', 'Verbietet Benutzern einen Kommentar zu übermitteln, der gleichlautend bereits besteht.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_KILLSWITCH', 'Notfall-Blockade von Kommentaren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_KILLSWITCH', 'Notfall-Blockade von Kommentaren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_KILLSWITCH_DESC', 'Übergangsweise Kommentare zu allen Einträgen verbieten. Nützlich, wenn das Blog unter andauerndem Spam-Beschuss leidet.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_KILLSWITCH_DESC', 'Übergangsweise Kommentare zu allen Einträgen verbieten. Nützlich, wenn das Blog unter andauerndem Spam-Beschuss leidet.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_IPFLOOD', 'IP-Block Intervall');
|
@define('PLUGIN_EVENT_SPAMBLOCK_IPFLOOD', 'IP-Block Intervall');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_IPFLOOD_DESC', 'Schränkt die Anzahl an Kommentare pro IP ein, indem nur alle X Minuten ein Kommentar erlaubt wird. Hilfreich, um Spamfluten derselben IP abzuwehren.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_IPFLOOD_DESC', 'Schränkt die Anzahl an Kommentare pro IP ein, indem nur alle X Minuten ein Kommentar erlaubt wird. Hilfreich, um Spamfluten derselben IP abzuwehren.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS', 'Captchas aktivieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS', 'Captchas aktivieren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_DESC', 'Erfordert die Eingabe eines zufälligen Buchstabenfolge vom Benutzer, damit ein Kommentar angenommen wird. Diese Eingabe kann von Spambots nicht getätigt werden und verhindert so automatische Kommentare. Jedoch können behinderte oder blinde Personen mit der Darstellung solcher Eingabegrafiken Probleme haben.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_DESC', 'Erfordert die Eingabe eines zufälligen Buchstabenfolge vom Benutzer, damit ein Kommentar angenommen wird. Diese Eingabe kann von Spambots nicht getätigt werden und verhindert so automatische Kommentare. Jedoch können behinderte oder blinde Personen mit der Darstellung solcher Eingabegrafiken Probleme haben.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_USERDESC', 'Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden. ');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_USERDESC', 'Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden. ');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_USERDESC2', 'Bitte die dargestellte Zeichenfolge in die Eingabemaske eintragen!');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_USERDESC2', 'Bitte die dargestellte Zeichenfolge in die Eingabemaske eintragen!');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_USERDESC3', 'Hier die Zeichenfolge der Spamschutz-Grafik eintragen: ');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_USERDESC3', 'Hier die Zeichenfolge der Spamschutz-Grafik eintragen: ');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ERROR_CAPTCHAS', 'Sie haben nicht die richtige Spamschutz-Zeichenfolge eingetragen, die in der Grafik dargestellt wurde. Bitte sehen Sie sich dieses Bild erneut an und tragen Sie die korrekte Zeichenfolge ein.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ERROR_CAPTCHAS', 'Sie haben nicht die richtige Spamschutz-Zeichenfolge eingetragen, die in der Grafik dargestellt wurde. Bitte sehen Sie sich dieses Bild erneut an und tragen Sie die korrekte Zeichenfolge ein.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ERROR_NOTTF', 'Captchas können auf Ihrem Server nicht dargestellt werden. Sie benötigen GDLib und die freetype Bibliotheken, sowie die richtigen .TTF Dateien.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ERROR_NOTTF', 'Captchas können auf Ihrem Server nicht dargestellt werden. Sie benötigen GDLib und die freetype Bibliotheken, sowie die richtigen .TTF Dateien.');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL', 'Captchas nach wie vielen Tagen erzwingen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL', 'Captchas nach wie vielen Tagen erzwingen');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL_DESC', 'Captchas können abhängig vom Alter des Artikels eingeblendet werden. Tragen Sie das Minimalalter eines Artikels in Tagen ein, ab dem Captchas erforderlich werden sollen. Falls auf 0 gesetzt, sind Captchas immer erforderlich.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL_DESC', 'Captchas können abhängig vom Alter des Artikels eingeblendet werden. Tragen Sie das Minimalalter eines Artikels in Tagen ein, ab dem Captchas erforderlich werden sollen. Falls auf 0 gesetzt, sind Captchas immer erforderlich.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION', 'Kommentarmoderation nach wievielen Tagen erzwingen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION', 'Kommentarmoderation nach X Tagen erzwingen');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION_DESC', 'Alle Kommentare zu einem Artikel können abhängig vom Alter des Artikels automatisch moderiert werden. Tragen Sie hier das Minimalalter eines Artikels in Tagen ein, ab dem jeder Kommentar erst nach Ihrer Moderation dargestellt wird. 0 bedeutet, dass keine automatische Moderation erzeugt wird.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION_DESC', 'Alle Kommentare zu einem Artikel können abhängig vom Alter des Artikels automatisch moderiert werden. Tragen Sie hier das Minimalalter eines Artikels in Tagen ein, ab dem jeder Kommentar erst nach Ihrer Moderation dargestellt wird. 0 bedeutet, dass keine automatische Moderation erzeugt wird.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE', 'Erforderliche Anzahl an Links für Moderation');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE', 'Erforderliche Anzahl an Links für Moderation');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE_DESC', 'Wenn in einem Kommentar eine bestimmte Anzahl an Links vorhanden ist, kann der Kommentar automatisch moderiert werden. Falls auf 0 gesetzt, wird diese Linkprüfung nicht vorgenommen.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE_DESC', 'Wenn in einem Kommentar eine bestimmte Anzahl an Links vorhanden ist, kann der Kommentar automatisch moderiert werden. Falls auf 0 gesetzt, wird diese Linkprüfung nicht vorgenommen.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LINKS_REJECT', 'Erforderliche Anzahl an Links für Abweisung');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_REJECT', 'Erforderliche Anzahl an Links für Abweisung');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LINKS_REJECT_DESC', 'Wenn in einem Kommentar eine bestimmte Anzahl an Links vorhanden ist, kann der Kommentar automatisch abgelehnt werden. Falls auf 0 gesetzt, wird diese Linkprüfung nicht vorgenommen.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_REJECT_DESC', 'Wenn in einem Kommentar eine bestimmte Anzahl an Links vorhanden ist, kann der Kommentar automatisch abgelehnt werden. Falls auf 0 gesetzt, wird diese Linkprüfung nicht vorgenommen.');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_NOTICE_MODERATION', 'Aufgrund einiger Bedingungen wird der Kommentar moderiert und erst nach Bestätigung des Blog-Eigentümers dargestellt.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_NOTICE_MODERATION', 'Aufgrund einiger Bedingungen wird der Kommentar moderiert und erst nach Bestätigung des Blog-Eigentümers dargestellt.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHA_COLOR', 'Hintergrundfarbe des Captchas');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHA_COLOR', 'Hintergrundfarbe des Captchas');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHA_COLOR_DESC', 'RGB Werte eingeben: 0,255,255');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHA_COLOR_DESC', 'RGB Werte eingeben: 0,255,255');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LOGFILE', 'Speicherplatz für das Logfile');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOGFILE', 'Speicherplatz für das Logfile');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LOGFILE_DESC', 'Einige Informationen über die Abweisung/Moderation von Kommentaren kann in ein Logfile geschrieben werden. Wenn diese Option auf einen leeren Wert gesetzt wird, findet keine Protokollierung statt.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOGFILE_DESC', 'Einige Informationen über die Abweisung/Moderation von Kommentaren kann in ein Logfile geschrieben werden. Wenn diese Option auf einen leeren Wert gesetzt wird, findet keine Protokollierung statt.');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_KILLSWITCH', 'Notfall-Blockade');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_KILLSWITCH', 'Notfall-Blockade');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_BODYCLONE', 'Doppelter Kommentar');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_BODYCLONE', 'Doppelter Kommentar');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_IPFLOOD', 'IP-Block');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_IPFLOOD', 'IP-Block');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_CAPTCHAS', 'Captcha ungültig (Eingegeben: %s, Erwartet: %s)');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_CAPTCHAS', 'Captcha ungültig (Eingegeben: %s, Erwartet: %s)');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_FORCEMODERATION', 'Moderation nach X Tagen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_FORCEMODERATION', 'Moderation nach X Tagen');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_LINKS_REJECT', 'Zu viele Links');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_LINKS_REJECT', 'Zu viele Links');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_LINKS_MODERATE', 'Zu viele Links');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_LINKS_MODERATE', 'Zu viele Links');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL', 'E-Mail-Adressen bei Kommentatoren verstecken');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL', 'E-Mail-Adressen bei Kommentatoren verstecken');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL_DESC', 'Zeigt in den Kommentaren keine E-Mail Adressen der jeweiligen Kommentatoren an');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL_DESC', 'Zeigt in den Kommentaren keine E-Mail Adressen der jeweiligen Kommentatoren an');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL_NOTICE', 'Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL_NOTICE', 'Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE', 'Protokollierung von fehlgeschlagenen Kommentaren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE', 'Protokollierung von fehlgeschlagenen Kommentaren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_DESC', 'Die Protokollierung von fehlgeschlagenen Kommentaren und deren Gründen kann auf mehrere Arten durchgeführt werden.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_DESC', 'Die Protokollierung von fehlgeschlagenen Kommentaren und deren Gründen kann auf mehrere Arten durchgeführt werden.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_FILE', 'Einfache Datei (siehe Option "Logfile")');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_FILE', 'Einfache Datei (siehe Option "Logfile")');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_DB', 'Datenbank');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_DB', 'Datenbank');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_NONE', 'Keine Protokollierung');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_NONE', 'Keine Protokollierung');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_API_COMMENTS', 'Behandlung von per API übermittelten Kommentaren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_API_COMMENTS', 'Behandlung von per API übermittelten Kommentaren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_API_COMMENTS_DESC', 'Diese Einstellung bestimmt, wie per API abgegebene Kommentare (Trackbacks, Pingbacks, wfw:commentApi) behandelt werden. Falls diese Einstellung auf "moderieren" gestellt ist, müssen alle solche Kommentare immer bestätigt werden. Falls auf "abweisen" gestellt, werden solche Kommentare global nicht erlaubt. Bei der Einstellung "keine" werden solche Kommentare wie andere behandelt.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_API_COMMENTS_DESC', 'Diese Einstellung bestimmt, wie per API abgegebene Kommentare (Trackbacks, Pingbacks, wfw:commentApi) behandelt werden. Falls diese Einstellung auf "moderieren" gestellt ist, müssen alle solche Kommentare immer bestätigt werden. Falls auf "abweisen" gestellt, werden solche Kommentare global nicht erlaubt. Bei der Einstellung "keine" werden solche Kommentare wie andere behandelt.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_API_MODERATE', 'moderieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_API_MODERATE', 'moderieren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_API_REJECT', 'abweisen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_API_REJECT', 'abweisen');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_API', 'Keine API-erstellten Kommentare (u.a. Trackbacks) erlaubt');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_API', 'Keine API-erstellten Kommentare (u.a. Trackbacks) erlaubt');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FILTER_ACTIVATE', 'Wortfilter aktivieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FILTER_ACTIVATE', 'Wortfilter aktivieren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FILTER_ACTIVATE_DESC', 'Durchsucht Kommentare nach speziellen Zeichenketten und markiert diese als Spam.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FILTER_ACTIVATE_DESC', 'Durchsucht Kommentare nach speziellen Zeichenketten und markiert diese als Spam.');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FILTER_URLS', 'Wortfilter für URLs');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FILTER_URLS', 'Wortfilter für URLs');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FILTER_URLS_DESC', 'Reguläre Ausdrücke erlaubt, Zeichenketten durch Semikolon (;) trennen. Das @-Zeichen muss mit \\@, der Punkt als \\. angegeben werden.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FILTER_URLS_DESC', 'Reguläre Ausdrücke erlaubt, Zeichenketten durch Semikolon (;) trennen. Das @-Zeichen muss mit \\@, der Punkt als \\. angegeben werden.');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FILTER_AUTHORS', 'Wortfilter für Autorennamen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FILTER_AUTHORS', 'Wortfilter für Autorennamen');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FILTER_AUTHORS_DESC', PLUGIN_EVENT_SPAMBLOCK_FILTER_URLS_DESC);
|
@define('PLUGIN_EVENT_SPAMBLOCK_FILTER_AUTHORS_DESC', PLUGIN_EVENT_SPAMBLOCK_FILTER_URLS_DESC);
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_CHECKMAIL', 'Ungültige E-Mail-Adresse!');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_CHECKMAIL', 'Ungültige E-Mail-Adresse!');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL', 'Auf ungültige E-Mail-Adressen prüfen?');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL', 'Auf ungültige E-Mail-Adressen prüfen?');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REQUIRED_FIELDS', 'Pflichtfelder');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REQUIRED_FIELDS', 'Pflichtfelder');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REQUIRED_FIELDS_DESC', 'Geben Sie die Liste von Pflichtfeldern bei der Abgabe eines Kommentars ein. Mehrere Felder können mit "," getrennt werden. Verfügbare Felder sind: name, email, url, replyTo, comment');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REQUIRED_FIELDS_DESC', 'Geben Sie die Liste von Pflichtfeldern bei der Abgabe eines Kommentars ein. Mehrere Felder können mit "," getrennt werden. Verfügbare Felder sind: name, email, url, replyTo, comment');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_REQUIRED_FIELD', 'Sie haben das Feld "%s" nicht ausgefüllt!');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_REQUIRED_FIELD', 'Sie haben das Feld "%s" nicht ausgefüllt!');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_CONFIG', 'Anti-Spam-Maßnahmen konfigurieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CONFIG', 'Anti-Spam-Maßnahmen konfigurieren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR', 'Diesen Autor via Spamschutz blockieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR', 'Diesen Autor via Spamschutz blockieren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ADD_URL', 'Diese URL via Spamschutz blockieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ADD_URL', 'Diese URL via Spamschutz blockieren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL', 'Diese E-Mail via Spamschutz blockieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL', 'Diese E-Mail via Spamschutz blockieren');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR', 'Blockade dieses Autors via Spamschutz aufheben');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR', 'Blockade dieses Autors via Spamschutz aufheben');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL', 'Blockade dieser URL via Spamschutz aufheben');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL', 'Blockade dieser URL via Spamschutz aufheben');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL', 'Blockade dieser E-Mail via Spamschutz aufheben');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL', 'Blockade dieser E-Mail via Spamschutz aufheben');
|
||||||
|
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_REASON_TITLE', 'Artikeltitel ist derselbe wie der Kommentar!');
|
@define('PLUGIN_EVENT_SPAMBLOCK_REASON_TITLE', 'Artikeltitel ist derselbe wie der Kommentar!');
|
||||||
define('PLUGIN_EVENT_SPAMBLOCK_FILTER_TITLE', 'Kommentare abweisen, die als Text nur den Artikeltitel enthalten');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FILTER_TITLE', 'Kommentare abweisen, die als Text nur den Artikeltitel enthalten');
|
||||||
|
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_SCRAMBLE', 'Stärkere Captchas');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_SCRAMBLE', 'Stärkere Captchas');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_HIDE', 'Spamblock für Autoren deaktivieren');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HIDE', 'Spamblock für Autoren deaktivieren');
|
||||||
@ -113,7 +113,7 @@ define('PLUGIN_EVENT_SPAMBLOCK_FILTER_TITLE', 'Kommentare abweisen, die als Text
|
|||||||
@define('PLUGIN_EVENT_SPAMBLOCK_CSRF_REASON', 'Ihr Kommentar enthielt keinen gültigen Session-Hash. Kommentare auf diesem Blog können nur mit aktivierten Cookies hinterlassen werden, und Sie müssen bereits eine weitere URL des Blogs geöffnet haben, bevor Sie einen Kommentar absenden können!');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CSRF_REASON', 'Ihr Kommentar enthielt keinen gültigen Session-Hash. Kommentare auf diesem Blog können nur mit aktivierten Cookies hinterlassen werden, und Sie müssen bereits eine weitere URL des Blogs geöffnet haben, bevor Sie einen Kommentar absenden können!');
|
||||||
|
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS', 'SPAM IP Adressen via HTaccess blocken?');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS', 'SPAM IP Adressen via HTaccess blocken?');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS_DESC', 'Wenn Sie diese Option einschalten, dann werden IPs von denen SPAM gesendet wurde zu Ihref .htacces Datei hinzu gefügt. Die .htaccess Datei wird regelmässig mit den abgelehnten IPs des letzten Monats erneuert.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS_DESC', 'Wenn Sie diese Option einschalten, dann werden IPs von denen SPAM gesendet wurde zu Ihrer .htaccess Datei hinzugefügt. Die .htaccess Datei wird regelmäßig mit den abgelehnten IPs des letzten Monats erneuert.');
|
||||||
|
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_LOOK', 'So sehen Ihre Captchas im Moment aus. Nachdem Sie die Einstellungen geändert und gespeichert haben können Sie durch einen Klick auf diese das Aussehen hier erneuern.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOOK', 'So sehen Ihre Captchas im Moment aus. Nachdem Sie die Einstellungen geändert und gespeichert haben können Sie durch einen Klick auf diese das Aussehen hier erneuern.');
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php #
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL', 'Captchas nach wie vielen Tagen erzwingen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL', 'Captchas nach wie vielen Tagen erzwingen');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL_DESC', 'Captchas können abhängig vom Alter des Artikels eingeblendet werden. Tragen Sie das Minimalalter eines Artikels in Tagen ein, ab dem Captchas erforderlich werden sollen. Falls auf 0 gesetzt, sind Captchas immer erforderlich.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CAPTCHAS_TTL_DESC', 'Captchas können abhängig vom Alter des Artikels eingeblendet werden. Tragen Sie das Minimalalter eines Artikels in Tagen ein, ab dem Captchas erforderlich werden sollen. Falls auf 0 gesetzt, sind Captchas immer erforderlich.');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION', 'Kommentarmoderation nach wievielen Tagen erzwingen');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION', 'Kommentarmoderation nach X Tagen erzwingen');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION_DESC', 'Alle Kommentare zu einem Artikel können abhängig vom Alter des Artikels automatisch moderiert werden. Tragen Sie hier das Minimalalter eines Artikels in Tagen ein, ab dem jeder Kommentar erst nach Ihrer Moderation dargestellt wird. 0 bedeutet, dass keine automatische Moderation erzeugt wird.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_FORCEMODERATION_DESC', 'Alle Kommentare zu einem Artikel können abhängig vom Alter des Artikels automatisch moderiert werden. Tragen Sie hier das Minimalalter eines Artikels in Tagen ein, ab dem jeder Kommentar erst nach Ihrer Moderation dargestellt wird. 0 bedeutet, dass keine automatische Moderation erzeugt wird.');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE', 'Erforderliche Anzahl an Links für Moderation');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE', 'Erforderliche Anzahl an Links für Moderation');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE_DESC', 'Wenn in einem Kommentar eine bestimmte Anzahl an Links vorhanden ist, kann der Kommentar automatisch moderiert werden. Falls auf 0 gesetzt, wird diese Linkprüfung nicht vorgenommen.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LINKS_MODERATE_DESC', 'Wenn in einem Kommentar eine bestimmte Anzahl an Links vorhanden ist, kann der Kommentar automatisch moderiert werden. Falls auf 0 gesetzt, wird diese Linkprüfung nicht vorgenommen.');
|
||||||
@ -113,7 +113,7 @@
|
|||||||
@define('PLUGIN_EVENT_SPAMBLOCK_CSRF_REASON', 'Ihr Kommentar enthielt keinen gültigen Session-Hash. Kommentare auf diesem Blog können nur mit aktivierten Cookies hinterlassen werden, und Sie müssen bereits eine weitere URL des Blogs geöffnet haben, bevor Sie einen Kommentar absenden können!');
|
@define('PLUGIN_EVENT_SPAMBLOCK_CSRF_REASON', 'Ihr Kommentar enthielt keinen gültigen Session-Hash. Kommentare auf diesem Blog können nur mit aktivierten Cookies hinterlassen werden, und Sie müssen bereits eine weitere URL des Blogs geöffnet haben, bevor Sie einen Kommentar absenden können!');
|
||||||
|
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS', 'SPAM IP Adressen via HTaccess blocken?');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS', 'SPAM IP Adressen via HTaccess blocken?');
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS_DESC', 'Wenn Sie diese Option einschalten, dann werden IPs von denen SPAM gesendet wurde zu Ihref .htacces Datei hinzu gefügt. Die .htaccess Datei wird regelmässig mit den abgelehnten IPs des letzten Monats erneuert.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_HTACCESS_DESC', 'Wenn Sie diese Option einschalten, dann werden IPs von denen SPAM gesendet wurde zu Ihrer .htaccess Datei hinzugefügt. Die .htaccess Datei wird regelmäßig mit den abgelehnten IPs des letzten Monats erneuert.');
|
||||||
|
|
||||||
@define('PLUGIN_EVENT_SPAMBLOCK_LOOK', 'So sehen Ihre Captchas im Moment aus. Nachdem Sie die Einstellungen geändert und gespeichert haben können Sie durch einen Klick auf diese das Aussehen hier erneuern.');
|
@define('PLUGIN_EVENT_SPAMBLOCK_LOOK', 'So sehen Ihre Captchas im Moment aus. Nachdem Sie die Einstellungen geändert und gespeichert haben können Sie durch einen Klick auf diese das Aussehen hier erneuern.');
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php # $Id$
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php # $Id$
|
<?php
|
||||||
|
|
||||||
/************
|
/************
|
||||||
TODO:
|
TODO:
|
||||||
|
@ -220,17 +220,19 @@ if (!$use_installer && $is_logged_in) {
|
|||||||
if ($ajax) {
|
if ($ajax) {
|
||||||
// if that is an ajax request we can stop here, since we by convention don't want to wrap the content in the usual backend code
|
// if that is an ajax request we can stop here, since we by convention don't want to wrap the content in the usual backend code
|
||||||
echo $main_content;
|
echo $main_content;
|
||||||
|
|
||||||
} elseif (!$use_installer) {
|
} elseif (!$use_installer) {
|
||||||
|
|
||||||
$poll_admin_vars = array('main_content', 'no_banner', 'no_sidebar', 'no_footer', 'post_action', 'is_logged_in', 'admin_installed', 'self_info', 'use_installer', 'title');
|
$poll_admin_vars = array('main_content', 'no_banner', 'no_sidebar', 'no_footer', 'post_action', 'is_logged_in', 'admin_installed', 'self_info', 'use_installer', 'title');
|
||||||
$admin_vars = array();
|
$admin_vars = array();
|
||||||
|
|
||||||
foreach($poll_admin_vars AS $poll_admin_var) {
|
foreach($poll_admin_vars AS $poll_admin_var) {
|
||||||
$admin_vars[$poll_admin_var] =& $$poll_admin_var;
|
$admin_vars[$poll_admin_var] =& $$poll_admin_var;
|
||||||
}
|
}
|
||||||
|
|
||||||
$admin_vars['out'] = array();
|
$admin_vars['out'] = array();
|
||||||
$admin_vars['no_create'] = $serendipity['no_create'];
|
$admin_vars['no_create'] = $serendipity['no_create'];
|
||||||
|
$admin_vars['title'] = $admin_section;
|
||||||
$admin_vars['title'] = $admin_section;
|
|
||||||
|
|
||||||
if ($serendipity['expose_s9y']) {
|
if ($serendipity['expose_s9y']) {
|
||||||
$admin_vars['version_info'] = sprintf(ADMIN_FOOTER_POWERED_BY, $serendipity['versionInstalled'], phpversion());
|
$admin_vars['version_info'] = sprintf(ADMIN_FOOTER_POWERED_BY, $serendipity['versionInstalled'], phpversion());
|
||||||
@ -238,14 +240,19 @@ if ($ajax) {
|
|||||||
$admin_vars['version_info'] = sprintf(ADMIN_FOOTER_POWERED_BY, '', '');
|
$admin_vars['version_info'] = sprintf(ADMIN_FOOTER_POWERED_BY, '', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_object($serendipity['smarty'])) serendipity_smarty_init();
|
if (!is_object($serendipity['smarty'])) {
|
||||||
|
serendipity_smarty_init();
|
||||||
|
}
|
||||||
$serendipity['smarty']->assignByRef('admin_vars', $admin_vars);
|
$serendipity['smarty']->assignByRef('admin_vars', $admin_vars);
|
||||||
$serendipity['smarty']->display(serendipity_getTemplateFile('admin/index.tpl', 'serendipityPath'));
|
$serendipity['smarty']->display(serendipity_getTemplateFile('admin/index.tpl', 'serendipityPath'));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (IS_installed === false) {
|
if (IS_installed === false) {
|
||||||
$file = 'include/admin/installer.inc.php';
|
$file = 'include/admin/installer.inc.php';
|
||||||
} elseif ( IS_up2date === false ) {
|
} elseif ( IS_up2date === false ) {
|
||||||
$file = 'include/admin/upgrader.inc.php';
|
$file = 'include/admin/upgrader.inc.php';
|
||||||
}
|
}
|
||||||
require(S9Y_INCLUDE_PATH . $file);
|
require(S9Y_INCLUDE_PATH . $file);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ if (isset($_SESSION['serendipityEmail'])) {
|
|||||||
$serendipity['email'] = $_SESSION['serendipityEmail'];
|
$serendipity['email'] = $_SESSION['serendipityEmail'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($serendipity['use_autosave'])) {
|
if (defined('IN_serendipity_admin') && !isset($serendipity['use_autosave'])) {
|
||||||
$serendipity['use_autosave'] = true;
|
$serendipity['use_autosave'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{if $is_entries}
|
{if $is_entries}
|
||||||
{if NOT $simpleFilters}
|
{if NOT $simpleFilters}
|
||||||
@ -180,12 +180,15 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
{if ($offSet > 0) || ($count > $perPage)}
|
{if ($offSet > 0) || ($count > $perPage)}
|
||||||
{math equation="ceil(values/parts)" assign=totalPages values=$totalEntries parts=$perPage}
|
{math equation="ceil(values/parts)" assign=totalPages values=$totalEntries parts=$perPage}
|
||||||
<nav class="pagination">
|
<nav class="pagination">
|
||||||
<h3>{$CONST.PAGE_BROWSE_ENTRIES|sprintf:($page+1):$totalPages:$totalEntries}</h3>
|
<h3>{$CONST.PAGE_BROWSE_ENTRIES|sprintf:($page+1):$totalPages:$totalEntries}</h3>
|
||||||
|
|
||||||
<ul class="clearfix">
|
<ul class="clearfix">
|
||||||
|
<li class="first">{if ($page) > 0}<a class="button_link" href="{$linkFirst}" title="{$CONST.FIRST_PAGE}"><span class="visuallyhidden">{$CONST.FIRST_PAGE} </span><span class="icon-to-start"></span></a>{/if}</li>
|
||||||
<li class="prev">{if ($offSet > 0)}<a class="button_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
<li class="prev">{if ($offSet > 0)}<a class="button_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
||||||
|
{* Looks weird, but last will be placed to end by the CSS float:right *}
|
||||||
|
<li class="last">{if ($page+1) < $totalPages}<a class="button_link" href="{$linkLast}{$totalPages-1}" title="{$CONST.LAST_PAGE}"><span class="visuallyhidden">{$CONST.LAST_PAGE} </span><span class="icon-to-end"></span></a>{/if}</li>
|
||||||
<li class="next">{if ($count > $perPage)}<a class="button_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
<li class="next">{if ($count > $perPage)}<a class="button_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -215,8 +218,12 @@
|
|||||||
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_SAVE_DRAFT}</span>
|
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_SAVE_DRAFT}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{if $is_iframe}
|
{if $is_iframe}
|
||||||
|
{if $iframe === true && isset($smarty.post.serendipity.properties.lang_selected)}
|
||||||
|
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.PLUGIN_EVENT_MULTILINGUAL_ENTRY_RELOADED|sprintf:{(''==$smarty.post.serendipity.properties.lang_selected)?$lang:$smarty.post.serendipity.properties.lang_selected}}</span>
|
||||||
|
{else}
|
||||||
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_SAVE}</span>
|
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_SAVE}</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
{if $is_iframepreview}
|
{if $is_iframepreview}
|
||||||
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_PREVIEW}</span>
|
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_PREVIEW}</span>
|
||||||
{/if}
|
{/if}
|
||||||
@ -236,5 +243,5 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{$iframe}
|
{if $iframe !== true && !empty($iframe)}{$iframe}{/if}
|
||||||
{$entryForm}
|
{$entryForm}
|
286
templates/2k11/admin/font/config.json
Normal file
286
templates/2k11/admin/font/config.json
Normal file
@ -0,0 +1,286 @@
|
|||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"css_prefix_text": "icon-",
|
||||||
|
"css_use_suffix": false,
|
||||||
|
"hinting": true,
|
||||||
|
"units_per_em": 1000,
|
||||||
|
"ascent": 850,
|
||||||
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"uid": "9dd9e835aebe1060ba7190ad2b2ed951",
|
||||||
|
"css": "search",
|
||||||
|
"code": 59423,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "8b80d36d4ef43889db10bc1f0dc9a862",
|
||||||
|
"css": "user",
|
||||||
|
"code": 59420,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "31972e4e9d080eaa796290349ae6c1fd",
|
||||||
|
"css": "users",
|
||||||
|
"code": 59421,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "381da2c2f7fd51f8de877c044d7f439d",
|
||||||
|
"css": "picture",
|
||||||
|
"code": 59419,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "b1887b423d2fd15c345e090320c91ca0",
|
||||||
|
"css": "th",
|
||||||
|
"code": 59414,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "f805bb95d40c7ef2bc51b3d50d4f2e5c",
|
||||||
|
"css": "th-list",
|
||||||
|
"code": 59433,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "43ab845088317bd348dee1d975700c48",
|
||||||
|
"css": "ok-circled",
|
||||||
|
"code": 59396,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "5211af474d3a9848f67f945e2ccaf143",
|
||||||
|
"css": "cancel",
|
||||||
|
"code": 59409,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "44e04715aecbca7f266a17d5a7863c68",
|
||||||
|
"css": "plus",
|
||||||
|
"code": 59397,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "861ab06e455e2de3232ebef67d60d708",
|
||||||
|
"css": "minus",
|
||||||
|
"code": 59398,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "17ebadd1e3f274ff0205601eef7b9cc4",
|
||||||
|
"css": "help-circled",
|
||||||
|
"code": 59401,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "e82cedfa1d5f15b00c5a81c9bd731ea2",
|
||||||
|
"css": "info-circled",
|
||||||
|
"code": 59402,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "d7271d490b71df4311e32cdacae8b331",
|
||||||
|
"css": "home",
|
||||||
|
"code": 59392,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "3db5347bd219f3bce6025780f5d9ef45",
|
||||||
|
"css": "tag",
|
||||||
|
"code": 59394,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "5e2ab018e3044337bcef5f7e94098ea1",
|
||||||
|
"css": "thumbs-up-alt",
|
||||||
|
"code": 59429,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "ddcd918b502642705838815d40aea9e3",
|
||||||
|
"css": "thumbs-down-alt",
|
||||||
|
"code": 59430,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "41087bc74d4b20b55059c60a33bf4008",
|
||||||
|
"css": "edit",
|
||||||
|
"code": 59395,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "dcedf50ab1ede3283d7a6c70e2fe32f3",
|
||||||
|
"css": "chat",
|
||||||
|
"code": 59404,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "b035c28eba2b35c6ffe92aee8b0df507",
|
||||||
|
"css": "attention-circled",
|
||||||
|
"code": 59411,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "f48ae54adfb27d8ada53d0fd9e34ee10",
|
||||||
|
"css": "trash",
|
||||||
|
"code": 59405,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "c95735c17a10af81448c7fed98a04546",
|
||||||
|
"css": "folder-open",
|
||||||
|
"code": 59422,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "72b1277834cba5b7944b0a6cac7ddb0d",
|
||||||
|
"css": "rss",
|
||||||
|
"code": 59410,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "559647a6f430b3aeadbecd67194451dd",
|
||||||
|
"css": "menu",
|
||||||
|
"code": 59417,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "98687378abd1faf8f6af97c254eb6cd6",
|
||||||
|
"css": "cog-alt",
|
||||||
|
"code": 59393,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "0d20938846444af8deb1920dc85a29fb",
|
||||||
|
"css": "logout",
|
||||||
|
"code": 59407,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "598a5f2bcf3521d1615de8e1881ccd17",
|
||||||
|
"css": "clock",
|
||||||
|
"code": 59426,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "98d9c83c1ee7c2c25af784b518c522c5",
|
||||||
|
"css": "block",
|
||||||
|
"code": 59434,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "e594fc6e5870b4ab7e49f52571d52577",
|
||||||
|
"css": "resize-full",
|
||||||
|
"code": 59416,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "b013f6403e5ab0326614e68d1850fd6b",
|
||||||
|
"css": "resize-full-alt",
|
||||||
|
"code": 59406,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "6605ee6441bf499ffa3c63d3c7409471",
|
||||||
|
"css": "move",
|
||||||
|
"code": 59408,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "2d6150442079cbda7df64522dc24f482",
|
||||||
|
"css": "down-dir",
|
||||||
|
"code": 59403,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "80cd1022bd9ea151d554bec1fa05f2de",
|
||||||
|
"css": "up-dir",
|
||||||
|
"code": 59424,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "9dc654095085167524602c9acc0c5570",
|
||||||
|
"css": "left-dir",
|
||||||
|
"code": 59431,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "fb1c799ffe5bf8fb7f8bcb647c8fe9e6",
|
||||||
|
"css": "right-dir",
|
||||||
|
"code": 59432,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "bc71f4c6e53394d5ba46b063040014f1",
|
||||||
|
"css": "cw",
|
||||||
|
"code": 59399,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "f9c3205df26e7778abac86183aefdc99",
|
||||||
|
"css": "ccw",
|
||||||
|
"code": 59400,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "c47efa0e3e74f6ba4c2562c1258fff1f",
|
||||||
|
"css": "to-end",
|
||||||
|
"code": 59435,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "12052b30d23a1a70d6b32962d5464cae",
|
||||||
|
"css": "to-start",
|
||||||
|
"code": 59437,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "197375a3cea8cb90b02d06e4ddf1433d",
|
||||||
|
"css": "globe",
|
||||||
|
"code": 59425,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "a2a74f5e7b7d9ba054897d8c795a326a",
|
||||||
|
"css": "list-bullet",
|
||||||
|
"code": 59428,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "2a4e6c99b732a57da40e32fa2a7800a4",
|
||||||
|
"css": "toggle-off",
|
||||||
|
"code": 59412,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "3256ef03b16e7ab51235bc7378b53bb5",
|
||||||
|
"css": "toggle-on",
|
||||||
|
"code": 59413,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "8aa99bc60f3553bb3e31b73dd6e744c8",
|
||||||
|
"css": "rocket",
|
||||||
|
"code": 59436,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "4109c474ff99cad28fd5a2c38af2ec6f",
|
||||||
|
"css": "filter",
|
||||||
|
"code": 59415,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "56a21935a5d4d79b2e91ec00f760b369",
|
||||||
|
"css": "sort",
|
||||||
|
"code": 59418,
|
||||||
|
"src": "fontawesome"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uid": "46120eb259799eab0dac0691137e5706",
|
||||||
|
"css": "medkit",
|
||||||
|
"code": 59427,
|
||||||
|
"src": "fontawesome"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Binary file not shown.
@ -49,7 +49,9 @@
|
|||||||
<glyph glyph-name="right-dir" unicode="" d="m321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11-11 25v500q0 15 11 25t25 11 25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
|
<glyph glyph-name="right-dir" unicode="" d="m321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11-11 25v500q0 15 11 25t25 11 25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
|
||||||
<glyph glyph-name="th-list" unicode="" d="m286 154v-108q0-22-16-37t-38-16h-178q-23 0-38 16t-16 37v108q0 22 16 38t38 15h178q22 0 38-15t16-38z m0 285v-107q0-22-16-38t-38-15h-178q-23 0-38 15t-16 38v107q0 23 16 38t38 16h178q22 0 38-16t16-38z m714-285v-108q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v108q0 22 16 38t38 15h535q23 0 38-15t16-38z m-714 571v-107q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38v107q0 22 16 38t38 16h178q22 0 38-16t16-38z m714-286v-107q0-22-16-38t-38-15h-535q-23 0-38 15t-16 38v107q0 23 16 38t38 16h535q23 0 38-16t16-38z m0 286v-107q0-22-16-38t-38-16h-535q-23 0-38 16t-16 38v107q0 22 16 38t38 16h535q23 0 38-16t16-38z" horiz-adv-x="1000" />
|
<glyph glyph-name="th-list" unicode="" d="m286 154v-108q0-22-16-37t-38-16h-178q-23 0-38 16t-16 37v108q0 22 16 38t38 15h178q22 0 38-15t16-38z m0 285v-107q0-22-16-38t-38-15h-178q-23 0-38 15t-16 38v107q0 23 16 38t38 16h178q22 0 38-16t16-38z m714-285v-108q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v108q0 22 16 38t38 15h535q23 0 38-15t16-38z m-714 571v-107q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38v107q0 22 16 38t38 16h178q22 0 38-16t16-38z m714-286v-107q0-22-16-38t-38-15h-535q-23 0-38 15t-16 38v107q0 23 16 38t38 16h535q23 0 38-16t16-38z m0 286v-107q0-22-16-38t-38-16h-535q-23 0-38 16t-16 38v107q0 22 16 38t38 16h535q23 0 38-16t16-38z" horiz-adv-x="1000" />
|
||||||
<glyph glyph-name="block" unicode="" d="m732 352q0 90-48 164l-421-420q76-50 166-50 62 0 118 25t96 65 65 97 24 119z m-557-167l421 421q-75 50-167 50-83 0-153-40t-110-112-41-152q0-91 50-167z m682 167q0-88-34-168t-91-137-137-92-166-34-167 34-137 92-91 137-34 168 34 167 91 137 137 91 167 34 166-34 137-91 91-137 34-167z" horiz-adv-x="857.1" />
|
<glyph glyph-name="block" unicode="" d="m732 352q0 90-48 164l-421-420q76-50 166-50 62 0 118 25t96 65 65 97 24 119z m-557-167l421 421q-75 50-167 50-83 0-153-40t-110-112-41-152q0-91 50-167z m682 167q0-88-34-168t-91-137-137-92-166-34-167 34-137 92-91 137-34 168 34 167 91 137 137 91 167 34 166-34 137-91 91-137 34-167z" horiz-adv-x="857.1" />
|
||||||
|
<glyph glyph-name="to-end" unicode="" d="m25-71q-10-11-18-8t-7 18v822q0 14 7 18t18-8l396-396q5-4 8-11v379q0 14 10 25t25 11h72q14 0 25-11t10-25v-786q0-14-10-25t-25-11h-72q-14 0-25 11t-10 25v379q-3-6-8-11z" horiz-adv-x="571.4" />
|
||||||
<glyph glyph-name="rocket" unicode="" d="m804 600q0 22-16 38t-38 16-38-16-16-38 16-38 38-16 38 16 16 38z m125 161q0-139-43-241t-141-201q-45-44-109-98l-11-211q-1-9-9-15l-214-125q-4-2-9-2-7 0-13 5l-36 36q-7 7-4 17l47 155-156 156-155-47q-1-1-5-1-7 0-12 5l-36 36q-10 11-3 22l125 214q6 8 15 9l211 11q54 64 98 109 105 104 200 144t241 40q7 0 13-6t6-12z" horiz-adv-x="928.6" />
|
<glyph glyph-name="rocket" unicode="" d="m804 600q0 22-16 38t-38 16-38-16-16-38 16-38 38-16 38 16 16 38z m125 161q0-139-43-241t-141-201q-45-44-109-98l-11-211q-1-9-9-15l-214-125q-4-2-9-2-7 0-13 5l-36 36q-7 7-4 17l47 155-156 156-155-47q-1-1-5-1-7 0-12 5l-36 36q-10 11-3 22l125 214q6 8 15 9l211 11q54 64 98 109 105 104 200 144t241 40q7 0 13-6t6-12z" horiz-adv-x="928.6" />
|
||||||
|
<glyph glyph-name="to-start" unicode="" d="m546 771q11 11 18 8t7-18v-822q0-14-7-18t-18 8l-396 396q-5 5-7 11v-379q0-14-11-25t-25-11h-71q-15 0-25 11t-11 25v786q0 14 11 25t25 11h71q15 0 25-11t11-25v-379q2 7 7 11z" horiz-adv-x="571.4" />
|
||||||
</font>
|
</font>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
Before (image error) Size: 21 KiB After (image error) Size: 22 KiB |
Binary file not shown.
Binary file not shown.
@ -40,40 +40,20 @@
|
|||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
{if $case_do_multidelete || $case_do_delete}
|
{if $case_do_multidelete || $case_do_delete}
|
||||||
{if $showML}{$showML}{/if}
|
{if isset($showML)}{$showML}{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{if $case_rename}
|
{* A $case_rename can not respond to reload page while in JS - serendipity.rename() ajax will reload and set message events by script *}
|
||||||
{if $go_back}
|
|
||||||
<input class="go_back" type="button" value="{$CONST.BACK}">
|
|
||||||
{else}
|
|
||||||
<script>location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";</script>
|
|
||||||
<noscript><a class="button_link icon_link standalone" href="?serendipity[adminModule]=images&serendipity[adminAction]=default">{$CONST.DONE}</a></noscript>
|
|
||||||
{/if}
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{* TODO: obsolete? *}
|
|
||||||
{if $case_properties}
|
|
||||||
{** serendipity_showPropertyForm($new_media) **}
|
|
||||||
{/if}
|
|
||||||
{* END *}
|
|
||||||
|
|
||||||
{if $case_add}
|
{if $case_add}
|
||||||
{if $smarty.post.adminSubAction == 'properties'}
|
{if isset($showML)}{$showML}{/if}
|
||||||
<script>location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";</script>
|
|
||||||
<noscript><a class="button_link icon_link standalone" href="?serendipity[adminModule]=images&serendipity[adminAction]=default">{$CONST.DONE}</a></noscript>
|
|
||||||
{else}
|
|
||||||
{$showML}
|
|
||||||
{/if}
|
|
||||||
{/if}
|
{/if}
|
||||||
{if $case_directoryDoDelete}
|
{if $case_directoryDoDelete}
|
||||||
{if $print_DIRECTORY_WRITE_ERROR}<span class="msg_error"><span class="icon-attention-circled"></span> {$print_DIRECTORY_WRITE_ERROR}</span>{/if}
|
{if $print_DIRECTORY_WRITE_ERROR}<span class="msg_error"><span class="icon-attention-circled"></span> {$print_DIRECTORY_WRITE_ERROR}</span>{/if}
|
||||||
{if $ob_serendipity_killPath}{$ob_serendipity_killPath}{/if}
|
{if isset($ob_serendipity_killPath)}{$ob_serendipity_killPath}{/if}
|
||||||
{if $print_ERROR_NO_DIRECTORY}<span class="msg_error"><span class="icon-attention-circled"></span> {$print_ERROR_NO_DIRECTORY}</span>{/if}
|
{if $print_ERROR_NO_DIRECTORY}<span class="msg_error"><span class="icon-attention-circled"></span> {$print_ERROR_NO_DIRECTORY}</span>{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{if $case_directoryEdit}
|
{if $case_directoryEdit}
|
||||||
{if !empty($smarty.post.save)}
|
{if !empty($smarty.post.serendipity.save)}
|
||||||
{if $ob_serendipity_moveMediaDirectory}<span class="msg_notice"><span class="icon-info-circled"></span> {$ob_serendipity_moveMediaDirectory}</span>{/if}
|
<span class="msg_notice"><span class="icon-info-circled"></span> {$print_SETTINGS_SAVED_AT}</span>
|
||||||
<span class="msg_notice"><span class="icon-info-circled"></span> {$print_CONST.SETTINGS_SAVED_AT}</span>
|
|
||||||
{/if}
|
{/if}
|
||||||
<h2>{$CONST.MANAGE_DIRECTORIES}</h2>
|
<h2>{$CONST.MANAGE_DIRECTORIES}</h2>
|
||||||
|
|
||||||
@ -166,7 +146,7 @@
|
|||||||
<select id="dircreate_parent" name="serendipity[parent]">
|
<select id="dircreate_parent" name="serendipity[parent]">
|
||||||
<option value="">{$CONST.BASE_DIRECTORY}</option>
|
<option value="">{$CONST.BASE_DIRECTORY}</option>
|
||||||
{foreach $folders as $folder}
|
{foreach $folders as $folder}
|
||||||
<option{if $folder.relpath == $get.only_path || $folder.relpath == $dir} selected{/if} value="{$folder.relpath}">{' '|str_repeat:($folder.depth*2)} {$folder.name}</option>
|
<option{if $folder.relpath == $get.only_path || $folder.relpath == $dir} selected{/if} value="{$folder.relpath}">{' '|str_repeat:($folder.depth*2)}{$folder.name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -180,24 +160,33 @@
|
|||||||
{if $case_directorySelect}
|
{if $case_directorySelect}
|
||||||
<h2>{$CONST.MANAGE_DIRECTORIES}</h2>
|
<h2>{$CONST.MANAGE_DIRECTORIES}</h2>
|
||||||
|
|
||||||
<h3>{$CONST.BASE_DIRECTORY}</h3>
|
<h3>{$CONST.BASE_DIRECTORY} <span class="media_file_actions actions"><a class="media_show_info button_link" href="#media_directory_info" title="{$CONST.DIRECTORY_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.DIRECTORY_INFO}</span></a></span></h3>
|
||||||
|
<header id="media_directory_info" class="media_directory_info additional_info">
|
||||||
|
<span class="msg_notice">{$CONST.DIRECTORY_INFO_DESC}</span>
|
||||||
|
</header>
|
||||||
|
|
||||||
<ul id="serendipity_image_folders" class="option_list">
|
<ul id="serendipity_image_folders" class="option_list">
|
||||||
{foreach $folders as $folder}
|
{foreach $folders as $folder}
|
||||||
{if ! $folder@first}
|
{if ! $folder@first}
|
||||||
{if $folder.depth > $priorDepth}
|
{if ($folder.depth > $priorDepth)}
|
||||||
<ul>
|
|
||||||
|
<ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $folder.depth < $priorDepth}
|
{if $folder.depth < $priorDepth}
|
||||||
</li>
|
|
||||||
{for $i=$folder.depth+1 to $priorDepth}
|
</li>
|
||||||
</ul></li>
|
|
||||||
{/for}
|
{for $i=($folder.depth+1) to $priorDepth}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{/for}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $folder.depth == $priorDepth}
|
{if ($folder.depth == $priorDepth)}
|
||||||
</li>
|
|
||||||
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@ -214,10 +203,16 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
{for $i=1 to $priorDepth}
|
{for $i=1 to $priorDepth}
|
||||||
</ul></li>
|
{if $i != $priorDepth}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
{/for}
|
{/for}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryCreate">{$CONST.CREATE_NEW_DIRECTORY}</a>
|
<a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryCreate">{$CONST.CREATE_NEW_DIRECTORY}</a>
|
||||||
@ -242,9 +237,9 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{if $case_scale}
|
{if $case_scale}
|
||||||
{if $print_SCALING_IMAGE}<span class="msg_notice"><span class="icon-info-circled"></span> {$print_SCALING_IMAGE}</span>{/if}
|
{if isset($print_SCALING_IMAGE)}<span class="msg_notice"><span class="icon-info-circled"></span> {$print_SCALING_IMAGE}</span>{/if}
|
||||||
{if $print_serendipity_scaleImg}<span class="msg_notice"><span class="icon-info-circled"></span> {$print_serendipity_scaleImg}</span>{/if}
|
{if isset($scaleImgError)}<span class="msg_error"><span class="icon-attention-circled"></span> {$scaleImgError}</span>{/if}
|
||||||
<span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.DONE}</span>
|
{if isset($is_done)}<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}</span>{/if}
|
||||||
{if $showML}{$showML}{/if}
|
{if $showML}{$showML}{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{if $case_scaleSelect}
|
{if $case_scaleSelect}
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<main id="workspace" class="clearfix">
|
<main id="workspace" class="clearfix">
|
||||||
{if NOT $admin_vars.is_logged_in}
|
{if NOT $admin_vars.is_logged_in}
|
||||||
{$admin_vars.out|@serendipity_refhookPlugin:'backend_login_page'}
|
{$admin_vars.out|@serendipity_refhookPlugin:'backend_login_page'}
|
||||||
@ -160,8 +161,10 @@
|
|||||||
{$admin_vars.main_content}
|
{$admin_vars.main_content}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
{if NOT $admin_vars.no_footer}
|
{if NOT $admin_vars.no_footer}
|
||||||
|
|
||||||
<footer id="meta">
|
<footer id="meta">
|
||||||
<p>{$admin_vars.version_info}</p>
|
<p>{$admin_vars.version_info}</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
{if $media.file.is_image}
|
{if $media.file.is_image}
|
||||||
{serendipity_hookPlugin hook="frontend_image_selector" eventData=$media.file hookAll=true}
|
{serendipity_hookPlugin hook="frontend_image_selector" eventData=$media.file hookAll=true}
|
||||||
<h1>{$CONST.YOU_CHOSE|@sprintf:$media.file.realname}</h1>
|
<h1>{$CONST.YOU_CHOSE|sprintf:$media.file.realname}</h1>
|
||||||
|
|
||||||
<img src="{$media.file.imgsrc}" alt="">
|
<img src="{$media.file.imgsrc}" alt="">
|
||||||
|
|
||||||
@ -41,12 +41,12 @@
|
|||||||
|
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input id="radio_link_no" name="serendipity[linkThumbnail]" type="radio" value="no" {'linkThumbnail'|@ifRemember:'no':true}>
|
<input id="radio_link_no" name="serendipity[linkThumbnail]" type="radio" value="no" {'linkThumbnail'|ifRemember:'no':true}>
|
||||||
<label for="radio_link_no">{$CONST.I_WANT_THUMB}</label>
|
<label for="radio_link_no">{$CONST.I_WANT_THUMB}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input id="radio_link_yes" name="serendipity[linkThumbnail]" type="radio" value="yes" {'linkThumbnail'|@ifRemember:'yes'}>
|
<input id="radio_link_yes" name="serendipity[linkThumbnail]" type="radio" value="yes" {'linkThumbnail'|ifRemember:'yes'}>
|
||||||
<label for="radio_link_yes">{$CONST.I_WANT_BIG_IMAGE}</label>
|
<label for="radio_link_yes">{$CONST.I_WANT_BIG_IMAGE}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -58,17 +58,17 @@
|
|||||||
|
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input id="image_align_top" name="serendipity[align]" {'align'|@ifRemember:''} type="radio" value="">
|
<input id="image_align_top" name="serendipity[align]" {'align'|ifRemember:''} type="radio" value="">
|
||||||
<label for="image_align_top"><img src="{serendipity_getFile file='img/img_align_top.png'}" alt="{$CONST.ALIGN_TOP}"></label>
|
<label for="image_align_top"><img src="{serendipity_getFile file='img/img_align_top.png'}" alt="{$CONST.ALIGN_TOP}"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input id="image_align_left" name="serendipity[align]" {'align'|@ifRemember:'left':true} type="radio" value="left">
|
<input id="image_align_left" name="serendipity[align]" {'align'|ifRemember:'left':true} type="radio" value="left">
|
||||||
<label for="image_align_left"><img src="{serendipity_getFile file='img/img_align_left.png'}" alt="{$CONST.ALIGN_LEFT}"></label>
|
<label for="image_align_left"><img src="{serendipity_getFile file='img/img_align_left.png'}" alt="{$CONST.ALIGN_LEFT}"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input id="image_align_right" name="serendipity[align]" {'align'|@ifRemember:'right'} type="radio" value="right">
|
<input id="image_align_right" name="serendipity[align]" {'align'|ifRemember:'right'} type="radio" value="right">
|
||||||
<label for="image_align_right"><img src="{serendipity_getFile file='img/img_align_right.png'}" alt="{$CONST.ALIGN_RIGHT}"></label>
|
<label for="image_align_right"><img src="{serendipity_getFile file='img/img_align_right.png'}" alt="{$CONST.ALIGN_RIGHT}"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -80,12 +80,12 @@
|
|||||||
|
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input id="radio_islink_no" name="serendipity[isLink]" type="radio" value="no" {'isLink'|@ifRemember:'no':true}>
|
<input id="radio_islink_no" name="serendipity[isLink]" type="radio" value="no" {'isLink'|ifRemember:'no':true}>
|
||||||
<label for="radio_islink_no">{$CONST.I_WANT_NO_LINK}</label>
|
<label for="radio_islink_no">{$CONST.I_WANT_NO_LINK}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input id="radio_islink_yes" name="serendipity[isLink]" type="radio" value="yes" {'isLink'|@ifRemember:'yes'}>
|
<input id="radio_islink_yes" name="serendipity[isLink]" type="radio" value="yes" {'isLink'|ifRemember:'yes'}>
|
||||||
<label for="radio_islink_yes">{$CONST.I_WANT_IT_TO_LINK}</label>
|
<label for="radio_islink_yes">{$CONST.I_WANT_IT_TO_LINK}</label>
|
||||||
|
|
||||||
<div class="form_field">
|
<div class="form_field">
|
||||||
@ -103,10 +103,10 @@
|
|||||||
|
|
||||||
<div class="form_select">
|
<div class="form_select">
|
||||||
<select id="select_image_target" name="serendipity[target]">
|
<select id="select_image_target" name="serendipity[target]">
|
||||||
<option value="none" {'target'|@ifRemember:'none':false:'selected'}>{$CONST.NONE}</option>
|
<option value="none" {'target'|ifRemember:'none':false:'selected'}>{$CONST.NONE}</option>
|
||||||
<option value="js" {'target'|@ifRemember:'js':false:'selected'}>{$CONST.MEDIA_TARGET_JS}</option>
|
<option value="js" {'target'|ifRemember:'js':false:'selected'}>{$CONST.MEDIA_TARGET_JS}</option>
|
||||||
<option value="plugin" {'target'|@ifRemember:'plugin':false:'selected'}>{$CONST.MEDIA_ENTRY}</option>
|
<option value="plugin" {'target'|ifRemember:'plugin':false:'selected'}>{$CONST.MEDIA_ENTRY}</option>
|
||||||
<option value="_blank" {'target'|@ifRemember:'_blank':false:'selected'}>{$CONST.MEDIA_TARGET_BLANK}</option>
|
<option value="_blank" {'target'|ifRemember:'_blank':false:'selected'}>{$CONST.MEDIA_TARGET_BLANK}</option>
|
||||||
</select>
|
</select>
|
||||||
{serendipity_hookPlugin hookAll=true hook='frontend_image_selector_imagelink2' eventData=$media.file}
|
{serendipity_hookPlugin hookAll=true hook='frontend_image_selector_imagelink2' eventData=$media.file}
|
||||||
<label for="select_image_target">{$CONST.MEDIA_TARGET}</label>
|
<label for="select_image_target">{$CONST.MEDIA_TARGET}</label>
|
||||||
@ -143,6 +143,11 @@
|
|||||||
{if $media.filename_only}
|
{if $media.filename_only}
|
||||||
<script>
|
<script>
|
||||||
{serendipity_hookPlugin hookAll=true hook='frontend_image_add_filenameonly' eventData=$media}
|
{serendipity_hookPlugin hookAll=true hook='frontend_image_add_filenameonly' eventData=$media}
|
||||||
|
if (parent.self.opener == undefined) {
|
||||||
|
// in iframes, there is no opener, and the magnific popup is wrapped
|
||||||
|
parent.self = window.parent.parent.$.magnificPopup;
|
||||||
|
parent.self.opener = window.parent.parent;
|
||||||
|
}
|
||||||
parent.self.opener.serendipity.serendipity_imageSelector_addToElement('{$media.file.full_file|escape}', '{$media.htmltarget|escape}');
|
parent.self.opener.serendipity.serendipity_imageSelector_addToElement('{$media.file.full_file|escape}', '{$media.htmltarget|escape}');
|
||||||
parent.self.close();
|
parent.self.close();
|
||||||
</script>
|
</script>
|
||||||
@ -155,11 +160,11 @@
|
|||||||
parent.self = window.parent.parent.$.magnificPopup;
|
parent.self = window.parent.parent.$.magnificPopup;
|
||||||
parent.self.opener = window.parent.parent;
|
parent.self.opener = window.parent.parent;
|
||||||
}
|
}
|
||||||
if (parent.self.opener.editorref) {
|
if (parent.self.opener.editorref) {
|
||||||
parent.self.opener.editorref.surroundHTML(block, '');
|
parent.self.opener.editorref.surroundHTML(block, '');
|
||||||
} else {
|
} else {
|
||||||
parent.self.opener.serendipity.serendipity_imageSelector_addToBody(block, '{$media.textarea}');
|
parent.self.opener.serendipity.serendipity_imageSelector_addToBody(block, '{$media.textarea}');
|
||||||
}
|
}
|
||||||
parent.self.close();
|
parent.self.close();
|
||||||
</script>
|
</script>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{foreach from=$media.files item="file" name="mediafiles" key="mediakey"}
|
{foreach $media.files AS $file}
|
||||||
{if NOT $media.manage}
|
{if NOT $media.manage}
|
||||||
{* ML got called for inserting media *}
|
{* ML got called for inserting media *}
|
||||||
{if $file.is_image AND $file.full_thumb}
|
{if $file.is_image AND $file.full_thumb}
|
||||||
{if $media.textarea || $media.htmltarget}
|
{if $media.textarea || $media.htmltarget}
|
||||||
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[fid]={$file.id}&serendipity[textarea]={$media.textarea}&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[filename_only]={$media.filename_only}&serendipity[htmltarget]={$media.htmltarget}"}
|
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[fid]={$file.id}&serendipity[textarea]={$media.textarea}&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[filename_only]={$media.filename_only}&serendipity[htmltarget]={$media.htmltarget}"}
|
||||||
{else}
|
{else}
|
||||||
{if $file.url}
|
{if $file.url}
|
||||||
{$link="{$file.url}&serendipity[image]={$file.id}"}
|
{$link="{$file.url}&serendipity[image]={$file.id}"}
|
||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
{elseif $file.is_image AND $file.hotlink}
|
{elseif $file.is_image AND $file.hotlink}
|
||||||
{if $media.textarea}
|
{if $media.textarea}
|
||||||
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[fid]={$file.id}&serendipity[textarea]={$media.textarea}&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[filename_only]={$media.filename_only}&serendipity[htmltarget]={$media.htmltarget}"}
|
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[fid]={$file.id}&serendipity[textarea]={$media.textarea}&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[filename_only]={$media.filename_only}&serendipity[htmltarget]={$media.htmltarget}"}
|
||||||
{else}
|
{else}
|
||||||
{if $file.url}
|
{if $file.url}
|
||||||
{$link="{$file.$url}&serendipity[image]={$file.id}"}
|
{$link="{$file.$url}&serendipity[image]={$file.id}"}
|
||||||
@ -27,7 +27,7 @@
|
|||||||
{$img_alt="{$file.realname}"}
|
{$img_alt="{$file.realname}"}
|
||||||
{else}
|
{else}
|
||||||
{if $media.textarea}
|
{if $media.textarea}
|
||||||
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[fid]={$file.id}&serendipity[textarea]={$media.textarea}&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[filename_only]={$media.filename_only}&serendipity[htmltarget]={$media.htmltarget}"}
|
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[fid]={$file.id}&serendipity[textarea]={$media.textarea}&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[filename_only]={$media.filename_only}&serendipity[htmltarget]={$media.htmltarget}"}
|
||||||
{else}
|
{else}
|
||||||
{if $file.url}
|
{if $file.url}
|
||||||
{$link="{$file.$url}&serendipity[image]={$file.id}"}
|
{$link="{$file.$url}&serendipity[image]={$file.id}"}
|
||||||
@ -47,7 +47,7 @@
|
|||||||
{$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"}
|
{$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"}
|
||||||
{$img_src="{$file.path}"}
|
{$img_src="{$file.path}"}
|
||||||
{$img_title="{$file.path}"}
|
{$img_title="{$file.path}"}
|
||||||
$img_alt="{$file.realname}"}
|
{$img_alt="{$file.realname}"}
|
||||||
{else}
|
{else}
|
||||||
{$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"}
|
{$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"}
|
||||||
{$img_src="{$file.mimeicon}"}
|
{$img_src="{$file.mimeicon}"}
|
||||||
@ -55,158 +55,210 @@
|
|||||||
{$img_alt="{$file.mime}"}
|
{$img_alt="{$file.mime}"}
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
<article id="media_{$file.id}" class="media_file {cycle values="odd,even"}">
|
{* builds a ML objects link for step 1, to pass to media_choose.tpl file section: passthrough media.filename_only scripts - do not use "empty($link) AND" here, since that would require a reset before! *}
|
||||||
<header class="clearfix">
|
{if (!$file.is_image OR $file.is_image == 0) AND $file.mediatype != 'image' AND $file.realfile}
|
||||||
<div class="form_check">
|
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[fid]={$file.id}&serendipity[filename_only]={$media.filename_only}&serendipity[textarea]={$media.textarea}&serendipity[htmltarget]={$media.htmltarget}"}
|
||||||
<input id="multidelete_image{$file.id}" class="multidelete" name="serendipity[multiDelete][]" type="checkbox" value="{$file.id}" data-multidelid="media_{$file.id}"><label for="multidelete_image{$file.id}" class="visuallyhidden">{$CONST.TOGGLE_SELECT}</label>
|
{/if}
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3 title="{$file.realname}">{$file.realname|truncate:30:"…"}{if $file.orderkey != ''}: {$file.orderkey|escape}{/if}</h3>
|
<article id="media_{$file.id}" class="media_file {if $media.manage}manage {/if}{cycle values="odd,even"}">
|
||||||
{if $file.authorid != 0}<span class="author block_level">{$file.authorname}</span>{/if}
|
<header class="clearfix">
|
||||||
</header>
|
{if $media.manage}
|
||||||
|
|
||||||
<div class="clearfix equal_heights media_file_wrap">
|
<div class="form_check">
|
||||||
<div class="media_file_preview">
|
<input id="multidelete_image{$file.id}" class="multidelete" name="serendipity[multiDelete][]" type="checkbox" value="{$file.id}" data-multidelid="media_{$file.id}">
|
||||||
<a {if $media.manage}class="media_fullsize"{/if} href="{$link}" title="{$CONST.MEDIA_FULLSIZE}: {$file.realname}" data-pwidth="{$file.popupWidth}" data-pheight="{$file.popupHeight}">
|
<label for="multidelete_image{$file.id}" class="visuallyhidden">{$CONST.TOGGLE_SELECT}</label>
|
||||||
<img src="{$img_src}" title="{$img_title}" alt="{$img_alt}">
|
</div>
|
||||||
</a>
|
{/if}
|
||||||
<footer id="media_file_meta_{$file.id}" class="media_file_meta additional_info">
|
|
||||||
<ul class="plainList">
|
<h3 title="{$file.realname}">{$file.realname|truncate:50:"…":true}{if $file.orderkey != ''}: {$file.orderkey|escape}{/if}</h3>
|
||||||
|
{if $file.authorid != 0}<span class="author block_level">{$file.authorname}</span>{/if}
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="clearfix equal_heights media_file_wrap">
|
||||||
|
<div class="media_file_preview">
|
||||||
|
<a {if $media.manage}class="media_fullsize"{/if} href="{$link}" title="{$CONST.MEDIA_FULLSIZE}: {$file.realname}" data-pwidth="{$file.popupWidth}" data-pheight="{$file.popupHeight}">
|
||||||
|
<img src="{$img_src}" title="{$img_title}" alt="{$img_alt}">
|
||||||
|
</a>
|
||||||
|
<footer id="media_file_meta_{$file.id}" class="media_file_meta additional_info">
|
||||||
|
<ul class="plainList">
|
||||||
|
{if $file.hotlink}
|
||||||
|
|
||||||
|
<li><b>{$CONST.MEDIA_HOTLINKED}:</b> {$file.nice_hotlink}</li>
|
||||||
|
{else}
|
||||||
|
{if $file.realname != $file.diskname}
|
||||||
|
|
||||||
|
<li title="{$file.diskname}">{$file.diskname|truncate:30:"…"}</li>
|
||||||
|
{/if}
|
||||||
|
{if $file.mime}
|
||||||
|
|
||||||
|
<li><b>MIME-Type:</b> {$file.mime}</li>
|
||||||
|
{/if}
|
||||||
|
{if $file.is_image}
|
||||||
|
|
||||||
|
<li><b>{$CONST.ORIGINAL_SHORT}:</b> {$file.dimensions_width}x{$file.dimensions_height}</li>
|
||||||
|
<li><b>{$CONST.THUMBNAIL_SHORT}:</b> {$file.dim.0}x{$file.dim.1}</li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<li><b>{$CONST.IMAGE_SIZE}:</b> {$file.nice_size} KB</li>
|
||||||
|
<li><b>{$CONST.INSTALL_RELUPLOADPATH}:</b> "{$file.path}"</li>
|
||||||
|
<li><b>{$CONST.DATE}:</b> {$file.date|formatTime:DATE_FORMAT_SHORT}</li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{if $media.manage || {serendipity_getConfigVar key='showMediaToolbar'}}
|
||||||
|
|
||||||
|
<ul class="media_file_actions actions plainList clearfix">
|
||||||
|
<li><a class="media_show_info button_link" href="#media_file_meta_{$file.id}" title="{$CONST.SHOW_METADATA}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.SHOW_METADATA}</span></a></li>
|
||||||
|
{if $file.is_editable}
|
||||||
|
|
||||||
|
<li><button class="media_rename button_link" type="button" title="{$CONST.MEDIA_RENAME}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.MEDIA_RENAME}</span></button></li>
|
||||||
|
{if $file.is_image AND NOT $file.hotlink}
|
||||||
|
|
||||||
|
<li><a class="media_resize button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=scaleSelect&serendipity[fname]={$file.name|truncate:30:"…"}&serendipity[fid]={$file.id}&{$media.extraParems}" title="{$CONST.IMAGE_RESIZE}"><span class="icon-resize-full"></span><span class="visuallyhidden"> {$CONST.IMAGE_RESIZE}</span></a></li>
|
||||||
|
{/if}
|
||||||
|
{if $file.is_image AND NOT $file.hotlink}
|
||||||
|
|
||||||
|
<li><a class="media_rotate_left button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_LEFT}"><span class="icon-ccw"></span><span class="visuallyhidden"> {$CONST.IMAGE_ROTATE_LEFT}</span></a></li>
|
||||||
|
{/if}
|
||||||
|
{if $file.is_image AND NOT $file.hotlink}
|
||||||
|
|
||||||
|
<li><a class="media_rotate_right button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_RIGHT}"><span class="icon-cw"></span><span class="visuallyhidden">{$CONST.IMAGE_ROTATE_RIGHT}</span></a></li>
|
||||||
|
{/if}
|
||||||
|
{if $media.manage}
|
||||||
|
|
||||||
|
<li><a class="media_prop button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=properties&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_PROP}"><span class="icon-picture"></span><span class="visuallyhidden"> {$CONST.MEDIA_PROP}</span></a></li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<li><a class="media_delete button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=delete&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_DELETE}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.MEDIA_DELETE}</span></a></li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
{if NOT $media.enclose}
|
||||||
|
|
||||||
|
<article class="media_file media_enclose_no">
|
||||||
|
<header>
|
||||||
|
<h3>{$file.realname}</h3>
|
||||||
|
<span class="block_level"><b>{$CONST.SORT_ORDER_EXTENSION}:</b> {$file.mime}{if $file.realname != $file.diskname}, {$file.diskname}{/if}</span>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<ul class="media_file_meta plainList">
|
||||||
|
<li><b>{$CONST.SORT_ORDER_DATE}:</b> {if $file.authorid != 0}{$CONST.POSTED_BY} {$file.authorname} {/if}{$CONST.ON} {$file.date|formatTime:DATE_FORMAT_SHORT}</li>
|
||||||
{if $file.hotlink}
|
{if $file.hotlink}
|
||||||
<li>{$file.nice_hotlink}</li>
|
|
||||||
<li>{$CONST.MEDIA_HOTLINKED}</li>
|
<li><b>{$CONST.MEDIA_HOTLINKED}:</b> {$file.nice_hotlink}</li>
|
||||||
{else}
|
{elseif $file.is_image}
|
||||||
{if $file.realname != $file.diskname}
|
|
||||||
<li title="{$file.diskname}">{$file.diskname|truncate:30:"…"}</li>
|
|
||||||
{/if}
|
|
||||||
{if $file.mime}
|
|
||||||
<li><b>MIME-Type:</b> {$file.mime}</li>
|
|
||||||
{/if}
|
|
||||||
{if $file.is_image}
|
|
||||||
<li><b>{$CONST.ORIGINAL_SHORT}:</b> {$file.dimensions_width}x{$file.dimensions_height}</li>
|
<li><b>{$CONST.ORIGINAL_SHORT}:</b> {$file.dimensions_width}x{$file.dimensions_height}</li>
|
||||||
<li><b>{$CONST.THUMBNAIL_SHORT}:</b> {$file.dim.0}x{$file.dim.1}</li>
|
<li><b>{$CONST.THUMBNAIL_SHORT}:</b> {$file.dim.0}x{$file.dim.1}</li>
|
||||||
{/if}
|
|
||||||
<li><b>{$CONST.IMAGE_SIZE}:</b> {$file.nice_size} KB</li>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<li><b>{$CONST.IMAGE_SIZE}:</b> {$file.nice_size} KB</li>
|
||||||
</ul>
|
</ul>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{if $media.manage || {serendipity_getConfigVar key='showMediaToolbar'}}
|
|
||||||
<ul class="media_file_actions actions plainList clearfix">
|
|
||||||
<li><a class="media_show_info button_link" href="#media_file_meta_{$file.id}" title="{$CONST.SHOW_METADATA}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.SHOW_METADATA}</span></a></li>
|
|
||||||
{if $file.is_editable}
|
|
||||||
<li><button class="media_rename button_link" type="button" title="{$CONST.MEDIA_RENAME}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.MEDIA_RENAME}</span></button></li>
|
|
||||||
{if $file.is_image AND NOT $file.hotlink}
|
|
||||||
<li><a class="media_resize button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=scaleSelect&serendipity[fname]={$file.name|truncate:30:"…"}&serendipity[fid]={$file.id}{$media.extraParems}" title="{$CONST.IMAGE_RESIZE}"><span class="icon-resize-full"></span><span class="visuallyhidden"> {$CONST.IMAGE_RESIZE}</span></a></li>
|
|
||||||
{/if}
|
|
||||||
{if $file.is_image AND NOT $file.hotlink}
|
|
||||||
<li><a class="media_rotate_left button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_LEFT}"><span class="icon-ccw"></span><span class="visuallyhidden"> {$CONST.IMAGE_ROTATE_LEFT}</span></a></li>
|
|
||||||
{/if}
|
|
||||||
{if $file.is_image AND NOT $file.hotlink}
|
|
||||||
<li><a class="media_rotate_right button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_RIGHT}"><span class="icon-cw"></span><span class="visuallyhidden">{$CONST.IMAGE_ROTATE_RIGHT}</span></a></li>
|
|
||||||
{/if}
|
|
||||||
{if $media.manage}
|
|
||||||
<li><a class="media_prop button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=properties&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_PROP}"><span class="icon-picture"></span><span class="visuallyhidden"> {$CONST.MEDIA_PROP}</span></a></li>
|
|
||||||
{/if}
|
|
||||||
<li><a class="media_delete button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=delete&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_DELETE}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.MEDIA_DELETE}</span></a></li>
|
|
||||||
{/if}
|
|
||||||
</ul>
|
|
||||||
{/if}
|
|
||||||
</article>
|
|
||||||
|
|
||||||
{if NOT $media.enclose}
|
<input type="hidden" name="serendipity[mediaProperties][{$file@key}][image_id]" value="{$file.image_id}">
|
||||||
<article class="media_file media_enclose_no">
|
|
||||||
<header>
|
|
||||||
<h3>{$file.realname}</h3>
|
|
||||||
<span class="block_level"><b>{$CONST.SORT_ORDER_EXTENSION}:</b> {$file.mime}{if $file.realname != $file.diskname}, {$file.diskname}{/if}</span>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<footer>
|
<section class="media_file_props">
|
||||||
<ul class="media_file_meta plainList">
|
<h4>{$CONST.MEDIA_PROP}</h4>
|
||||||
<li><b>{$CONST.SORT_ORDER_DATE}:</b> {if $file.authorid != 0}{$CONST.POSTED_BY} {$file.authorname} {/if}{$CONST.ON} {$file.date|@formatTime:DATE_FORMAT_SHORT}</li>
|
{foreach $file.base_property AS $prop_content}
|
||||||
{if $file.hotlink}
|
|
||||||
<li>{$file.nice_hotlink}</li>
|
|
||||||
{elseif $file.is_image}
|
|
||||||
<li><b>{$CONST.ORIGINAL_SHORT}:</b> {$file.dimensions_width}x{$file.dimensions_height}</li>
|
|
||||||
<li><b>{$CONST.THUMBNAIL_SHORT}:</b> {$file.dim.0}x{$file.dim.1}</li>
|
|
||||||
{/if}
|
|
||||||
<li><b>{$CONST.IMAGE_SIZE}:</b> {$file.nice_size} KB</li>
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<input type="hidden" name="serendipity[mediaProperties][{$mediakey}][image_id]" value="{$file.image_id}">
|
|
||||||
|
|
||||||
<section class="media_file_props">
|
<div class="form_{if $prop_content.type == 'textarea'}area{else}field{/if}">
|
||||||
<h4>{$CONST.MEDIA_PROP}</h4>
|
<label for="mediaProperty{$prop_content@key}">{$prop_content.label}</label>
|
||||||
{foreach from=$file.base_property key="prop_fieldname" item="prop_content"}
|
{if $prop_content.type == 'textarea'}
|
||||||
<div class="form_{if $prop_content.type == 'textarea'}area{else}field{/if}">
|
|
||||||
<label for="mediaProperty{$prop_fieldname}">{$prop_content.label}</label>
|
|
||||||
{if $prop_content.type == 'textarea'}
|
|
||||||
<textarea id="mediaProperty{$prop_fieldname}" name="serendipity[mediaProperties][{$mediakey}][{$prop_content.title}]" rows="5">{$prop_content.val|escape}</textarea>
|
|
||||||
{elseif $prop_content.type == 'readonly'}
|
|
||||||
{$prop_content.val|escape}
|
|
||||||
{elseif $prop_content.type == 'input'}
|
|
||||||
<input id="mediaProperty{$prop_fieldname}" name="serendipity[mediaProperties][{$mediakey}][{$prop_content.title}]" type="text" value="{$prop_content.val|escape}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/foreach}
|
|
||||||
{if NOT $file.hotlink}
|
|
||||||
<div class="form_select">
|
|
||||||
<label for="newDir{$mediakey}">{$CONST.FILTER_DIRECTORY}</label>
|
|
||||||
<input type="hidden" name="serendipity[oldDir][{$mediakey}]" value="{$file.path|escape}">
|
|
||||||
<select id="newDir{$mediakey}" name="serendipity[newDir][{$mediakey}]">
|
|
||||||
<option value=""></option>
|
|
||||||
{foreach from=$media.paths item="folder"}
|
|
||||||
<option{if ($file.path == $folder.relpath)} selected{/if} value="{$folder.relpath}">{' '|str_repeat:($folder.depth*2)}{$folder.name}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="media_file_keywords">
|
<textarea id="mediaProperty{$prop_content@key}" name="serendipity[mediaProperties][{$file@key}][{$prop_content.title}]" rows="5">{$prop_content.val|escape}</textarea>
|
||||||
<h4>{$CONST.MEDIA_KEYWORDS}</h4>
|
{elseif $prop_content.type == 'readonly'}
|
||||||
|
{$prop_content.val|escape}
|
||||||
|
{elseif $prop_content.type == 'input'}
|
||||||
|
|
||||||
<ul class="clearfix plainList">
|
<input id="mediaProperty{$prop_content@key}" name="serendipity[mediaProperties][{$file@key}][{$prop_content.title}]" type="text" value="{$prop_content.val|escape}">
|
||||||
{foreach from=$file.base_keywords key="keyword_row" item="keyword_cells"}
|
|
||||||
{foreach from=$keyword_cells key="keyword_cell" item="keyword"}
|
|
||||||
{if $keyword.name}
|
|
||||||
<li><input id="mediaKeyword{$keyword.name}{$mediakey}" name="serendipity[mediaKeywords][{$mediakey}][{$keyword.name}]" type="checkbox" value="true"{if $keyword.selected} checked="checked"{/if}>
|
|
||||||
<label for="mediaKeyword{$keyword.name}{$mediakey}">{$keyword.name|truncate:20:"…"}</label></li>
|
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
|
||||||
{/foreach}
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="media_file_metadata clearfix">
|
</div>
|
||||||
<h4>EXIF/IPTC/XMP</h4>
|
{/foreach}
|
||||||
{foreach from=$file.metadata key="meta_type" item="meta_data"}
|
{if NOT $file.hotlink}
|
||||||
<h5>{$meta_type}</h5>
|
|
||||||
{if is_array($meta_data)}
|
<div class="form_select">
|
||||||
<dl class="clearfix">
|
<label for="newDir{$file@key}">{$CONST.FILTER_DIRECTORY}</label>
|
||||||
{foreach from=$meta_data key="meta_name" item="meta_value"}
|
<input type="hidden" name="serendipity[oldDir][{$file@key}]" value="{$file.path|escape}">
|
||||||
<dt>{$meta_name}</dt>
|
<select id="newDir{$file@key}" name="serendipity[newDir][{$file@key}]">
|
||||||
<dd>{if is_array($meta_value)}{$meta_value|@print_r}{else}{$meta_value|@formatTime:DATE_FORMAT_SHORT:false:$meta_name}{/if}</dd>
|
<option{if ($file.path == $folder.relpath)} selected{/if} value="">{$CONST.BASE_DIRECTORY}</option>
|
||||||
{/foreach}
|
{foreach $media.paths AS $folder}
|
||||||
</dl>
|
|
||||||
{else}
|
<option{if ($file.path == $folder.relpath)} selected{/if} value="{$folder.relpath}">{' '|str_repeat:($folder.depth*2)}{$folder.name}</option>
|
||||||
<p>{$meta_data|@formatTime:DATE_FORMAT_SHORT:false:$meta_type}</p>
|
{/foreach}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
|
||||||
</section>
|
|
||||||
{if $file.references}
|
|
||||||
<section class="media_file_referer">
|
|
||||||
<h4>{$CONST.REFERER}</h4>
|
|
||||||
|
|
||||||
<ul>
|
</section>
|
||||||
{foreach from=$file.references item="ref"}
|
|
||||||
<li>({$ref.name|escape}) <a rel="nofollow" href="{$ref.link|escape}">{$ref.link|default:$CONST.NONE|escape}</a></li>
|
<section class="media_file_keywords">
|
||||||
|
<h4>{$CONST.MEDIA_KEYWORDS}</h4>
|
||||||
|
|
||||||
|
<ul class="clearfix plainList">
|
||||||
|
{foreach $file.base_keywords AS $keyword_cells}
|
||||||
|
{foreach $keyword_cells AS $keyword}
|
||||||
|
{if $keyword.name}
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<input id="mediaKeyword{$keyword.name}{$file@key}" name="serendipity[mediaKeywords][{$file@key}][{$keyword.name}]" type="checkbox" value="true"{if $keyword.selected} checked="checked"{/if}>
|
||||||
|
<label for="mediaKeyword{$keyword.name}{$file@key}">{$keyword.name|truncate:20:"…"}</label>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="media_file_metadata clearfix">
|
||||||
|
<h4>EXIF/IPTC/XMP</h4>
|
||||||
|
{foreach $file.metadata AS $meta_data}
|
||||||
|
|
||||||
|
<h5>{$meta_data@key}</h5>
|
||||||
|
{if is_array($meta_data)}
|
||||||
|
|
||||||
|
<dl class="clearfix">
|
||||||
|
{foreach $meta_data AS $meta_value}
|
||||||
|
|
||||||
|
<dt>{$meta_value@key}</dt>
|
||||||
|
<dd>{if is_array($meta_value)}{$meta_value|print_r}{else}{$meta_value|formatTime:DATE_FORMAT_SHORT:false:$meta_value@key}{/if}</dd>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
{else}
|
||||||
|
|
||||||
|
<p>{$meta_data|formatTime:DATE_FORMAT_SHORT:false:$meta_data@key}</p>
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
|
||||||
</section>
|
</section>
|
||||||
|
{if $file.references}
|
||||||
|
<section class="media_file_referer">
|
||||||
|
|
||||||
|
<h4>{$CONST.REFERER}</h4>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{foreach $file.references AS $ref}
|
||||||
|
|
||||||
|
<li>({$ref.name|escape}) <a rel="nofollow" href="{$ref.link|escape}">{$ref.link|default:$CONST.NONE|escape}</a></li>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</article>
|
||||||
{/if}
|
{/if}
|
||||||
</article>
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<div class="has_toolbar">
|
<div class="has_toolbar">
|
||||||
<h2>{$CONST.MEDIA_LIBRARY}</h2>
|
<h2>{$CONST.MEDIA_LIBRARY}</h2>
|
||||||
|
|
||||||
@ -11,86 +12,116 @@
|
|||||||
<div class="form_select">
|
<div class="form_select">
|
||||||
<label for="serendipity_only_path" class="visuallyhidden">{$CONST.FILTER_DIRECTORY}</label>
|
<label for="serendipity_only_path" class="visuallyhidden">{$CONST.FILTER_DIRECTORY}</label>
|
||||||
<select id="serendipity_only_path" name="serendipity[only_path]">
|
<select id="serendipity_only_path" name="serendipity[only_path]">
|
||||||
<option value="">{if NOT $media.limit_path}{$CONST.ALL_DIRECTORIES}{else}{$media.blimit_path}{/if}</option>
|
<option value="">{if NOT $media.limit_path}{if $media.toggle_dir == 'yes'}{$CONST.BASE_DIRECTORY}{else}{$CONST.ALL_DIRECTORIES}{/if}{else}{$media.blimit_path}{/if}</option>
|
||||||
{foreach from=$media.paths item="folder"}
|
{foreach $media.paths AS $folderHead}
|
||||||
<option{if ($media.only_path == $media.limit_path|cat:$folder.relpath)} selected{/if} value="{$folder.relpath}">{' '|str_repeat:($folder.depth*2)}{$folder.name}</option>
|
|
||||||
|
<option{if ($media.only_path == $media.limit_path|cat:$folderHead.relpath)} selected{/if} value="{$folderHead.relpath}">{' '|str_repeat:($folderHead.depth*2)}{$folderHead.name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<input name="go" type="submit" value="{$CONST.GO}">
|
<input name="go" type="submit" value="{$CONST.GO}">
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li id="media_selector_bar"><fieldset>
|
<li id="media_selector_bar">
|
||||||
<input type="radio" id="serendipity[filter][fileCategory][All]" name="serendipity[filter][fileCategory]" {if $media.filter.fileCategory == ""}checked{/if} value=""></input><label for="serendipity[filter][fileCategory][All]" class="media_selector button_link">{$CONST.COMMENTS_FILTER_ALL}</label><input id="serendipity[filter][fileCategory][Image]" type="radio" name="serendipity[filter][fileCategory]" {if $media.filter.fileCategory == "image"}checked{/if} value="image"></input><label for="serendipity[filter][fileCategory][Image]" class="media_selector button_link">{$CONST.IMAGE}</label><input id="serendipity[filter][fileCategory][Video]" type="radio" name="serendipity[filter][fileCategory]" {if $media.filter.fileCategory == "video"}checked{/if} value="video"></input><label for="serendipity[filter][fileCategory][Video]" class="media_selector button_link">{$CONST.VIDEO}</label>
|
<fieldset>
|
||||||
|
<input id="serendipity[filter][fileCategory][All]" type="radio" name="serendipity[filter][fileCategory]"{if $media.filter.fileCategory == ""} checked{/if} value="">
|
||||||
|
<label for="serendipity[filter][fileCategory][All]" class="media_selector button_link">{$CONST.COMMENTS_FILTER_ALL}</label>
|
||||||
|
<input id="serendipity[filter][fileCategory][Image]" type="radio" name="serendipity[filter][fileCategory]"{if $media.filter.fileCategory == "image"} checked{/if} value="image">
|
||||||
|
<label for="serendipity[filter][fileCategory][Image]" class="media_selector button_link">{$CONST.IMAGE}</label>
|
||||||
|
<input id="serendipity[filter][fileCategory][Video]" type="radio" name="serendipity[filter][fileCategory]"{if $media.filter.fileCategory == "video"} checked{/if} value="video">
|
||||||
|
<label for="serendipity[filter][fileCategory][Video]" class="media_selector button_link">{$CONST.VIDEO}</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="media_dir_radio" class="media_select_strict">
|
||||||
|
<div class="clearfix">
|
||||||
|
<div class="form_radio">
|
||||||
|
<input id="radio_link_no" name="serendipity[toggle_dir]" type="radio" value="no" {if $media.toggle_dir == 'no'}checked="checked"{/if}>
|
||||||
|
<label for="radio_link_no">Strict {$CONST.NO}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form_radio">
|
||||||
|
<input id="radio_link_yes" name="serendipity[toggle_dir]" type="radio" value="yes" {if $media.toggle_dir == 'yes'}checked="checked"{/if}>
|
||||||
|
<label for="radio_link_yes">Strict {$CONST.YES}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<fieldset id="media_pane_filter" class="additional_info filter_pane">
|
<fieldset id="media_pane_filter" class="additional_info filter_pane">
|
||||||
<legend class="visuallyhidden">{$CONST.FILTERS}</legend>
|
<legend class="visuallyhidden">{$CONST.FILTERS}</legend>
|
||||||
|
{* Keep in mind that $media.sort_order is different than $media.sortorder! The first is for building the key names; the second is the value that was set by POST! *}
|
||||||
<div id="media_filter" class="clearfix">
|
<div id="media_filter" class="clearfix">
|
||||||
{foreach from=$media.sort_order item="so_val" key="so_key"}
|
{foreach $media.sort_order AS $filter}
|
||||||
<div class="{cycle values="left,center,right"}">
|
|
||||||
{if $so_val.type == 'date' || $so_val.type == 'intrange'}
|
|
||||||
<fieldset>
|
|
||||||
<span class="wrap_legend"><legend>{$CONST.SORT_BY} ({$so_key})</legend></span>
|
|
||||||
{else}
|
|
||||||
<div class="form_{if $so_val.type == 'authors'}select{else}field{/if}">
|
|
||||||
<label for="serendipity_filter_{$so_key}">{$so_val.desc}</label>
|
|
||||||
{/if}
|
|
||||||
{if $so_val.type == 'date'}
|
|
||||||
{if $media.filter[$so_key].from != '' OR $media.filter[$so_key].to != ''}{assign var="show_filter" value=$media.filter[$so_key]}{/if}
|
|
||||||
<div class="form_field">
|
|
||||||
<label for="serendipity_filter_{$so_key}_from" class="visuallyhidden">{$CONST.RANGE_FROM}</label>
|
|
||||||
<input id="serendipity_filter_{$so_key}_from" name="serendipity[filter][{$so_key}][from]" type="date" value="{$media.filter[$so_key].from|escape}">
|
|
||||||
-
|
|
||||||
<label for="serendipity_filter_{$so_key}_to" class="visuallyhidden">{$CONST.RANGE_TO}</label>
|
|
||||||
<input id="serendipity_filter_{$so_key}_to" name="serendipity[filter][{$so_key}][to]" type="date" value="{$media.filter[$so_key].to|escape}">
|
|
||||||
</div>
|
|
||||||
{elseif $so_val.type == 'intrange'}
|
|
||||||
{if $media.filter[$so_key].from != '' OR $media.filter[$so_key].to != ''}{assign var="show_filter" value=$media.filter[$so_key]}{/if}
|
|
||||||
<div class="form_field">
|
|
||||||
<label for="serendipity_filter_{$so_key}_from" class="visuallyhidden">{$CONST.RANGE_FROM}</label>
|
|
||||||
<input id="serendipity_filter_{$so_key}_from" name="serendipity[filter][{$so_key}][from]" type="text" value="{$media.filter[$so_key].from|escape}">
|
|
||||||
-
|
|
||||||
<label for="serendipity_filter_{$so_key}_to" class="visuallyhidden">{$CONST.RANGE_TO}</label>
|
|
||||||
<input id="serendipity_filter_{$so_key}_to" name="serendipity[filter][{$so_key}][to]" type="text" value="{$media.filter[$so_key].to|escape}">
|
|
||||||
</div>
|
|
||||||
{elseif $so_val.type == 'authors'}
|
|
||||||
{if $media.filter[$so_key] != ''}{assign var="show_filter" value=$media.filter[$so_key]}{/if}
|
|
||||||
<select id="serendipity_filter_{$so_key}" name="serendipity[filter][{$so_key}]">
|
|
||||||
<option value="">{$CONST.ALL_AUTHORS}</option>
|
|
||||||
{foreach from=$media.authors item="media_author"}
|
|
||||||
<option value="{$media_author.authorid}"{if $media.filter[$so_key] == $media_author.authorid} selected{/if}>{$media_author.realname|escape}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select>
|
|
||||||
{else}
|
|
||||||
{if $media.filter[$so_key] != ''}{assign var="show_filter" value=$media.filter[$so_key]}{/if}
|
|
||||||
{* TODO: needs a label, but what IS this? *}
|
|
||||||
<input id="serendipity_filter_{$so_key}" name="serendipity[filter][{$so_key}]" type="text" value="{$media.filter[$so_key]|escape}">
|
|
||||||
{/if}
|
|
||||||
{if $so_val.type == 'date' || $so_val.type == 'intrange'}
|
|
||||||
</fieldset>
|
|
||||||
{else}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
<div id="media_filter_file" class="form_field left">
|
<div class="{cycle values="left,center,right"}">
|
||||||
|
{if $filter.type == 'date' || $filter.type == 'intrange'}
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<span class="wrap_legend"><legend>{$CONST.SORT_BY} ({$filter@key})</legend></span>
|
||||||
|
{else}
|
||||||
|
|
||||||
|
<div class="form_{if $filter.type == 'authors'}select{else}field{/if}">
|
||||||
|
<label for="serendipity_filter_{$filter@key}">{$filter.desc}</label>
|
||||||
|
{/if}
|
||||||
|
{if $filter.type == 'date'}
|
||||||
|
|
||||||
|
<div class="form_field">
|
||||||
|
<label for="serendipity_filter_{$filter@key}_from" class="visuallyhidden">{$CONST.RANGE_FROM}</label>
|
||||||
|
<input id="serendipity_filter_{$filter@key}_from" name="serendipity[filter][{$filter@key}][from]" type="date" value="{$media.filter[$filter@key].from|escape}">
|
||||||
|
-
|
||||||
|
<label for="serendipity_filter_{$filter@key}_to" class="visuallyhidden">{$CONST.RANGE_TO}</label>
|
||||||
|
<input id="serendipity_filter_{$filter@key}_to" name="serendipity[filter][{$filter@key}][to]" type="date" value="{$media.filter[$filter@key].to|escape}">
|
||||||
|
</div>
|
||||||
|
{elseif $filter.type == 'intrange'}
|
||||||
|
|
||||||
|
<div class="form_field">
|
||||||
|
<label for="serendipity_filter_{$filter@key}_from" class="visuallyhidden">{$CONST.RANGE_FROM}</label>
|
||||||
|
<input id="serendipity_filter_{$filter@key}_from" name="serendipity[filter][{$filter@key}][from]" type="text" value="{$media.filter[$filter@key].from|escape}">
|
||||||
|
-
|
||||||
|
<label for="serendipity_filter_{$filter@key}_to" class="visuallyhidden">{$CONST.RANGE_TO}</label>
|
||||||
|
<input id="serendipity_filter_{$filter@key}_to" name="serendipity[filter][{$filter@key}][to]" type="text" value="{$media.filter[$filter@key].to|escape}">
|
||||||
|
</div>
|
||||||
|
{elseif $filter.type == 'authors'}
|
||||||
|
|
||||||
|
<select id="serendipity_filter_{$filter@key}" name="serendipity[filter][{$filter@key}]">
|
||||||
|
<option value="">{$CONST.ALL_AUTHORS}</option>
|
||||||
|
{foreach $media.authors AS $media_author}
|
||||||
|
|
||||||
|
<option value="{$media_author.authorid}"{if $media.filter[$filter@key] == $media_author.authorid} selected{/if}>{$media_author.realname|escape}</option>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
{else}{* this is type string w/o being named *}
|
||||||
|
{* label is already set on loop start, when type is not date or intrange *}
|
||||||
|
<input id="serendipity_filter_{$filter@key}" name="serendipity[filter][{$filter@key}]" type="text" value="{$media.filter[$filter@key]|escape}">
|
||||||
|
{/if}
|
||||||
|
{if $filter.type == 'date' || $filter.type == 'intrange'}
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
{else}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</div>{* media filter end *}
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
<div id="media_filter_file" class="form_field {if $media.simpleFilters}center{else}left{/if}">
|
||||||
<label for="serendipity_only_filename">{$CONST.SORT_ORDER_NAME}</label>
|
<label for="serendipity_only_filename">{$CONST.SORT_ORDER_NAME}</label>
|
||||||
<input id="serendipity_only_filename" name="serendipity[only_filename]" type="text" value="{$media.only_filename|escape}">
|
<input id="serendipity_only_filename" name="serendipity[only_filename]" type="text" value="{$media.only_filename|escape}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="media_filter_keywords" class="form_field center">
|
<div id="media_filter_keywords" class="form_field {if $media.simpleFilters}right{else}center{/if}">
|
||||||
<label for="keyword_input">{$CONST.MEDIA_KEYWORDS}</label>
|
<label for="keyword_input">{$CONST.MEDIA_KEYWORDS}</label>
|
||||||
<input id="keyword_input" name="serendipity[keywords]" type="text" value="{$media.keywords_selected|escape}">
|
<input id="keyword_input" name="serendipity[keywords]" type="text" value="{$media.keywords_selected|escape}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="keyword_list" class="clearfix right">
|
<div id="keyword_list" class="clearfix {if $media.simpleFilters}keywords {/if}right">
|
||||||
{foreach from=$media.keywords item="keyword"}
|
{foreach $media.keywords AS $keyword}
|
||||||
|
|
||||||
<a class="add_keyword" href="#keyword-input" data-keyword="{$keyword|escape}" title="{$keyword|escape}">{$keyword|escape|truncate:20:"…"}</a>
|
<a class="add_keyword" href="#keyword-input" data-keyword="{$keyword|escape}" title="{$keyword|escape}">{$keyword|escape|truncate:20:"…"}</a>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -100,17 +131,19 @@
|
|||||||
<div class="clearfix grouped">
|
<div class="clearfix grouped">
|
||||||
<div class="form_select">
|
<div class="form_select">
|
||||||
<label for="serendipity_sortorder_order">{$CONST.SORT_BY}</label>
|
<label for="serendipity_sortorder_order">{$CONST.SORT_BY}</label>
|
||||||
|
{* Keep in mind that $media.sort_order is different than $media.sortorder! *}
|
||||||
<select id="serendipity_sortorder_order" name="serendipity[sortorder][order]">
|
<select id="serendipity_sortorder_order" name="serendipity[sortorder][order]">
|
||||||
{foreach from=$media.sort_order item="so_val" key="so_key"}
|
{foreach $media.sort_order AS $orderVal}
|
||||||
<option value="{$so_key}"{if $media.sortorder.order == $so_key} selected{/if}>{$so_val.desc}</option>
|
{* The first is for building the key names *}
|
||||||
|
<option value="{$orderVal@key}"{if $media.sortorder.order == $orderVal@key} selected{/if}>{$orderVal.desc}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_select">
|
<div class="form_select">
|
||||||
<label for="serendipity_sortorder_ordermode">{$CONST.SORT_ORDER}</label>
|
<label for="serendipity_sortorder_ordermode">{$CONST.SORT_ORDER}</label>
|
||||||
|
{* The second is the value that was set by POST or COOKIE! *}
|
||||||
<select id="serendipity_sortorder_ordermode" name="serendipity[sortorder][ordermode]">
|
<select id="serendipity_sortorder_ordermode" name="serendipity[sortorder][ordermode]">
|
||||||
<option value="DESC"{if $media.sortorder.ordermode == 'DESC'} selected{/if}>{$CONST.SORT_ORDER_DESC}</option>
|
<option value="DESC"{if $media.sortorder.ordermode == 'DESC'} selected{/if}>{$CONST.SORT_ORDER_DESC}</option>
|
||||||
<option value="ASC"{if $media.sortorder.ordermode == 'ASC'} selected{/if}>{$CONST.SORT_ORDER_ASC}</option>
|
<option value="ASC"{if $media.sortorder.ordermode == 'ASC'} selected{/if}>{$CONST.SORT_ORDER_ASC}</option>
|
||||||
@ -121,64 +154,107 @@
|
|||||||
<label for="serendipity_sortorder_perpage">{$CONST.FILES_PER_PAGE}</label>
|
<label for="serendipity_sortorder_perpage">{$CONST.FILES_PER_PAGE}</label>
|
||||||
|
|
||||||
<select id="serendipity_sortorder_perpage" name="serendipity[sortorder][perpage]">
|
<select id="serendipity_sortorder_perpage" name="serendipity[sortorder][perpage]">
|
||||||
{foreach from=$media.sort_row_interval item="so_val"}
|
{foreach $media.sort_row_interval AS $perPageVal}
|
||||||
<option value="{$so_val}"{if $media.perPage == $so_val} selected{/if}>{$so_val}</option>
|
|
||||||
|
<option value="{$perPageVal}"{if $media.perPage == $perPageVal} selected{/if}>{$perPageVal}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_buttons">
|
<div class="form_buttons">
|
||||||
<input name="go" type="submit" value="{$CONST.GO}">
|
<input name="go" type="submit" value="{$CONST.GO}">
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
// write: is plain "foo", read: is "serendipity[foo]"!
|
||||||
{foreach $media.sortParams AS $sortParam}
|
{foreach $media.sortParams AS $sortParam}
|
||||||
serendipity.SetCookie("sortorder_{$sortParam}","{$get_sortorder_{$sortParam}}" )
|
|
||||||
|
serendipity.SetCookie("sortorder_{$sortParam}","{$media.sortorder.{$sortParam}}");
|
||||||
|
{/foreach}
|
||||||
|
{foreach $media.filterParams AS $filterParam}
|
||||||
|
|
||||||
|
serendipity.SetCookie("{$filterParam}", "{$media.{$filterParam}}");
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
{foreach $media.filterParams AS $filterParam}
|
serendipity.SetCookie("serendipity_toggle_dir", "{$media.toggle_dir}");
|
||||||
serendipity.SetCookie("{$filterParam}", "{$get_{$filterParam}}" )
|
|
||||||
{/foreach}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>{* has toolbar end *}
|
||||||
|
|
||||||
{if $smarty.get.serendipity.showUpload}
|
{if $smarty.get.serendipity.showUpload}
|
||||||
|
<div class="popuplayer_showUpload">
|
||||||
<a class="button_link" href="?serendipity[adminModule]=media&serendipity[adminAction]=addSelect&{$media.extraParems}">{$CONST.ADD_MEDIA}</a>
|
<a class="button_link" href="?serendipity[adminModule]=media&serendipity[adminAction]=addSelect&{$media.extraParems}">{$CONST.ADD_MEDIA}</a>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<div class="media_library_pane">
|
||||||
{if $media.nr_files < 1}
|
{if $media.nr_files < 1}
|
||||||
|
|
||||||
<span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NO_IMAGES_FOUND}</span>
|
<span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NO_IMAGES_FOUND}</span>
|
||||||
{else}
|
{else}
|
||||||
{if $media.manage}
|
{if $media.manage}
|
||||||
<form id="formMultiDelete" name="formMultiDelete" action="?" method="post">
|
|
||||||
{$media.token}
|
|
||||||
<input name="serendipity[action]" type="hidden" value="admin">
|
|
||||||
<input name="serendipity[adminModule]" type="hidden" value="media">
|
|
||||||
<input name="serendipity[adminAction]" type="hidden" value="multidelete">
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="clearfix media_pane" data-thumbmaxwidth="{$media.thumbSize}">
|
|
||||||
{$MEDIA_ITEMS}
|
|
||||||
{if ($media.page != 1 && $media.page <= $media.pages)||$media.page != $media.pages}
|
|
||||||
<nav class="pagination">
|
|
||||||
<h3>{$CONST.PAGE_BROWSE_ENTRIES|sprintf:$media.page:$media.pages:$media.totalImages}</h3>
|
|
||||||
|
|
||||||
<ul class="clearfix">
|
<form id="formMultiDelete" name="formMultiDelete" action="?" method="post">
|
||||||
<li class="prev">{if $media.page != 1 AND $media.page <= $media.pages}<a class="button_link" href="{$media.linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
{$media.token}
|
||||||
<li class="next">{if $media.page != $media.pages}<a class="button_link" href="{$media.linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
<input name="serendipity[action]" type="hidden" value="admin">
|
||||||
</ul>
|
<input name="serendipity[adminModule]" type="hidden" value="media">
|
||||||
</nav>
|
<input name="serendipity[adminAction]" type="hidden" value="multidelete">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="clearfix media_pane" data-thumbmaxwidth="{$media.thumbSize}">
|
||||||
|
{$MEDIA_ITEMS}
|
||||||
|
|
||||||
|
{if ($media.page != 1 && $media.page <= $media.pages)||$media.page != $media.pages}
|
||||||
|
|
||||||
|
<nav class="pagination">
|
||||||
|
<h3>{$CONST.PAGE_BROWSE_ENTRIES|sprintf:$media.page:$media.pages:$media.totalImages}</h3>
|
||||||
|
|
||||||
|
<ul class="clearfix">
|
||||||
|
<li class="first">{if $media.page > 1}<a class="button_link" href="{$media.linkFirst}" title="{$CONST.FIRST_PAGE}"><span class="visuallyhidden">{$CONST.FIRST_PAGE} </span><span class="icon-to-start"></span></a>{/if}</li>
|
||||||
|
<li class="prev">{if $media.page != 1 AND $media.page <= $media.pages}<a class="button_link" href="{$media.linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
||||||
|
{* Looks weird, but last will be at end by the CSS float:right *}
|
||||||
|
<li class="last">{if $media.page < $media.pages}<a class="button_link" href="{$media.linkLast}" title="{$CONST.LAST_PAGE}"><span class="visuallyhidden">{$CONST.LAST_PAGE} </span><span class="icon-to-end"></span></a>{/if}</li>
|
||||||
|
<li class="next">{if $media.page != $media.pages}<a class="button_link" href="{$media.linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
|
||||||
|
</div>{* media pane end *}
|
||||||
|
|
||||||
{if $media.manage}
|
{if $media.manage}
|
||||||
|
|
||||||
<div class="form_buttons">
|
<div class="form_buttons">
|
||||||
<input class="invert_selection" name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}">
|
<input class="invert_selection" name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}">
|
||||||
<input class="state_cancel" name="toggle" type="submit" value="{$CONST.DELETE}">
|
<input class="state_cancel" name="toggle_delete" type="submit" value="{$CONST.DELETE}">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<hr>
|
||||||
|
<div class="form_select">
|
||||||
|
<label for="newDir">{$CONST.FILTER_DIRECTORY}</label>
|
||||||
|
<input type="hidden" name="serendipity[oldDir]" value="">
|
||||||
|
<select id="newDir" name="serendipity[newDir]">
|
||||||
|
<option value=""></option>
|
||||||
|
<option value="uploadRoot">{$CONST.BASE_DIRECTORY}</option>
|
||||||
|
{foreach $media.paths AS $folderFoot}
|
||||||
|
|
||||||
|
<option value="{$folderFoot.relpath}">{' '|str_repeat:($folderFoot.depth*2)}{$folderFoot.name}</option>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form_buttons">
|
||||||
|
<input class="state_submit" name="toggle_move" type="submit" value="{$CONST.MOVE}">
|
||||||
|
<span class="media_file_actions actions"><a class="media_show_info button_link" href="#media_file_bulkmove" title="{$CONST.BULKMOVE_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.BULKMOVE_INFO}</span></a></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer id="media_file_bulkmove" class="media_file_bulkmove additional_info">
|
||||||
|
<span class="msg_notice">{$CONST.BULKMOVE_INFO_DESC}</span>
|
||||||
|
</footer>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
</div>{* media library pane end *}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* $Id$ */
|
|
||||||
/*
|
/*
|
||||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||||
# All rights reserved. See LICENSE file for licensing details
|
# All rights reserved. See LICENSE file for licensing details
|
||||||
@ -366,6 +365,11 @@
|
|||||||
+ '</div>';
|
+ '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parent.self.opener.serendipity == undefined) {
|
||||||
|
// in iframes, there is no opener, and the magnific popup is wrapped
|
||||||
|
parent.self = window.parent.parent.$.magnificPopup;
|
||||||
|
parent.self.opener = window.parent.parent;
|
||||||
|
}
|
||||||
parent.self.opener.serendipity.serendipity_imageSelector_addToBody(img, textarea);
|
parent.self.opener.serendipity.serendipity_imageSelector_addToBody(img, textarea);
|
||||||
parent.self.close();
|
parent.self.close();
|
||||||
}
|
}
|
||||||
@ -493,7 +497,61 @@
|
|||||||
var media_rename = '{$CONST.ENTER_NEW_NAME}';
|
var media_rename = '{$CONST.ENTER_NEW_NAME}';
|
||||||
if (newname = prompt(media_rename + fname, fname)) {
|
if (newname = prompt(media_rename + fname, fname)) {
|
||||||
var media_token_url = $('input[name*="serendipity[token]"]').val();
|
var media_token_url = $('input[name*="serendipity[token]"]').val();
|
||||||
$.post('?serendipity[adminModule]=images&serendipity[adminAction]=rename&serendipity[fid]='+ escape(id) + '&serendipity[newname]='+ escape(newname) +'&serendipity[token]='+ media_token_url);
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '?serendipity[adminModule]=images&serendipity[adminAction]=rename&serendipity[fid]='+ escape(id) +'&serendipity[newname]='+ escape(newname) +'&serendipity[token]='+ media_token_url,
|
||||||
|
async: true,
|
||||||
|
cache: false,
|
||||||
|
success: function(response) {
|
||||||
|
$response = (response.trim() == '')
|
||||||
|
? '<p>{$CONST.DONE}!</p>\
|
||||||
|
<button id="rename_ok" class="button_link state_submit" type="button" >{$CONST.GO}</button>\
|
||||||
|
'
|
||||||
|
: response + '\
|
||||||
|
<input class="go_back" type="button" onClick="$.magnificPopup.close();" value="{$CONST.BACK}">\
|
||||||
|
';
|
||||||
|
$.magnificPopup.open({
|
||||||
|
items: {
|
||||||
|
type: 'inline',
|
||||||
|
src: $('<div id="rename_msg">\
|
||||||
|
<h4>{$CONST.MEDIA_RENAME}</h4>\
|
||||||
|
'+ $response +'\
|
||||||
|
</div>')
|
||||||
|
},
|
||||||
|
type: 'inline',
|
||||||
|
midClick: true,
|
||||||
|
callbacks: {
|
||||||
|
open: function() {
|
||||||
|
this.content.on('click', '#rename_ok', function() {
|
||||||
|
window.parent.parent.location.href= '?serendipity[adminModule]=images&serendipity[adminAction]=default';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
|
$.magnificPopup.open({
|
||||||
|
items: {
|
||||||
|
type: 'inline',
|
||||||
|
src: $('<div id="rename_msg">\
|
||||||
|
<h4>{$CONST.MEDIA_RENAME}</h4>\
|
||||||
|
<p>"Status: " + textStatus</p>\
|
||||||
|
'+ errorThrown +'\
|
||||||
|
<button id="rename_error" class="button_link state_submit" type="button" >{$CONST.GO}</button>\
|
||||||
|
</div>')
|
||||||
|
},
|
||||||
|
type: 'inline',
|
||||||
|
midClick: true,
|
||||||
|
callbacks: {
|
||||||
|
open: function() {
|
||||||
|
this.content.on('click', '#rename_error', function() {
|
||||||
|
window.parent.parent.location.href= '?serendipity[adminModule]=images&serendipity[adminAction]=default';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +559,7 @@
|
|||||||
serendipity.deleteFromML = function(id, fname) {
|
serendipity.deleteFromML = function(id, fname) {
|
||||||
if (confirm('{$CONST.DELETE}')) {
|
if (confirm('{$CONST.DELETE}')) {
|
||||||
var media_token_url = $('input[name*="serendipity[token]"]').val();
|
var media_token_url = $('input[name*="serendipity[token]"]').val();
|
||||||
$.post('?serendipity[adminModule]=images&serendipity[adminAction]=doDelete&serendipity[fid]=' + escape(id) + '&serendipity[token]='+ media_token_url);
|
$.post('?serendipity[adminModule]=images&serendipity[adminAction]=doDelete&serendipity[fid]='+ escape(id) +'&serendipity[token]='+ media_token_url);
|
||||||
window.location.reload(false);
|
window.location.reload(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -727,7 +785,7 @@
|
|||||||
|
|
||||||
serendipity.eraseEntryEditorCache = function() {
|
serendipity.eraseEntryEditorCache = function() {
|
||||||
serendipity.cache("serendipity[body]", null);
|
serendipity.cache("serendipity[body]", null);
|
||||||
serendipity.cache("serendipity[extended]", null);;
|
serendipity.cache("serendipity[extended]", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
|
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
|
||||||
|
@ -385,11 +385,11 @@ progress div.progress-undefined {
|
|||||||
/* ICON FONT: http://fortawesome.github.com/Font-Awesome/ */
|
/* ICON FONT: http://fortawesome.github.com/Font-Awesome/ */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'fontello';
|
font-family: 'fontello';
|
||||||
src: url('{TEMPLATE_PATH}font/fontello.eot?70036835');
|
src: url('{TEMPLATE_PATH}font/fontello.eot?70021285');
|
||||||
src: url('{TEMPLATE_PATH}font/fontello.eot?70036835#iefix') format('embedded-opentype'),
|
src: url('{TEMPLATE_PATH}font/fontello.eot?70021285#iefix') format('embedded-opentype'),
|
||||||
url('{TEMPLATE_PATH}font/fontello.woff?70036835') format('woff'),
|
url('{TEMPLATE_PATH}font/fontello.woff?70021285') format('woff'),
|
||||||
url('{TEMPLATE_PATH}font/fontello.ttf?70036835') format('truetype'),
|
url('{TEMPLATE_PATH}font/fontello.ttf?70021285') format('truetype'),
|
||||||
url('{TEMPLATE_PATH}font/fontello.svg?70036835#fontello') format('svg');
|
url('{TEMPLATE_PATH}font/fontello.svg?70021285#fontello') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
@ -454,8 +454,9 @@ progress div.progress-undefined {
|
|||||||
.icon-right-dir:before { content: '\e828'; }
|
.icon-right-dir:before { content: '\e828'; }
|
||||||
.icon-th-list:before { content: '\e829'; }
|
.icon-th-list:before { content: '\e829'; }
|
||||||
.icon-block:before { content: '\e82a'; }
|
.icon-block:before { content: '\e82a'; }
|
||||||
|
.icon-to-end:before { content: '\e82b'; }
|
||||||
.icon-rocket:before { content: '\e82c'; }
|
.icon-rocket:before { content: '\e82c'; }
|
||||||
|
.icon-to-start:before { content: '\e82d'; }
|
||||||
|
|
||||||
/* BACKEND HELPER CLASSES */
|
/* BACKEND HELPER CLASSES */
|
||||||
.icon_link,
|
.icon_link,
|
||||||
@ -979,6 +980,10 @@ input[type=checkbox],
|
|||||||
margin-bottom: .75em;
|
margin-bottom: .75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#media_filter > .keywords {
|
||||||
|
margin-bottom: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
#media_filter_path .form_select {
|
#media_filter_path .form_select {
|
||||||
margin: 0 0 0 .125em;
|
margin: 0 0 0 .125em;
|
||||||
}
|
}
|
||||||
@ -1217,12 +1222,16 @@ summary {
|
|||||||
.template_info dt,
|
.template_info dt,
|
||||||
.template_info dd,
|
.template_info dd,
|
||||||
#entries_list .form_check,
|
#entries_list .form_check,
|
||||||
|
.pagination .first,
|
||||||
.pagination .prev,
|
.pagination .prev,
|
||||||
.pagination .next,
|
|
||||||
.serendipity_customfields textarea,
|
.serendipity_customfields textarea,
|
||||||
#dashboard_header h2 {
|
#dashboard_header h2 {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
.pagination .next,
|
||||||
|
.pagination .last {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
#mediaPropertyForm .media_wrap_thumb {
|
#mediaPropertyForm .media_wrap_thumb {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -1271,16 +1280,27 @@ summary {
|
|||||||
width: 48%;
|
width: 48%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pagination .first,
|
||||||
|
.pagination .last,
|
||||||
.pagination .prev,
|
.pagination .prev,
|
||||||
.pagination .next {
|
.pagination .next {
|
||||||
min-height: 1px;
|
min-height: 1px;
|
||||||
width: 50%;
|
width: 2.2em;
|
||||||
|
}
|
||||||
|
.first .button_link, .last .button_link {
|
||||||
|
width: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination > ul {
|
.pagination > ul {
|
||||||
min-height: 1em;
|
min-height: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pagination .icon-to-start,
|
||||||
|
.pagination .icon-to-end {
|
||||||
|
font-size: .75em;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
#filter_comments .form_field > input,
|
#filter_comments .form_field > input,
|
||||||
#filter_comments select,
|
#filter_comments select,
|
||||||
#serendipity_comment .form_field input,
|
#serendipity_comment .form_field input,
|
||||||
@ -1843,6 +1863,25 @@ form > .button_link:first-of-type,
|
|||||||
padding-bottom: .583335em;
|
padding-bottom: .583335em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mfp-content #rename_msg {
|
||||||
|
width: 40em;
|
||||||
|
background-color: #FFF;
|
||||||
|
text-align: center;
|
||||||
|
margin: auto;
|
||||||
|
border: 2px double #00FFDB;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
.mfp-content #rename_ok {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
color: #FFF;
|
||||||
|
text-shadow: inherit;
|
||||||
|
}
|
||||||
|
.mfp-content #rename_msg button.mfp-close {
|
||||||
|
display: none;
|
||||||
|
visibility: hidden;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.taxonomy h3:hover,
|
.taxonomy h3:hover,
|
||||||
.taxonomy li:hover {
|
.taxonomy li:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -2220,6 +2259,7 @@ label .perm_name,
|
|||||||
.pluginmanager_ownership,
|
.pluginmanager_ownership,
|
||||||
.pluginmanager_move,
|
.pluginmanager_move,
|
||||||
.pagination .next,
|
.pagination .next,
|
||||||
|
.pagination .last,
|
||||||
#login .form_buttons {
|
#login .form_buttons {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
@ -2291,6 +2331,13 @@ label .perm_name,
|
|||||||
.media_file h3 {
|
.media_file h3 {
|
||||||
margin: .5em 0 1em;
|
margin: .5em 0 1em;
|
||||||
}
|
}
|
||||||
|
.manage h3 {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 14em;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
.media_file .form_check input {
|
.media_file .form_check input {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -2434,6 +2481,12 @@ input[name="serendipity[filter][fileCategory]"] {
|
|||||||
margin: 1em 0 0;
|
margin: 1em 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.media_select_strict {
|
||||||
|
clear: right;
|
||||||
|
float: left;
|
||||||
|
margin: -0.75em 0px;
|
||||||
|
}
|
||||||
|
|
||||||
#overlay {
|
#overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -2874,6 +2927,12 @@ img.mfp-img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* SMALL SCREEN */
|
/* SMALL SCREEN */
|
||||||
|
@media only screen and (min-width: 360px) {
|
||||||
|
.manage h3 {
|
||||||
|
width: 15em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 480px) {
|
@media only screen and (min-width: 480px) {
|
||||||
#serendipityEntry {
|
#serendipityEntry {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
@ -2964,6 +3023,15 @@ img.mfp-img {
|
|||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.media_select_strict {
|
||||||
|
margin: -1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popuplayer_showUpload {
|
||||||
|
float: right;
|
||||||
|
margin-top: -2.375em;
|
||||||
|
}
|
||||||
|
|
||||||
#mediaPropertyForm .media_file_props label,
|
#mediaPropertyForm .media_file_props label,
|
||||||
#mediaPropertyForm header b,
|
#mediaPropertyForm header b,
|
||||||
#mediaPropertyForm footer b {
|
#mediaPropertyForm footer b {
|
||||||
@ -2971,6 +3039,11 @@ img.mfp-img {
|
|||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#media_filter > .left,
|
||||||
|
#media_filter > .center {/*mediafilter*/
|
||||||
|
margin-right: .2em;
|
||||||
|
}
|
||||||
|
|
||||||
.user_level {
|
.user_level {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
@ -3249,6 +3322,12 @@ img.mfp-img {
|
|||||||
|
|
||||||
|
|
||||||
/* LARGE SCREEN */
|
/* LARGE SCREEN */
|
||||||
|
@media only screen and (min-width: 860px) {
|
||||||
|
.manage h3 {
|
||||||
|
width: 17em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 900px) {
|
@media only screen and (min-width: 900px) {
|
||||||
#edit_entry_status_comments .form_check {
|
#edit_entry_status_comments .form_check {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@ -3297,6 +3376,12 @@ img.mfp-img {
|
|||||||
width: 33% ;
|
width: 33% ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#media_filter > div.keywords {/*simple filter*/
|
||||||
|
float: right;
|
||||||
|
margin-top: -2.5em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
#filter_entries .form_select,
|
#filter_entries .form_select,
|
||||||
#filter_entries .form_field {
|
#filter_entries .form_field {
|
||||||
float: left;
|
float: left;
|
||||||
@ -3313,8 +3398,6 @@ img.mfp-img {
|
|||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media_filter_file,
|
|
||||||
#media_pane_sort .left,
|
|
||||||
#serendipity_comment .form_area {
|
#serendipity_comment .form_area {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
@ -3324,6 +3407,12 @@ img.mfp-img {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (min-width: 950px) {
|
||||||
|
.manage h3 {
|
||||||
|
width: 19em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1024px) {
|
@media only screen and (min-width: 1024px) {
|
||||||
#login .form_field input {
|
#login .form_field input {
|
||||||
width: auto;
|
width: auto;
|
||||||
@ -3465,14 +3554,23 @@ img.mfp-img {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.manage h3 {
|
||||||
|
width: 14em;
|
||||||
|
}
|
||||||
|
|
||||||
#login {
|
#login {
|
||||||
margin: 4em auto 8em;
|
margin: 4em auto 8em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* LARGER SCREENS */
|
/* LARGER SCREENS */
|
||||||
@media only screen and (min-width: 1280px) {
|
@media only screen and (min-width: 1280px) {
|
||||||
|
.js .configuration_group .media_choose input {
|
||||||
|
max-width: 42.5%;
|
||||||
|
}
|
||||||
|
.manage h3 {
|
||||||
|
width: 18em;
|
||||||
|
}
|
||||||
#edit_entry_metadata #categoryfilter {
|
#edit_entry_metadata #categoryfilter {
|
||||||
max-width: 22em;
|
max-width: 22em;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@ -3483,4 +3581,7 @@ img.mfp-img {
|
|||||||
html {
|
html {
|
||||||
font-size: 1.125em;
|
font-size: 1.125em;
|
||||||
}
|
}
|
||||||
|
.manage h3 {
|
||||||
|
width: 19em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,18 +222,28 @@
|
|||||||
{if $media.filename_only}
|
{if $media.filename_only}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{serendipity_hookPlugin hookAll=true hook='frontend_image_add_filenameonly' eventData=$media}
|
{serendipity_hookPlugin hookAll=true hook='frontend_image_add_filenameonly' eventData=$media}
|
||||||
parent.self.opener.serendipity_imageSelector_addToElement('{$media.file.full_file|escape}', '{$media.htmltarget|@escape}');
|
if (parent.self.opener == undefined) {
|
||||||
|
// in iframes, there is no opener, and the magnific popup is wrapped
|
||||||
|
parent.self = window.parent.parent.$.magnificPopup;
|
||||||
|
parent.self.opener = window.parent.parent;
|
||||||
|
}
|
||||||
|
parent.self.opener.serendipity.serendipity_imageSelector_addToElement('{$media.file.full_file|escape}', '{$media.htmltarget|escape}');
|
||||||
parent.self.close();
|
parent.self.close();
|
||||||
</script>
|
</script>
|
||||||
{else}
|
{else}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
block = '<a href="{$media.file.full_file}" title="{$media.file.realname|@escape}" target="_blank">{$media.file.realname|@escape}</a>';
|
block = '<a href="{$media.file.full_file}" title="{$media.file.realname|@escape}" target="_blank">{$media.file.realname|@escape}</a>';
|
||||||
{serendipity_hookPlugin hookAll=true hook='frontend_image_add_unknown' eventData=$media}
|
{serendipity_hookPlugin hookAll=true hook='frontend_image_add_unknown' eventData=$media}
|
||||||
if (parent.self.opener.editorref) {
|
if (parent.self.opener == undefined) {
|
||||||
|
// in iframes, there is no opener, and the magnific popup is wrapped
|
||||||
|
parent.self = window.parent.parent.$.magnificPopup;
|
||||||
|
parent.self.opener = window.parent.parent;
|
||||||
|
}
|
||||||
|
if (parent.self.opener.editorref) {
|
||||||
parent.self.opener.editorref.surroundHTML(block, '');
|
parent.self.opener.editorref.surroundHTML(block, '');
|
||||||
} else {
|
} else {
|
||||||
parent.self.opener.serendipity_imageSelector_addToBody(block, '{$media.textarea}');
|
parent.self.opener.serendipity.serendipity_imageSelector_addToBody(block, '{$media.textarea}');
|
||||||
}
|
}
|
||||||
parent.self.close();
|
parent.self.close();
|
||||||
</script>
|
</script>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<?xml-stylesheet href="{serendipity_getFile file='atom.css'}" type="text/css" ?>
|
|
||||||
|
|
||||||
<feed {$namespace_display_dat}
|
<feed {$namespace_display_dat}
|
||||||
xmlns="http://www.w3.org/2005/Atom"
|
xmlns="http://www.w3.org/2005/Atom"
|
||||||
@ -12,6 +11,7 @@
|
|||||||
<link href="{$self_url}" rel="self" title="{$metadata.title}" type="application/atom+xml" />
|
<link href="{$self_url}" rel="self" title="{$metadata.title}" type="application/atom+xml" />
|
||||||
<link href="{$serendipityBaseURL}" rel="alternate" title="{$metadata.title}" type="text/html" />
|
<link href="{$serendipityBaseURL}" rel="alternate" title="{$metadata.title}" type="text/html" />
|
||||||
<link href="{$serendipityBaseURL}rss.php?version=2.0" rel="alternate" title="{$metadata.title}" type="application/rss+xml" />
|
<link href="{$serendipityBaseURL}rss.php?version=2.0" rel="alternate" title="{$metadata.title}" type="application/rss+xml" />
|
||||||
|
<link rel="stylesheet" href="{serendipity_getFile file='atom.css'}" type="text/css" />
|
||||||
<title type="html">{$metadata.title}</title>
|
<title type="html">{$metadata.title}</title>
|
||||||
<subtitle type="html">{$metadata.description}</subtitle>
|
<subtitle type="html">{$metadata.description}</subtitle>
|
||||||
{$metadata.additional_fields.image_atom10}
|
{$metadata.additional_fields.image_atom10}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user