1
0

Revert to 78cb307b73

This commit is contained in:
Ian
2012-12-13 14:49:51 +01:00
parent 6340e21614
commit 6a796ebe93
246 changed files with 7403 additions and 14007 deletions

View File

@ -1,9 +1,3 @@
# Serendipity - a PHP Weblog/Blog software
[Serendipity](http://s9y.org) is a PHP-powered weblog application which gives the user an easy way to maintain an online diary, weblog or even a complete homepage. While the default package is designed for the casual blogger, Serendipity offers a flexible, expandable and easy-to-use framework with the power for professional applications.
This is a testing branch to mainly support the new backend smartification.
Use with care!
https://github.com/ophian/s9y-admin-tpl forked from https://github.com/yellowled/s9y-admin-tpl

View File

@ -1,28 +1,24 @@
# $Id$
Version 2.0 ()
------------------------------------------------------------------------
* Use Smarty for backend display output
Version 1.7 ()
------------------------------------------------------------------------
* Allow entryproperties plugin to define defaults for custom fields
* Onyx, Net_URL classes: Remove PHP4 style constructor due to
PHP5 error "Constructor already defined"
* Improved RSS sidebarplugin to support Atom
* Bundled simplepie
* For Blogs running on a non-UTF-8 language, set a Smarty constant
to indicate the actually used charset.
to indicate the actually used charset.
* Added to use MyISAM handler for s9y tables (we do not use InnoDB
features, but rely on MyISAM fulltext)
* fixed defaultBaseURL did not show up installer. Thanks to onli.
Follow up from c292bad
@ -83,7 +79,7 @@ Version 1.7 ()
Version 1.6.2 (May 16th, 2012)
------------------------------------------------------------------------
* Fix SQL injection for comment.php used in read-context.
* Fix SQL injection for comment.php used in read-context.
(Thanks to High-Tech Bridge SA Security Release Lab, Advisory HTB23092)
Version 1.6.1 (May 8th, 2012)

View File

@ -1,2 +1,2 @@
stable:1.6
beta:1.6
stable:1.6.2
beta:1.6.2

View File

@ -11,12 +11,12 @@ if (!serendipity_checkPermission('adminCategories')) {
}
$admin_category = (!serendipity_checkPermission('adminCategoriesMaintainOthers') ? "AND (authorid = 0 OR authorid = " . (int)$serendipity['authorid'] . ")" : '');
$data = array();
/* Add a new category */
if (isset($_POST['SAVE']) && serendipity_checkFormToken()) {
$name = $serendipity['POST']['cat']['name'];
$desc = $serendipity['POST']['cat']['description'];
$data['post_save'] = true;
if (is_array($serendipity['POST']['cat']['write_authors']) && in_array(0, $serendipity['POST']['cat']['write_authors'])) {
$authorid = 0;
} else {
@ -27,7 +27,6 @@ if (isset($_POST['SAVE']) && serendipity_checkFormToken()) {
$parentid = (isset($serendipity['POST']['cat']['parent_cat']) && is_numeric($serendipity['POST']['cat']['parent_cat'])) ? $serendipity['POST']['cat']['parent_cat'] : 0;
if ($serendipity['GET']['adminAction'] == 'new') {
$data['new'] = true;
if ($parentid != 0) {
// TODO: This doesn't seem to work as expected, serendipity_rebuildCategoryTree(); is still needed! Only activate this optimization function when it's really working :)
// TODO: This works if only one subcategory exists. Otherwise, the first query will return an array.
@ -40,10 +39,12 @@ if (isset($_POST['SAVE']) && serendipity_checkFormToken()) {
$catid = serendipity_addCategory($name, $desc, $authorid, $icon, $parentid);
serendipity_ACLGrant($catid, 'category', 'read', $serendipity['POST']['cat']['read_authors']);
serendipity_ACLGrant($catid, 'category', 'write', $serendipity['POST']['cat']['write_authors']);
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . CATEGORY_SAVED .'</div>';
} elseif ($serendipity['GET']['adminAction'] == 'edit') {
$data['edit'] = true;
if (!serendipity_checkPermission('adminCategoriesMaintainOthers') && !serendipity_ACLCheck($serendipity['authorid'], $serendipity['GET']['cid'], 'category', 'write')) {
$data['editPermission'] = false;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />'. PERM_DENIED .'</div>';
} else {
/* Check to make sure parent is not a child of self */
$r = serendipity_db_query("SELECT categoryid FROM {$serendipity['dbPrefix']}category c
@ -52,11 +53,12 @@ if (isset($_POST['SAVE']) && serendipity_checkFormToken()) {
if (is_array($r)) {
$r = serendipity_db_query("SELECT category_name FROM {$serendipity['dbPrefix']}category
WHERE categoryid = ". (int)$parentid);
$data['subcat'] = sprintf(ALREADY_SUBCATEGORY, htmlspecialchars($r[0]['category_name']), htmlspecialchars($name));
echo sprintf(ALREADY_SUBCATEGORY, htmlspecialchars($r[0]['category_name']), htmlspecialchars($name));
} else {
serendipity_updateCategory($serendipity['GET']['cid'], $name, $desc, $authorid, $icon, $parentid, $serendipity['POST']['cat']['sort_order'], $serendipity['POST']['cat']['hide_sub']);
serendipity_ACLGrant($serendipity['GET']['cid'], 'category', 'read', $serendipity['POST']['cat']['read_authors']);
serendipity_ACLGrant($serendipity['GET']['cid'], 'category', 'write', $serendipity['POST']['cat']['write_authors']);
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . CATEGORY_SAVED .'</div>';
}
}
}
@ -67,7 +69,6 @@ if (isset($_POST['SAVE']) && serendipity_checkFormToken()) {
/* Delete a category */
if ($serendipity['GET']['adminAction'] == 'doDelete' && serendipity_checkFormToken()) {
$data['doDelete'] = true;
if ($serendipity['GET']['cid'] != 0) {
$remaining_cat = (int)$serendipity['POST']['cat']['remaining_catid'];
$category_ranges = serendipity_fetchCategoryRange((int)$serendipity['GET']['cid']);
@ -102,107 +103,198 @@ if ($serendipity['GET']['adminAction'] == 'doDelete' && serendipity_checkFormTok
serendipity_ACLGrant($cid, 'category', 'write', array());
}
}
$data['deleteSuccess'] = true;
$data['remaining_cat'] = $remaining_cat;
$data['cid'] = (int)$serendipity['GET']['cid'];
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . ($remaining_cat ? sprintf(CATEGORY_DELETED_ARTICLES_MOVED, (int)$serendipity['GET']['cid'], $remaining_cat) : sprintf(CATEGORY_DELETED,(int)$serendipity['GET']['cid'])) .'</div>';
$serendipity['GET']['adminAction'] = 'view';
}
} else {
$data['deleteSuccess'] = false;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />'. INVALID_CATEGORY .'</div>';
}
}
?>
if ( $serendipity['GET']['adminAction'] == 'delete' ) {
$data['delete'] = true;
$this_cat = serendipity_fetchCategoryInfo($serendipity['GET']['cid']);
if ( (serendipity_checkPermission('adminCategoriesDelete') && serendipity_checkPermission('adminCategoriesMaintainOthers'))
|| (serendipity_checkPermission('adminCategoriesDelete') && ($serendipity['authorid'] == $this_cat['authorid'] || $this_cat['authorid'] == '0'))
|| (serendipity_checkPermission('adminCategoriesDelete') && serendipity_ACLCheck($serendipity['authorid'], $serendipity['GET']['cid'], 'category', 'write'))) {
$data['deletePermission'] = true;
$data['cid'] = (int)$serendipity['GET']['cid'];
$data['formToken'] = serendipity_setFormToken();
$data['categoryName'] = $this_cat['category_name'];
$cats = serendipity_fetchCategories('all');
$data['cats'] = array();
/* TODO, show dropdown as nested categories */
foreach ($cats as $cat_data) {
if ($cat_data['categoryid'] != $serendipity['GET']['cid'] && (serendipity_checkPermission('adminCategoriesMaintainOthers') || $cat_data['authorid'] == '0' || $cat_data['authorid'] == $serendipity['authorid'])) {
$data['cats'][] = $cat_data;
}
<?php
if ( $serendipity['GET']['adminAction'] == 'delete' ) {
$this_cat = serendipity_fetchCategoryInfo($serendipity['GET']['cid']);
if ( (serendipity_checkPermission('adminCategoriesDelete') && serendipity_checkPermission('adminCategoriesMaintainOthers'))
|| (serendipity_checkPermission('adminCategoriesDelete') && ($serendipity['authorid'] == $this_cat['authorid'] || $this_cat['authorid'] == '0'))
|| (serendipity_checkPermission('adminCategoriesDelete') && serendipity_ACLCheck($serendipity['authorid'], $serendipity['GET']['cid'], 'category', 'write'))) {
?>
<form method="POST" name="serendipityCategory" action="?serendipity[adminModule]=category&amp;serendipity[adminAction]=doDelete&amp;serendipity[cid]=<?php echo (int)$serendipity['GET']['cid'] ?>">
<?php echo serendipity_setFormToken(); ?>
<h3><?php echo htmlspecialchars($this_cat['category_name']); ?></h3>
<?php echo CATEGORY_REMAINING ?>:
<select name="serendipity[cat][remaining_catid]">
<option value="0">- <?php echo NO_CATEGORY ?> -</option>
<?php
$cats = serendipity_fetchCategories('all');
/* TODO, show dropdown as nested categories */
foreach ($cats as $cat_data) {
if ($cat_data['categoryid'] != $serendipity['GET']['cid'] && (serendipity_checkPermission('adminCategoriesMaintainOthers') || $cat_data['authorid'] == '0' || $cat_data['authorid'] == $serendipity['authorid'])) {
echo '<option value="' . $cat_data['categoryid'] . '">' . htmlspecialchars($cat_data['category_name']) . '</option>' . "\n";
}
}
}
if ( $serendipity['GET']['adminAction'] == 'edit' || $serendipity['GET']['adminAction'] == 'new' ) {
if ( $serendipity['GET']['adminAction'] == 'edit' ) {
$data['edit'] = true;
$cid = (int)$serendipity['GET']['cid'];
$this_cat = serendipity_fetchCategoryInfo($cid);
$data['category_name'] = $this_cat['category_name'];
$save = SAVE;
$read_groups = serendipity_ACLGet($cid, 'category', 'read');
$write_groups = serendipity_ACLGet($cid, 'category', 'write');
} else {
$data['new'] = true;
$cid = false;
$this_cat = array();
echo '<strong>'. CREATE_NEW_CAT .'</strong>';
$save = CREATE;
$read_groups = array(0 => 0);
$write_groups = array(0 => 0);
?>
</select>
<input type="submit" name="REMOVE" value="<?php echo GO ?>" class="serendipityPrettyButton input_button">
</form>
<?php
}
}
$data['cid'] = $cid;
$data['this_cat'] = $this_cat;
$data['save'] = $save;
$groups = serendipity_getAllGroups();
$data['groups'] = $groups;
$data['read_groups'] = $read_groups;
$data['write_groups'] = $write_groups;
?>
$data['formToken'] = serendipity_setFormToken();
$data['cat'] = $this_cat;
if (!is_array($this_cat) || (isset($this_cat['authorid']) && $this_cat['authorid'] == '0') || isset($read_groups[0])) {
$data['selectAllReadAuthors'] = true;
}
if (!is_array($this_cat) || (isset($this_cat['authorid']) && $this_cat['authorid'] == '0') || isset($write_groups[0])) {
$data['selectAllWriteAuthors'] = true;
}
$categories = serendipity_fetchCategories('all');
$categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
$data['categories'] = $categories;
serendipity_plugin_api::hook_event('backend_category_showForm', $cid, $this_cat);
}
<?php if ( $serendipity['GET']['adminAction'] == 'edit' || $serendipity['GET']['adminAction'] == 'new' ) {
if ( $serendipity['GET']['adminAction'] == 'edit' ) {
$cid = (int)$serendipity['GET']['cid'];
$this_cat = serendipity_fetchCategoryInfo($cid);
echo '<strong>'. sprintf(EDIT_THIS_CAT, htmlspecialchars($this_cat['category_name'])) .'</strong>';
$save = SAVE;
$read_groups = serendipity_ACLGet($cid, 'category', 'read');
$write_groups = serendipity_ACLGet($cid, 'category', 'write');
} else {
$cid = false;
$this_cat = array();
echo '<strong>'. CREATE_NEW_CAT .'</strong>';
$save = CREATE;
$read_groups = array(0 => 0);
$write_groups = array(0 => 0);
}
$groups = serendipity_getAllGroups();
?>
<form method="POST" name="serendipityCategory">
<?php echo serendipity_setFormToken(); ?>
<table cellpadding="5" width="100%">
<tr>
<td><?php echo NAME; ?></td>
<td><input class="input_textbox" type="text" name="serendipity[cat][name]" value="<?php echo isset($this_cat['category_name']) ? htmlspecialchars($this_cat['category_name']) : ''; ?>" /></td>
<td rowspan="5" align="center" valign="middle" width="200" style="border: 1px solid #ccc"><img src="<?php echo isset($this_cat['category_icon']) ? htmlspecialchars($this_cat['category_icon']) : '' ?>" id="imagepreview" <?php echo empty($this_cat['category_icon']) ? 'style="display: none"' : '' ?> /></td>
</tr>
<tr>
<td><?php echo DESCRIPTION; ?></td>
<td><input class="input_textbox" type="text" name="serendipity[cat][description]" value="<?php echo isset($this_cat['category_description']) ? htmlspecialchars($this_cat['category_description']) : ''; ?>" /></td>
</tr>
<tr>
<td><?php echo IMAGE; ?></td>
<td>
<script type="text/javascript" language="JavaScript" src="serendipity_editor.js"></script>
<input class="input_textbox" type="text" id="img_icon" name="serendipity[cat][icon]" value="<?php echo isset($this_cat['category_icon']) ? htmlspecialchars($this_cat['category_icon']) : ''; ?>" onchange="document.getElementById('imagepreview').src = this.value; document.getElementById('imagepreview').style.display = '';" />
<script type="text/javascript" language="JavaScript">
var img_icon = document.getElementById('img_icon');
var imgBtn = document.createElement('div');
imgBtn.id = "category_ml_popup";
imgBtn.innerHTML = '<input type="button" name="insImage" value="<?php echo IMAGE ; ?>" onclick="window.open(\'serendipity_admin_image_selector.php?serendipity[htmltarget]=img_icon&amp;serendipity[filename_only]=true\', \'ImageSel\', \'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1\');" class="serendipityPrettyButton input_button" />';
img_icon.parentNode.insertBefore(imgBtn, img_icon.nextSibling);
</script>
</td>
</tr>
<tr>
<td><label for="read_authors"><?php echo PERM_READ; ?></label></td>
<td>
<select size="6" id="read_authors" multiple="multiple" name="serendipity[cat][read_authors][]">
<option value="0" <?php echo (!is_array($this_cat) || (isset($this_cat['authorid']) && $this_cat['authorid'] == '0') || isset($read_groups[0])) ? 'selected="selected"' : ''; ?>><?php echo ALL_AUTHORS; ?></option>
<?php
foreach($groups AS $group) {
echo '<option value="' . $group['confkey'] . '" ' . (isset($read_groups[$group['confkey']]) ? 'selected="selected"' : '') . '>' . htmlspecialchars($group['confvalue']) . '</option>' . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><label for="write_authors"><?php echo PERM_WRITE; ?></label></td>
<td>
<select size="6" id="write_authors" multiple="multiple" name="serendipity[cat][write_authors][]">
<option value="0" <?php echo (!is_array($this_cat) || (isset($this_cat['authorid']) && $this_cat['authorid'] == '0') || isset($write_groups[0])) ? 'selected="selected"' : ''; ?>><?php echo ALL_AUTHORS; ?></option>
<?php
foreach($groups AS $group) {
echo '<option value="' . $group['confkey'] . '" ' . (isset($write_groups[$group['confkey']]) ? 'selected="selected"' : '') . '>' . htmlspecialchars($group['confvalue']) . '</option>' . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><label for="parent_cat"><?php echo PARENT_CATEGORY; ?></label></td>
<td>
<select id="parent_cat" name="serendipity[cat][parent_cat]">
<option value="0"<?php if ( (int)$serendipity['GET']['cid'] == 0 ) echo ' selected="selected"'; ?>>[ <?php echo NO_CATEGORY; ?> ]</option>
<?php
$categories = serendipity_fetchCategories('all');
$categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
foreach ( $categories as $cat ) {
/* We can't be our own parent, the universe will collapse */
if ( $cat['categoryid'] == $serendipity['GET']['cid'] ) {
continue;
}
echo '<option value="'. $cat['categoryid'] .'"'. ($this_cat['parentid'] == $cat['categoryid'] ? ' selected="selected"' : '') .'>'. str_repeat('&nbsp;', $cat['depth']) . $cat['category_name'] .'</option>' . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php echo CATEGORY_HIDE_SUB ?><br /><em><?php echo CATEGORY_HIDE_SUB_DESC; ?></em></td>
<td valign="top">
<input class="input_radio" type="radio" name="serendipity[cat][hide_sub]" value="0" <?php echo ($this_cat['hide_sub'] == 0 ? 'checked="checked"' : ''); ?> id="hide_sub_no" /> <label for="hide_sub_no"><?php echo NO; ?></label>
<input class="input_radio" type="radio" name="serendipity[cat][hide_sub]" value="1" <?php echo ($this_cat['hide_sub'] == 1 ? 'checked="checked"' : ''); ?> id="hide_sub_yes" /> <label for="hide_sub_yes"><?php echo YES; ?></label>
</td>
</tr>
<?php serendipity_plugin_api::hook_event('backend_category_showForm', $cid, $this_cat); ?>
</table>
<div><input type="submit" name="SAVE" value="<?php echo $save; ?>" class="serendipityPrettyButton input_button" /></div>
</form>
<?php } ?>
<?php
if ( $serendipity['GET']['adminAction'] == 'view' ) {
if (empty($admin_category)) {
$cats = serendipity_fetchCategories('all');
} else {
$cats = serendipity_fetchCategories(null, null, null, 'write');
}
$data['view'] = true;
$data['viewCats'] = $cats;
if ( is_array($cats) ) {
$categories = serendipity_walkRecursive($cats, 'categoryid', 'parentid', VIEWMODE_THREADED);
$data['viewCategories'] = $categories;
if ( is_array($cats) && sizeof($cats) > 0 ) {
echo CATEGORY_INDEX .':';
} else {
echo '<div align="center">- '. NO_CATEGORIES .' -</div>';
}
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/category.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
?>
<br /><br />
<table cellspacing="0" cellpadding="4" width="100%" border=0>
<?php
if ( is_array($cats) ) {
$categories = serendipity_walkRecursive($cats, 'categoryid', 'parentid', VIEWMODE_THREADED);
foreach ( $categories as $category ) {
?>
<tr>
<td width="16"><a title="<?php echo EDIT ?>" href="?serendipity[adminModule]=category&amp;serendipity[adminAction]=edit&amp;serendipity[cid]=<?php echo $category['categoryid'] ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/edit.png') ?>" border="0" alt="<?php echo EDIT ?>" /></a></td>
<td width="16"><a title="<?php echo DELETE ?>" href="?serendipity[adminModule]=category&amp;serendipity[adminAction]=delete&amp;serendipity[cid]=<?php echo $category['categoryid'] ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/delete.png') ?>" border="0" alt="<?php echo DELETE ?>" /></a></td>
<td width="16"><?php if ( !empty($category['category_icon']) ) {?><img src="<?php echo serendipity_getTemplateFile('admin/img/thumbnail.png') ?>" alt="" /><?php } else echo '&nbsp;' ?></td>
<td width="300" style="padding-left: <?php echo ($category['depth']*15)+20 ?>px"><img src="<?php echo serendipity_getTemplateFile('admin/img/folder.png') ?>" style="vertical-align: bottom;"> <?php echo htmlspecialchars($category['category_name']) ?></td>
<td><?php echo htmlspecialchars($category['category_description']) ?></td>
<td align="right"><?php echo ($category['authorid'] == '0' ? ALL_AUTHORS : htmlspecialchars($category['realname'])); ?></td>
</tr>
<?php }
} ?>
<tr>
<td colspan="6" align="right">
<a href="?serendipity[adminModule]=category&serendipity[adminAction]=new" class="serendipityPrettyButton input_button"><?php echo CREATE_NEW_CAT ?></a>
</td>
</tr>
</table>
<?php }
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -1,4 +1,6 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
if (IN_serendipity !== true) {
die ("Don't hack!");
@ -8,8 +10,6 @@ if (!serendipity_checkPermission('adminComments')) {
return;
}
$data = array();
$commentsPerPage = (int)(!empty($serendipity['GET']['filter']['perpage']) ? $serendipity['GET']['filter']['perpage'] : 10);
$summaryLength = 200;
@ -17,20 +17,20 @@ $errormsg = '';
if ($serendipity['POST']['formAction'] == 'multiDelete' && sizeof($serendipity['POST']['delete']) != 0 && serendipity_checkFormToken()) {
if ($serendipity['POST']['togglemoderate'] != '') {
foreach ( $serendipity['POST']['delete'] as $k => $v ) {
$ac = serendipity_approveComment($k, $v, false, 'flip');
if ($ac > 0) {
$errormsg .= DONE . ': '. sprintf(COMMENT_APPROVED, (int)$k);
} else {
$errormsg .= DONE . ': '. sprintf(COMMENT_MODERATED, (int)$k);
}
}
foreach ( $serendipity['POST']['delete'] as $k => $v ) {
$ac = serendipity_approveComment($k, $v, false, 'flip');
if ($ac > 0) {
$errormsg .= DONE . ': '. sprintf(COMMENT_APPROVED, (int)$k) . '<br />';
} else {
$errormsg .= DONE . ': '. sprintf(COMMENT_MODERATED, (int)$k) . '<br />';
}
}
} else {
foreach ( $serendipity['POST']['delete'] as $k => $v ) {
serendipity_deleteComment($k, $v);
$errormsg .= DONE . ': '. sprintf(COMMENT_DELETED, (int)$k);
}
}
foreach ( $serendipity['POST']['delete'] as $k => $v ) {
serendipity_deleteComment($k, $v);
$errormsg .= DONE . ': '. sprintf(COMMENT_DELETED, (int)$k) . '<br />';
}
}
}
@ -62,7 +62,7 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio
if (!empty($comment['comment'])) {
if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) {
echo '<script type="text/javascript">alert("' . COMMENT_ADDED . '"); parent.focus(); this.close();</script>';
echo '<noscript><p class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . COMMENT_ADDED . '</p></noscript>';
echo '<noscript><p class="serendipityAdminMsgError serendipity_backend_msg_notice"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . COMMENT_ADDED . '</p></noscript>';
return true;
} else {
$errormsg .= COMMENT_NOT_ADDED;
@ -120,7 +120,7 @@ if (isset($serendipity['GET']['adminAction']) && ($serendipity['GET']['adminActi
serendipity_smarty_init();
if ($serendipity['GET']['adminAction'] == 'reply' || $serendipity['GET']['adminAction'] == 'doReply') {
$c = serendipity_fetchComments($serendipity['GET']['entry_id'], 1, 'co.id', false, 'NORMAL', ' AND co.id=' . (int)$serendipity['GET']['id']);
$c = serendipity_fetchComments($serendipity['GET']['entry_id'], 1, 'co.id', false, 'NORMAL', ' AND co.id=' . (int)$serendipity['GET']['id']);
if (isset($serendipity['POST']['preview'])) {
$c[] = array(
@ -134,37 +134,37 @@ if (isset($serendipity['GET']['adminAction']) && ($serendipity['GET']['adminActi
}
$target_url = '?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=doReply&amp;serendipity[id]=' . (int)$serendipity['GET']['id'] . '&amp;serendipity[entry_id]=' . (int)$serendipity['GET']['entry_id'] . '&amp;serendipity[noBanner]=true&amp;serendipity[noSidebar]=true&amp;' . serendipity_setFormToken('url');
$codata = $serendipity['POST'];
$codata['replyTo'] = (int)$serendipity['GET']['id'];
$data = $serendipity['POST'];
$data['replyTo'] = (int)$serendipity['GET']['id'];
$out = serendipity_printComments($c);
$serendipity['smarty']->display(serendipity_getTemplateFile('comments.tpl', 'serendipityPath'));
if (!isset($codata['name'])) {
$codata['name'] = $serendipity['serendipityRealname'];
if (!isset($data['name'])) {
$data['name'] = $serendipity['serendipityRealname'];
}
if (!isset($codata['email'])) {
$codata['email'] = $serendipity['serendipityEmail'];
if (!isset($data['email'])) {
$data['email'] = $serendipity['serendipityEmail'];
}
} else {
$target_url = '?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=doEdit&amp;serendipity[id]=' . (int)$serendipity['GET']['id'] . '&amp;serendipity[entry_id]=' . (int)$serendipity['GET']['entry_id'] . '&amp;' . serendipity_setFormToken('url');
/* If we are not in preview, we need comment data from our database */
/* If we are not in preview, we need data from our database */
if (!isset($serendipity['POST']['preview'])) {
$comment = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}comments WHERE id = ". (int)$serendipity['GET']['id']);
$codata['name'] = $comment[0]['author'];
$codata['email'] = $comment[0]['email'];
$codata['url'] = $comment[0]['url'];
$codata['replyTo'] = $comment[0]['parent_id'];
$codata['comment'] = $comment[0]['body'];
$data['name'] = $comment[0]['author'];
$data['email'] = $comment[0]['email'];
$data['url'] = $comment[0]['url'];
$data['replyTo'] = $comment[0]['parent_id'];
$data['comment'] = $comment[0]['body'];
/* If we are in preview, we get comment data from our form */
/* If we are in preview, we get data from our form */
} elseif (isset($serendipity['POST']['preview'])) {
$codata['name'] = $serendipity['POST']['name'];
$codata['email'] = $serendipity['POST']['email'];
$codata['url'] = $serendipity['POST']['url'];
$codata['replyTo'] = $serendipity['POST']['replyTo'];
$codata['comment'] = $serendipity['POST']['comment'];
$data['name'] = $serendipity['POST']['name'];
$data['email'] = $serendipity['POST']['email'];
$data['url'] = $serendipity['POST']['url'];
$data['replyTo'] = $serendipity['POST']['replyTo'];
$data['comment'] = $serendipity['POST']['comment'];
$pc_data = array(
array(
'email' => $serendipity['POST']['email'],
@ -180,16 +180,16 @@ if (isset($serendipity['GET']['adminAction']) && ($serendipity['GET']['adminActi
}
}
if (!empty($codata['url']) && substr($codata['url'], 0, 7) != 'http://' &&
substr($codata['url'], 0, 8) != 'https://') {
$codata['url'] = 'http://' . $codata['url'];
if (!empty($data['url']) && substr($data['url'], 0, 7) != 'http://' &&
substr($data['url'], 0, 8) != 'https://') {
$data['url'] = 'http://' . $data['url'];
}
serendipity_displayCommentForm(
$serendipity['GET']['entry_id'],
$target_url,
NULL,
$codata,
$data,
false,
false
);
@ -264,161 +264,330 @@ if ( $page == 0 || $page > $pages ) {
}
$linkPrevious = 'serendipity_admin.php?serendipity[adminModule]=comments&amp;serendipity[page]='. ($page-1) . $searchString;
$linkNext = 'serendipity_admin.php?serendipity[adminModule]=comments&amp;serendipity[page]='. ($page+1) . $searchString;
$filter_vals = array(10, 20, 50, COMMENTS_FILTER_ALL);
$linkNext = 'serendipity_admin.php?serendipity[adminModule]=comments&amp;serendipity[page]='. ($page+1) . $searchString;
if ($commentsPerPage == COMMENTS_FILTER_ALL) {
$limit = '';
} else {
}else {
$limit = serendipity_db_limit_sql(serendipity_db_limit(($page-1)*(int)$commentsPerPage, (int)$commentsPerPage));
}
$sql = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c
LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id)
WHERE 1 = 1 " . ($c_type !== null ? " AND c.type = '$c_type' " : '') . $and
. (!serendipity_checkPermission('adminEntriesMaintainOthers') ? 'AND e.authorid = ' . (int)$serendipity['authorid'] : '') . "
$sql = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c
LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id)
WHERE 1 = 1 " . ($c_type !== null ? " AND c.type = '$c_type' " : '') . $and
. (!serendipity_checkPermission('adminEntriesMaintainOthers') ? 'AND e.authorid = ' . (int)$serendipity['authorid'] : '') . "
ORDER BY c.id DESC $limit");
$data['commentsPerPage'] = $commentsPerPage;
$data['totalComments'] = $totalComments;
$data['pages'] = $pages;
$data['page'] = $page;
$data['linkPrevious'] = $linkPrevious;
$data['linkNext'] = $linkNext;
$data['searchString'] = $searchString;
$data['filter_vals'] = $filter_vals;
$data['sql'] = $sql;
$data['c_type'] = $c_type;
if(!empty($errormsg)) echo '<p class="serendipityAdminMsgError serendipity_backend_msg_notice"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . $errormsg . '</p>'; // closing admin messages
?>
<script type="text/javascript">
function FT_toggle(id) {
if ( document.getElementById(id + '_full').style.display == '' ) {
document.getElementById(id + '_full').style.display='none';
document.getElementById(id + '_summary').style.display='';
document.getElementById(id + '_text').innerHTML = '<?php echo VIEW_FULL ?>';
} else {
document.getElementById(id + '_full').style.display='';
document.getElementById(id + '_summary').style.display='none';
document.getElementById(id + '_text').innerHTML = '<?php echo HIDE ?>';
}
return false;
}
function invertSelection() {
var f = document.formMultiDelete;
for (var i = 0; i < f.elements.length; i++) {
if( f.elements[i].type == 'checkbox' ) {
f.elements[i].checked = !(f.elements[i].checked);
f.elements[i].onclick();
}
}
}
var origborder = '';
var origwidth = '';
function highlightComment(id, checkvalue) {
var comment = document.getElementById(id);
if (origborder == '') {
origborder = comment.style.borderColor;
if (origborder == '') {
origborder = '#FFFFFF';
}
}
if (origwidth == '') {
origwidth = comment.style.borderWidth;
if (origwidth == '' || origwidth == 0) {
origwidth = 1;
}
}
if (checkvalue) {
comment.style.borderColor = '#FF0000';
comment.style.borderWidth = origwidth;
} else {
comment.style.borderColor = '';
comment.style.borderWidth = origwidth;
}
}
</script>
<form action="" method="GET" style="margin: 0">
<?php echo serendipity_setFormToken(); ?>
<input type="hidden" name="serendipity[adminModule]" value="comments" />
<input type="hidden" name="serendipity[page]" value="<?php echo $page ?>" />
<table class="serendipity_admin_filters" width="100%">
<tr>
<td colspan="6" class="serendipity_admin_filters_headline"><strong><?php echo FILTERS ?></strong> - <?php echo FIND_COMMENTS ?></td>
</tr>
<tr>
<td><?php echo AUTHOR ?>:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][author]" size="15" value="<?php echo htmlspecialchars($serendipity['GET']['filter']['author']) ?>" /></td>
<td><?php echo EMAIL ?>:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][email]" size="15" value="<?php echo htmlspecialchars($serendipity['GET']['filter']['email']) ?>" /></td>
<td><?php echo URL ?>:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][url]" size="15" value="<?php echo htmlspecialchars($serendipity['GET']['filter']['url']) ?>" /></td>
</tr>
<tr>
<td>IP:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][ip]" size="15" value="<?php echo htmlspecialchars($serendipity['GET']['filter']['ip']) ?>" /></td>
<td><?php echo CONTENT ?>:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][body]" size="15" value="<?php echo htmlspecialchars($serendipity['GET']['filter']['body']) ?>" /></td>
<td><?php echo REFERER ?>:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][referer]" size="15" value="<?php echo htmlspecialchars($serendipity['GET']['filter']['referer']) ?>" /></td>
</tr>
<tr>
<td><?php echo COMMENTS; ?>:</td>
<td><select name="serendipity[filter][perpage]">
<?php
$filter_vals = array(10, 20, 50, COMMENTS_FILTER_ALL);
foreach($filter_vals AS $filter_val) { ?>
<option value="<?php echo $filter_val; ?>" <?php echo ($commentsPerPage == $filter_val ? ' selected="selected"' : ''); ?>><?php echo $filter_val; ?></option>
<?php
}
?>
</select></td>
<td><?php echo COMMENTS_FILTER_SHOW ?>:</td>
<td><select name="serendipity[filter][show]">
<option value="all"<?php if ( $serendipity['GET']['filter']['show'] == 'all' ) echo ' selected="selected"' ?>><?php echo COMMENTS_FILTER_ALL ?></option>
<option value="approved"<?php if ( $serendipity['GET']['filter']['show'] == 'approved' ) echo ' selected="selected"' ?>><?php echo COMMENTS_FILTER_APPROVED_ONLY ?></option>
<option value="pending"<?php if ( $serendipity['GET']['filter']['show'] == 'pending' ) echo ' selected="selected"' ?>><?php echo COMMENTS_FILTER_NEED_APPROVAL ?></option>
<option value="confirm"<?php if ( $serendipity['GET']['filter']['show'] == 'confirm' ) echo ' selected="selected"' ?>><?php echo COMMENTS_FILTER_NEED_CONFIRM ?></option>
</select></td>
<td><?php echo TYPE; ?></td>
<td><select name="serendipity[filter][type]">
<option value=""><?php echo COMMENTS_FILTER_ALL ?></option>
<option value="NORMAL"<?php if ($c_type == 'NORMAL') echo ' selected="selected"' ?>><?php echo COMMENTS; ?></option>
<option value="TRACKBACK"<?php if ($c_type == 'TRACKBACK') echo ' selected="selected"' ?>><?php echo TRACKBACKS; ?></option>
<option value="PINGBACK"<?php if ($c_type == 'PINGBACK') echo ' selected="selected"' ?>><?php echo PINGBACKS; ?></option>
</select></td>
</tr>
<tr>
<td colspan="6" align="right"><input type="submit" name="submit" value=" - <?php echo GO ?> - " class="serendipityPrettyButton input_button" /> <?php serendipity_plugin_api::hook_event('backend_comments_top', $sql); ?></td>
</tr>
</table>
</form>
<hr noshade="noshade" /><br />
<?php
if (!is_array($sql)) {
echo '<div align="center">- '. NO_COMMENTS .' -</div>';
} else {
?>
<form action="" method="POST" name="formMultiDelete" id="formMultiDelete">
<?php echo serendipity_setFormToken(); ?>
<input type="hidden" name="serendipity[formAction]" value="multiDelete" />
<table width="100%" cellpadding="3" border="0" cellspacing="0">
<tr>
<td align="center">
<table width="100%" cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
<?php if ( $page != 1 && $page <= $pages ) { ?>
<a href="<?php echo $linkPrevious; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/previous.png') ?>" /><?php echo PREVIOUS ?></a>
<?php } ?>
</td>
<td align="center"><?php printf(PAGE_BROWSE_COMMENTS, $page, $pages, $totalComments); ?></td>
<td align="right">
<?php if ( $page != $pages ) { ?>
<a href="<?php echo $linkNext; ?>" class="serendipityIconLinkRight"><?php echo NEXT ?><img src="<?php echo serendipity_getTemplateFile('admin/img/next.png') ?>" /></a>
<?php } ?>
</td>
</tr>
</table>
</td>
</tr>
<?php
$i = 0;
$comments = array();
foreach ($sql as $rs) {
$i++;
$comment = array(
'fullBody' => $rs['body'],
'summary' => serendipity_mb('substr', $rs['body'], 0, $summaryLength),
'status' => $rs['status'],
'type' => $rs['type'],
'id' => $rs['id'],
'title' => $rs['title'],
'timestamp' => $rs['timestamp'],
'referer' => $rs['referer'],
'url' => $rs['url'],
'ip' => $rs['ip'],
'entry_url' => serendipity_archiveURL($rs['entry_id'], $rs['title']),
'email' => $rs['email'],
'author' => (empty($rs['author']) ? ANONYMOUS : $rs['author']),
'entry_id' => $rs['entry_id'],
'subscribed'=> $rs['subscribed']
);
if(is_array($sql)) {
foreach ($sql as $rs) {
$i++;
$comment = array(
'fullBody' => $rs['body'],
'summary' => serendipity_mb('substr', $rs['body'], 0, $summaryLength),
'status' => $rs['status'],
'type' => $rs['type'],
'id' => $rs['id'],
'title' => $rs['title'],
'timestamp' => $rs['timestamp'],
'pubdate' => date("c", (int)$rs['timestamp']), /* added to comment array to support HTML5 time tags in tpl */
'referer' => $rs['referer'],
'url' => $rs['url'],
'ip' => $rs['ip'],
'entry_url' => serendipity_archiveURL($rs['entry_id'], $rs['title']),
'email' => $rs['email'],
'author' => (empty($rs['author']) ? ANONYMOUS : $rs['author']),
'entry_id' => $rs['entry_id'],
'subscribed'=> $rs['subscribed']
);
$entrylink = serendipity_archiveURL($comment['entry_id'], 'comments', 'serendipityHTTPPath', true) . '#c' . $comment['id'];
if (strlen($comment['fullBody']) > strlen($comment['summary']) ) {
$comment['summary'] .= ' ...';
$comment['excerpt'] = true;
$entrylink = serendipity_archiveURL($comment['entry_id'], 'comments', 'serendipityHTTPPath', true) . '#c' . $comment['id'];
$comment['entrylink'] = $entrylink;
// When summary is not the full body, strip HTML tags from summary, as it might break and leave unclosed HTML.
$comment['fullBody'] = nl2br(htmlspecialchars($comment['fullBody']));
$comment['summary'] = nl2br(strip_tags($comment['summary']));
} else {
$comment['excerpt'] = false;
if (strlen($comment['fullBody']) > strlen($comment['summary']) ) {
$comment['summary'] .= ' ...';
$comment['excerpt'] = true;
// When summary is not the full body, strip HTML tags from summary, as it might break and leave unclosed HTML.
$comment['fullBody'] = nl2br(htmlspecialchars($comment['fullBody']));
$comment['summary'] = nl2br(strip_tags($comment['summary']));
} else {
$comment['excerpt'] = false;
$comment['fullBody'] = $comment['summary'] = nl2br(htmlspecialchars($comment['fullBody']));
}
serendipity_plugin_api::hook_event('backend_view_comment', $comment, '&amp;serendipity[page]='. $page . $searchString);
$class = 'serendipity_admin_list_item_' . (($i % 2 == 0 ) ? 'even' : 'uneven');
if ($comment['status'] == 'pending') {
$class .= ' serendipity_admin_comment_pending';
$header_class = 'serendipityAdminMsgNote serendipity_admin_comment_pending_header';
} elseif (strstr($comment['status'], 'confirm')) {
$class .= ' serendipity_admin_comment_pending serendipity_admin_comment_confirm';
$header_class = 'serendipityAdminMsgNote serendipity_admin_comment_pending_header serendipity_admin_comment_confirm_header';
} else {
$header_class = '';
}
$comment['class'] = $class;
$comment['header_class'] = $header_class;
if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' && substr($comment['url'], 0, 8) != 'https://') {
$comment['url'] = 'http://' . $comment['url'];
}
// include all comment vars back into upper array to assign to Smarty
$comments[] = $comment;
$comment['fullBody'] = $comment['summary'] = nl2br(htmlspecialchars($comment['fullBody']));
}
}
/* This could be used instead, as i.e. there is no need for summary body here, as strip_tags, nl2br, etc could be done via smarty in the tpl - see dashboard PoC */
/* $class and $header_class would not be needed either, ... */
/**
function buildCommentList($limit) {
global $serendipity;
$comments = serendipity_fetchComments(null, $limit, 'co.id DESC', true, 'NORMAL', '');
if (!is_array($comments) || count($comments) == 0) {
return;
}
$comment = array();
foreach ($sql as $rs) {
$comment[] = array(
'body' => htmlspecialchars($rs['body']),
'status' => $rs['status'],
'type' => $rs['type'],
'id' => $rs['id'],
'title' => htmlspecialchars($rs['title']),
'timestamp' => $rs['timestamp'],
'pubdate' => date("c", (int)$rs['timestamp']),
'referer' => htmlspecialchars($rs['referer']),
'url' => htmlspecialchars($rs['url']),
'ip' => htmlspecialchars($rs['ip']),
'entry_url' => serendipity_archiveURL($rs['entry_id'], htmlspecialchars($rs['title'])),
'email' => htmlspecialchars($rs['email']),
'author' => (empty($rs['author']) ? ANONYMOUS : htmlspecialchars($rs['author'])),
'entry_id' => $rs['entry_id'],
'subscribed' => $rs['subscribed'],
'entrylink' => serendipity_archiveURL($rs['entry_id'], 'comments', 'serendipityHTTPPath', true) . '#c' . $rs['id'],
'excerpt' => ((strlen($rs['body']) > serendipity_mb('substr', $rs['body'], 0, $summaryLength) ) ? true : false),
'delete_id' => sprintf(COMMENT_DELETE_CONFIRM, $rs['id'], htmlspecialchars($rs['author']))
);
if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' && substr($comment['url'], 0, 8) != 'https://') {
$comment['url'] = 'http://' . $comment['url'];
}
}
serendipity_plugin_api::hook_event('backend_view_comment', $comment, '&amp;serendipity[page]='. $page . $searchString);
$serendipity['smarty']->assign(
array( 'urltoken' => serendipity_setFormToken('url'),
'formtoken' => serendipity_setFormToken()
));
return $comment;
serendipity_plugin_api::hook_event('backend_view_comment', $comment, '&amp;serendipity[page]='. $page . $searchString);
$class = 'serendipity_admin_list_item_' . (($i % 2 == 0 ) ? 'even' : 'uneven');
if ($comment['status'] == 'pending') {
$class .= ' serendipity_admin_comment_pending';
$header_class = 'serendipityAdminMsgNote serendipity_admin_comment_pending_header';
} elseif (strstr($comment['status'], 'confirm')) {
$class .= ' serendipity_admin_comment_pending serendipity_admin_comment_confirm';
$header_class = 'serendipityAdminMsgNote serendipity_admin_comment_pending_header serendipity_admin_comment_confirm_header';
} else {
$header_class = '';
}
**/
$data['comments'] = $comments;
$data['errormsg'] = $errormsg;
$data['urltoken'] = serendipity_setFormToken('url');
$data['formtoken'] = serendipity_setFormToken();
$data['get']['filter'] = $serendipity['GET']['filter']; // don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' &&
substr($comment['url'], 0, 8) != 'https://') {
$comment['url'] = 'http://' . $comment['url'];
}
?>
<tr>
<td class="<?php echo $header_class; ?>">
<?php if (!empty($header_class)) { ?>
<img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_note.png'); ?>" alt="" />
<?php }?>
<a name="c<?php echo $comment['id'] ?>"></a>
<?php echo ($comment['type'] == 'NORMAL' ? COMMENT : ($comment['type'] == 'TRACKBACK' ? TRACKBACK : PINGBACK )) . ' #'. $comment['id'] .', '. IN_REPLY_TO .' <strong><a href="' . $comment['entry_url'] . '">'. htmlspecialchars($comment['title']) .'</a></strong>, '. ON . ' ' . serendipity_formatTime('%b %e %Y, %H:%M', $comment['timestamp'])?>
</td>
</tr>
<tr>
<td class="serendipity_admin_list_item <?php echo $class ?>" id="comment_<?php echo $comment['id'] ?>">
<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>
<td rowspan="3" width="20" align="center"><input class="input_checkbox" type="checkbox" name="serendipity[delete][<?php echo $comment['id'] ?>]" value="<?php echo $comment['entry_id'] ?>" onclick="highlightComment('comment_<?php echo $comment['id'] ?>', this.checked)" tabindex="<?php echo $i ?>" /></td>
<td width="40%"><strong><?php echo AUTHOR ?></strong>: <?php echo htmlspecialchars(serendipity_truncateString($comment['author'],30)) . $comment['action_author']; ?></td>
<td><strong><?php echo EMAIL ?></strong>:
<?php
if ( empty($comment['email']) ) {
echo 'N/A';
} else {
?>
<a href="mailto:<?php echo htmlspecialchars($comment['email']) ?>" title="<?php echo htmlspecialchars($comment['email']) ?>"><?php echo htmlspecialchars(serendipity_truncateString($comment['email'],30)) ?></a>
<?php if ($comment['subscribed'] == 'true') { echo '<span class="serendipity_subscription_on">(' . ACTIVE_COMMENT_SUBSCRIPTION . ')</span>'; } ?>
<?php } ?>
<?php echo $comment['action_email']; ?>
</td>
</tr>
<tr>
<td width="40%"><strong>IP</strong>:
<?php
if ( empty($comment['ip']) ) {
echo '0.0.0.0';
} else {
echo htmlspecialchars($comment['ip']);
}
?>
<?php echo $comment['action_ip']; ?>
</td>
<td><strong><?php echo URL; ?></strong>:
<?php
if ( empty($comment['url']) ) {
echo 'N/A';
} else {
?>
<a href="<?php echo htmlspecialchars($comment['url']) ?>" title="<?php echo htmlspecialchars($comment['url']) ?>" target="_blank"><?php echo htmlspecialchars(serendipity_truncateString($comment['url'],30)) ?></a>
<?php } ?>
<?php echo $comment['action_url']; ?>
</td>
</tr>
<tr>
<td width="40%">&nbsp;</td>
<td><strong><?php echo REFERER; ?></strong>:
<?php
if ( empty($comment['referer']) ) {
echo 'N/A';
} else {
?>
<a href="<?php echo htmlspecialchars($comment['referer']) ?>" title="<?php echo htmlspecialchars($comment['referer']) ?>" target="_blank"><?php echo htmlspecialchars(serendipity_truncateString($comment['referer'],30)) ?></a>
<?php } ?>
<?php echo $comment['action_referer']; ?>
</td>
<tr>
<td style="border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC" colspan="3">
<div id="<?php echo $comment['id'] ?>_summary"><?php echo $comment['summary'] ?></div>
<div id="<?php echo $comment['id'] ?>_full" style="display: none"><?php echo $comment['fullBody'] ?></div>
</td>
</tr>
</table>
<?php if ($comment['status'] == 'pending' || strstr($comment['status'], 'confirm')) { ?>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=approve&amp;serendipity[id]=<?php echo $comment['id'] ?>&amp;<?php echo serendipity_setFormToken('url'); ?>" class="serendipityIconLink" title="<?php echo APPROVE; ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/accept.png'); ?>" alt="<?php echo APPROVE ?>" /><?php echo APPROVE ?></a>
<?php } ?>
<?php if ($comment['status'] == 'approved') { ?>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=pending&amp;serendipity[id]=<?php echo $comment['id'] ?>&amp;<?php echo serendipity_setFormToken('url'); ?>" class="serendipityIconLink" title="<?php echo SET_TO_MODERATED; ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/clock.png'); ?>" alt="<?php echo SET_TO_MODERATED ?>" /><?php echo SET_TO_MODERATED ?></a>
<?php } ?>
<?php if ($comment['excerpt']) { ?>
<a href="#c<?php echo $comment['id'] ?>" onclick="FT_toggle(<?php echo $comment['id'] ?>); return false;" title="<?php echo VIEW; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/zoom.png'); ?>" alt="<?php echo TOGGLE_ALL; ?>" /><span id="<?php echo $comment['id'] ?>_text"><?php echo TOGGLE_ALL ?></span></a>
<?php } ?>
<a target="_blank" href="<?php echo $entrylink; ?>" title="<?php echo VIEW; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/zoom.png'); ?>" alt="<?php echo VIEW; ?>" /><?php echo VIEW ?></a>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=edit&amp;serendipity[id]=<?php echo $comment['id'] ?>&amp;serendipity[entry_id]=<?php echo $comment['entry_id'] ?>&amp;<?php echo serendipity_setFormToken('url'); ?>" title="<?php echo EDIT; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/edit.png'); ?>" alt="<?php echo EDIT; ?>" /><?php echo EDIT ?></a>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=delete&amp;serendipity[id]=<?php echo $comment['id'] ?>&amp;serendipity[entry_id]=<?php echo $comment['entry_id'] ?>&amp;<?php echo serendipity_setFormToken('url'); ?>" onclick='return confirm("<?php echo sprintf(COMMENT_DELETE_CONFIRM, $comment['id'], htmlspecialchars($comment['author'])) ?>")' title="<?php echo DELETE ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/delete.png'); ?>" alt="<?php echo DELETE; ?>" /><?php echo DELETE ?></a>
<a target="_blank" onclick="cf = window.open(this.href, 'CommentForm', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1'); cf.focus(); return false;" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=reply&amp;serendipity[id]=<?php echo $comment['id'] ?>&amp;serendipity[entry_id]=<?php echo $comment['entry_id'] ?>&amp;serendipity[noBanner]=true&amp;serendipity[noSidebar]=true&amp;<?php echo serendipity_setFormToken('url'); ?>" title="<?php echo REPLY ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/user_editor.png'); ?>" alt="<?php echo REPLY; ?>" /><?php echo REPLY ?></a>
<?php echo $comment['action_more']; ?>
</td>
</tr>
<tr>
<td><hr noshade="noshade" /></td>
</tr>
<?php } ?>
<tr>
<td><input type="button" name="toggle" value="<?php echo INVERT_SELECTIONS ?>" onclick="invertSelection()" class="serendipityPrettyButton input_button" />
<input type="submit" name="toggle" value="<?php echo DELETE_SELECTED_COMMENTS ?>" onclick="return confirm('<?php echo COMMENTS_DELETE_CONFIRM ?>')" tabindex="<?php echo ($i+1) ?>" class="serendipityPrettyButton input_button" />
<input type="submit" name="serendipity[togglemoderate]" value="<?php echo MODERATE_SELECTED_COMMENTS ?>" class="serendipityPrettyButton input_button" />
</td>
</tr>
</table>
<table width="100%" cellpadding="3" border="0" cellspacing="0">
<tr>
<td align="center">
<table width="100%" cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
<?php if ( $page != 1 && $page <= $pages ) { ?>
<a href="<?php echo $linkPrevious; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/previous.png') ?>" /><?php echo PREVIOUS ?></a>
<?php } ?>
</td>
<td align="center"><?php printf(PAGE_BROWSE_COMMENTS, $page, $pages, $totalComments); ?></td>
<td align="right">
<?php if ( $page != $pages ) { ?>
<a href="<?php echo $linkNext; ?>" class="serendipityIconLinkRight"><?php echo NEXT ?><img src="<?php echo serendipity_getTemplateFile('admin/img/next.png') ?>" /></a>
<?php } ?>
</td>
</tr>
</table>
</td>
</tr>
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/comments.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
/* vim: set sts=4 ts=4 expandtab : */
</form>
<?php } ?>

View File

@ -18,16 +18,13 @@ if (!serendipity_checkPermission('siteConfiguration') && !serendipity_checkPermi
return;
}
$data = array();
switch ($_POST['installAction'] && serendipity_checkFormToken()) {
case 'check':
$data['installAction'] = 'check';
$oldConfig = $serendipity;
$res = serendipity_updateConfiguration();
$data['res'] = $res;
if (is_array($res)) {
$data['diagnosticError'] = true;
echo DIAGNOSTIC_ERROR;
echo '<div class="serendipityAdminMsgError">- <img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . implode('<br />', $res) . '</div><br /><br />';
} else {
/* If we have new rewrite rules, then install them */
$permalinkOld = array(
@ -54,13 +51,20 @@ switch ($_POST['installAction'] && serendipity_checkFormToken()) {
}
}
if (serendipity_checkPermission('siteConfiguration') && serialize($permalinkOld) != serialize($permalinkNew)) {
$data['htaccessRewrite'] = true;
$data['serendipityPath'] = $serendipity['serendipityPath'];
printf(ATTEMPT_WRITE_FILE, $serendipity['serendipityPath'] . '.htaccess');
$res = serendipity_installFiles($serendipity['serendipityPath']);
$data['res'] = $res;
if (is_array($res)) {
echo implode('<br />', $res);
} else {
echo DONE . '<br />';
}
serendipity_buildPermalinks();
}
echo '<br /><div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . WRITTEN_N_SAVED .'</div>';
}
break;
@ -68,22 +72,9 @@ switch ($_POST['installAction'] && serendipity_checkFormToken()) {
default:
$from = &$serendipity;
$t = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
ob_start();
serendipity_printConfigTemplate($t, $from, false, true);
$data['config'] = ob_get_contents();
ob_end_clean();
break;
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/configuration.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -1,4 +1,6 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
if (IN_serendipity !== true) {
die ("Don't hack!");
@ -17,7 +19,6 @@ $sort_order = array('timestamp' => DATE,
'id' => 'ID');
$per_page = array('12', '16', '50', '100');
$data = array();
/**
* Shows the entry panel overview
@ -28,7 +29,7 @@ $data = array();
* @return null
*/
function serendipity_drawList() {
global $serendipity, $sort_order, $per_page, $data;
global $serendipity, $sort_order, $per_page;
$filter_import = array('author', 'category', 'isdraft');
$sort_import = array('perPage', 'ordermode', 'order');
@ -96,26 +97,94 @@ function serendipity_drawList() {
$orderby,
$filter_sql
);
?>
<div class="serendipity_admin_list">
<form action="?" method="get">
<input type="hidden" name="serendipity[action]" value="admin" />
<input type="hidden" name="serendipity[adminModule]" value="entries" />
<input type="hidden" name="serendipity[adminAction]" value="editSelect" />
<table width="100%" class="serendipity_admin_filters">
<tr>
<td class="serendipity_admin_filters_headline" colspan="6"><strong><?php echo FILTERS ?></strong> - <?php echo FIND_ENTRIES ?></td>
</tr>
<tr>
<td valign="top" width="80"><?php echo AUTHOR ?></td>
<td valign="top">
<select name="serendipity[filter][author]">
<option value="">--</option>
<?php
$users = serendipity_fetchUsers('', 'hidden', true);
if (is_array($users)) {
foreach ($users AS $user) {
if (isset($user['artcount']) && $user['artcount'] < 1) continue;
echo '<option value="' . $user['authorid'] . '" ' . (isset($serendipity['GET']['filter']['author']) && $serendipity['GET']['filter']['author'] == $user['authorid'] ? 'selected="selected"' : '') . '>' . htmlspecialchars($user['realname']) . '</option>' . "\n";
}
}
?> </select> <select name="serendipity[filter][isdraft]">
<option value="all"><?php echo COMMENTS_FILTER_ALL; ?></option>
<option value="draft" <?php echo (isset($serendipity['GET']['filter']['isdraft']) && $serendipity['GET']['filter']['isdraft'] == 'draft' ? 'selected="selected"' : ''); ?>><?php echo DRAFT; ?></option>
<option value="publish" <?php echo (isset($serendipity['GET']['filter']['isdraft']) && $serendipity['GET']['filter']['isdraft'] == 'publish' ? 'selected="selected"' : ''); ?>><?php echo PUBLISH; ?></option>
</select>
</td>
<td valign="top" width="80"><?php echo CATEGORY ?></td>
<td valign="top">
<select name="serendipity[filter][category]">
<option value="">--</option>
<?php
$categories = serendipity_fetchCategories();
$categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
foreach ( $categories as $cat ) {
echo '<option value="'. $cat['categoryid'] .'"'. ($serendipity['GET']['filter']['category'] == $cat['categoryid'] ? ' selected="selected"' : '') .'>'. str_repeat('&nbsp;', $cat['depth']) . htmlspecialchars($cat['category_name']) .'</option>' . "\n";
}
?> </select>
</td>
<td valign="top" width="80"><?php echo CONTENT ?></td>
<td valign="top"><input class="input_textbox" size="10" type="text" name="serendipity[filter][body]" value="<?php echo (isset($serendipity['GET']['filter']['body']) ? htmlspecialchars($serendipity['GET']['filter']['body']) : '') ?>" /></td>
</tr>
<tr>
<td class="serendipity_admin_filters_headline" colspan="6"><strong><?php echo SORT_ORDER ?></strong></td>
</tr>
<tr>
<td>
<?php echo SORT_BY ?>
</td>
<td>
<select name="serendipity[sort][order]">
<?php
foreach($sort_order as $so_key => $so_val) {
echo '<option value="' . $so_key . '" ' . (isset($serendipity['GET']['sort']['order']) && $serendipity['GET']['sort']['order'] == $so_key ? 'selected="selected"': '') . '>' . $so_val . '</option>' . "\n";
}
?> </select>
</td>
<td><?php echo SORT_ORDER ?></td>
<td>
<select name="serendipity[sort][ordermode]">
<option value="DESC" <?php echo (isset($serendipity['GET']['sort']['ordermode']) && $serendipity['GET']['sort']['ordermode'] == 'DESC' ? 'selected="selected"' : '') ?>><?php echo SORT_ORDER_DESC ?></option>
<option value="ASC" <?php echo (isset($serendipity['GET']['sort']['ordermode']) && $serendipity['GET']['sort']['ordermode'] == 'ASC' ? 'selected="selected"' : '') ?>><?php echo SORT_ORDER_ASC ?></option>
</select>
</td>
<td><?php echo ENTRIES_PER_PAGE ?></td>
<td>
<select name="serendipity[sort][perPage]">
<?php
foreach($per_page AS $per_page_nr) {
echo '<option value="' . $per_page_nr . '" ' . (isset($serendipity['GET']['sort']['perPage']) && $serendipity['GET']['sort']['perPage'] == $per_page_nr ? 'selected="selected"' : '') . '>' . $per_page_nr . '</option>' . "\n";
}
$users = serendipity_fetchUsers('', 'hidden', true);
$categories = serendipity_fetchCategories();
$categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
$data['drawList'] = true;
$data['sort_order'] = $sort_order;
$data['perPage'] = $perPage;
$data['per_page'] = $per_page;
$data['urltoken'] = serendipity_setFormToken('url');
$data['formtoken'] = serendipity_setFormToken();
$data['users'] = $users;
$data['categories'] = $categories;
$data['offSet'] = $offSet;
$data['use_iframe'] = $serendipity['use_iframe'];
?>
</select>
</td>
</tr>
<tr>
<td align="right" colspan="6"><input type="submit" name="go" value="<?php echo GO ?>" class="serendipityPrettyButton input_button" /></td>
</tr>
</table>
</form>
<table class="serendipity_admin_list" cellpadding="5" width="100%">
<?php
if (is_array($entries)) {
$data['is_entries'] = true;
$data['count'] = count($entries);
$count = count($entries);
$qString = '?serendipity[adminModule]=entries&amp;serendipity[adminAction]=editSelect';
foreach ((array)$serendipity['GET']['sort'] as $k => $v) {
$qString .= '&amp;serendipity[sort]['. $k .']='. $v;
@ -123,57 +192,175 @@ function serendipity_drawList() {
foreach ((array)$serendipity['GET']['filter'] as $k => $v) {
$qString .= '&amp;serendipity[filter]['. $k .']='. $v;
}
$data['linkPrevious'] = $qString . '&amp;serendipity[page]=' . ($page-1);
$data['linkNext'] = $qString . '&amp;serendipity[page]=' . ($page+1);
$linkPrevious = $qString . '&amp;serendipity[page]=' . ($page-1);
$linkNext = $qString . '&amp;serendipity[page]=' . ($page+1);
?>
<tr>
<td>
<?php if ($offSet > 0) { ?>
<a href="<?php echo $linkPrevious ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/previous.png') ?>" /><?php echo PREVIOUS ?></a>
<?php } ?>
</td>
<td align="right">
<?php if ($count > $perPage) { ?>
<a href="<?php echo $linkNext ?>" class="serendipityIconLinkRight"><?php echo NEXT ?><img src="<?php echo serendipity_getTemplateFile('admin/img/next.png') ?>" /></a>
<?php } ?>
</td>
</tr>
</table>
<script type="text/javascript">
function invertSelection() {
var f = document.formMultiDelete;
for (var i = 0; i < f.elements.length; i++) {
if (f.elements[i].type == 'checkbox') {
f.elements[i].checked = !(f.elements[i].checked);
}
}
}
</script>
<form action="?" method="post" name="formMultiDelete" id="formMultiDelete">
<?php echo serendipity_setFormToken(); ?>
<input type="hidden" name="serendipity[action]" value="admin" />
<input type="hidden" name="serendipity[adminModule]" value="entries" />
<input type="hidden" name="serendipity[adminAction]" value="multidelete" />
<?php
// Print the entries
$smartentries = array();
foreach ($entries as $ey) {
if (count($ey['categories'])) {
$cats = array();
foreach ($ey['categories'] as $cat) {
$cats[] = '<a href="' . serendipity_categoryURL($cat) . '">' . htmlspecialchars($cat['category_name']) . '</a>';
}
$entry_cats = implode(', ', $cats);
$rows = 0;
foreach ($entries as $entry) {
$rows++;
if ($rows > $perPage) {
continue;
}
// Find out if the entry has been modified later than 30 minutes after creation
if ($entry['timestamp'] <= ($entry['last_modified'] - 60*30)) {
$lm = '<a href="#" title="' . LAST_UPDATED . ': ' . serendipity_formatTime(DATE_FORMAT_SHORT, $entry['last_modified']) . '" onclick="alert(this.title)"><img src="'. serendipity_getTemplateFile('admin/img/clock.png') .'" alt="*" style="border: 0px none ; vertical-align: bottom;" /></a>';
} else {
$lm = '';
}
$smartentries[] = array(
'id' => $ey['id'],
'title' => htmlspecialchars($ey['title']),
'timestamp' => (int)$ey['timestamp'],
'last_modified' => (int)$ey['last_modified'],
'isdraft' => serendipity_db_bool($ey['isdraft']),
'ep_is_sticky' => (serendipity_db_bool($ey['properties']['ep_is_sticky']) ? true : false),
'pubdate' => date("c", (int)$ey['timestamp']),
'author' => htmlspecialchars($ey['author']),
'cats' => $entry_cats,
'preview' => ((serendipity_db_bool($ey['isdraft']) || (!$serendipity['showFutureEntries'] && $ey['timestamp'] >= serendipity_serverOffsetHour())) ? true : false),
'archive_link' => serendipity_archiveURL($ey['id'], $ey['title'], 'serendipityHTTPPath', true, array('timestamp' => $ey['timestamp'])),
'preview_link' => '?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=preview&amp;' . serendipity_setFormToken('url') . '&amp;serendipity[id]=' . $ey['id']
);
if (!$serendipity['showFutureEntries'] && $entry['timestamp'] >= serendipity_serverOffsetHour()) {
$entry_pre = '<a href="#" title="' . ENTRY_PUBLISHED_FUTURE . '" onclick="alert(this.title)"><img src="'. serendipity_getTemplateFile('admin/img/clock_future.png') .'" alt="*" style="border: 0px none ; vertical-align: bottom;" /></a> ';
} else {
$entry_pre = '';
}
if (serendipity_db_bool($entry['properties']['ep_is_sticky'])) {
$entry_pre .= ' ' . STICKY_POSTINGS . ': ';
}
if (serendipity_db_bool($entry['isdraft'])) {
$entry_pre .= ' ' . DRAFT . ': ';
}
?>
<!-- <div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo ($rows % 2 ? 'even' : 'uneven'); ?>"> -->
<div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo ($rows % 2) ? 'even' : 'uneven'; ?>">
<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td>
<strong><?php echo $entry_pre; ?><a href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=edit&amp;serendipity[id]=<?php echo $entry['id']; ?>" title="#<?php echo $entry['id']; ?>"><?php echo serendipity_truncateString(htmlspecialchars($entry['title']),50) ?></a></strong>
</td>
<td align="right">
<?php echo serendipity_formatTime(DATE_FORMAT_SHORT, $entry['timestamp']) . ' ' .$lm; ?>
</td>
</tr>
<tr>
<td>
<?php
echo POSTED_BY . ' ' . htmlspecialchars($entry['author']);
if (count($entry['categories'])) {
echo ' ' . IN . ' ';
$cats = array();
foreach ($entry['categories'] as $cat) {
$caturl = serendipity_categoryURL($cat);
$cats[] = '<a href="' . $caturl . '">' . htmlspecialchars($cat['category_name']) . '</a>';
}
echo implode(', ', $cats);
}
$entry['link'] = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp']));
$entry['preview_link'] = '?serendipity[noBanner]=true&amp;serendipity[noSidebar]=true&amp;serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=preview&amp;serendipity[id]=' . $entry['id'];
?>
</td>
<td align="right">
<?php if (serendipity_db_bool($entry['isdraft']) || (!$serendipity['showFutureEntries'] && $entry['timestamp'] >= serendipity_serverOffsetHour())) { ?>
<a target="_blank" href="<?php echo $entry['preview_link']; ?>&amp;<?php echo serendipity_setFormToken('url'); ?>" title="<?php echo PREVIEW . ' #' . $entry['id']; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/zoom.png'); ?>" alt="<?php echo PREVIEW; ?>" /><?php echo PREVIEW ?></a>
<?php } else { ?>
<a target="_blank" href="<?php echo $entry['link']; ?>" title="<?php echo VIEW . ' #' . $entry['id']; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/zoom.png'); ?>" alt="<?php echo VIEW; ?>" /><?php echo VIEW ?></a>
<?php } ?>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=edit&amp;serendipity[id]=<?php echo $entry['id']; ?>" title="<?php echo EDIT . ' #' . $entry['id']; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/edit.png'); ?>" alt="<?php echo EDIT; ?>" /><?php echo EDIT ?></a>
<a href="?<?php echo serendipity_setFormToken('url'); ?>&amp;serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=delete&amp;serendipity[id]=<?php echo $entry['id']; ?>" title="<?php echo DELETE . ' #' . $entry['id']; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/delete.png'); ?>" alt="<?php echo DELETE; ?>" /><?php echo DELETE ?></a>
<input class="input_checkbox" type="checkbox" name="serendipity[multiDelete][]" value="<?php echo $entry['id']; ?>" />
</td>
</tr>
</table>
</div>
<?php
} // end entries output
$data['entries'] = $smartentries;
$data['urltoken'] = serendipity_setFormToken('url');
$data['formtoken'] = serendipity_setFormToken();
$data['serverOffsetHour'] = serendipity_serverOffsetHour();
$data['showFutureEntries'] = $serendipity['showFutureEntries'];
?>
<table class="serendipity_admin_list" cellpadding="5" width="100%">
<tr>
<td>
<?php if ($offSet > 0) { ?>
<a href="<?php echo $linkPrevious ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/previous.png') ?>" /><?php echo PREVIOUS ?></a>
<?php } ?>
</td>
<td align="right">
<?php if ($count > $perPage) { ?>
<a href="<?php echo $linkNext ?>" class="serendipityIconLinkRight"><?php echo NEXT ?><img src="<?php echo serendipity_getTemplateFile('admin/img/next.png') ?>" /></a>
<?php } ?>
</td>
</tr>
</table>
<table class="serendipity_admin_list" cellpadding="0" width="100%">
<tr>
<td align="right">
<input type="button" name="toggle" value="<?php echo INVERT_SELECTIONS ?>" onclick="invertSelection()" class="serendipityPrettyButton input_button" />
<input type="submit" name="toggle" value="<?php echo DELETE_SELECTED_ENTRIES ?>" class="serendipityPrettyButton input_button" />
</td>
</tr>
</table>
</form>
<div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo (($rows+1) % 2 ? 'even' : 'uneven'); ?>">
<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td>
<form action="?" method="get">
<input type="hidden" name="serendipity[action]" value="admin" />
<input type="hidden" name="serendipity[adminModule]" value="entries" />
<input type="hidden" name="serendipity[adminAction]" value="editSelect" />
<?php echo EDIT_ENTRY ?>: #<input class="input_textbox" type="text" size="3" name="serendipity[id]" /> <input type="submit" name="serendipity[editSubmit]" value="<?php echo GO ?>" class="serendipityPrettyButton input_button" />
</form>
</td>
</tr>
</table>
</div>
<?php
} else {
$data['no_entries'] = true;
} // if entries end
// We've got nothing
?>
<tr>
<td align="center" class="serendipityAdminMsgNote">
<img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_note.png'); ?>" alt="" />
<?php echo NO_ENTRIES_TO_PRINT ?>
</td>
</tr>
</table>
<?php
}
?>
</div>
<?php
} // End function serendipity_drawList()
if (!empty($serendipity['GET']['editSubmit'])) {
$serendipity['GET']['adminAction'] = 'edit'; // does this change smarty.get vars?
$serendipity['GET']['adminAction'] = 'edit';
}
$preview_only = false;
// very sticky smartification to origin, could be done better, I assume!
switch($serendipity['GET']['adminAction']) {
case 'preview':
$entry = serendipity_fetchEntry('id', $serendipity['GET']['id'], 1, 1);
@ -212,8 +399,7 @@ switch($serendipity['GET']['adminAction']) {
$entry['timestamp'] = strtotime($serendipity['POST']['new_timestamp']);
if ($entry['timestamp'] == -1) {
$data['switched_output'] = true;
$data['dateval'] = false;
echo DATE_INVALID . '<br />';
// The date given by the user is not convertable. Reset the timestamp.
$entry['timestamp'] = $serendipity['POST']['timestamp'];
}
@ -225,19 +411,18 @@ switch($serendipity['GET']['adminAction']) {
}
// Save the entry, or just display a preview
$data['use_legacy'] = $use_legacy = true;
$use_legacy = true;
serendipity_plugin_api::hook_event('backend_entry_iframe', $use_legacy);
if ($use_legacy) {
$data['switched_output'] = true;
if ($serendipity['POST']['preview'] != 'true') {
/* We don't need an iframe to save a draft */
if ( $serendipity['POST']['isdraft'] == 'true' ) {
$data['is_draft'] = true;
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . IFRAME_SAVE_DRAFT . '</div><br />';
serendipity_updertEntry($entry);
} else {
if ($serendipity['use_iframe']) {
$data['is_iframe'] = true;
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . IFRAME_SAVE . '</div><br />';
serendipity_iframe_create('save', $entry);
} else {
serendipity_iframe($entry, 'save');
@ -294,7 +479,7 @@ switch($serendipity['GET']['adminAction']) {
}
if ($serendipity['use_iframe']) {
$data['is_iframepreview'] = true;
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . IFRAME_PREVIEW . '</div><br />';
serendipity_iframe_create('preview', $entry);
} else {
serendipity_iframe($entry, 'preview');
@ -319,6 +504,7 @@ switch($serendipity['GET']['adminAction']) {
'serendipity[adminAction]' => 'save',
'serendipity[timestamp]' => $entry['timestamp']
),
$entry
);
}
@ -332,9 +518,8 @@ switch($serendipity['GET']['adminAction']) {
$entry = serendipity_fetchEntry('id', $serendipity['GET']['id'], 1, 1);
serendipity_deleteEntry((int)$serendipity['GET']['id']);
$data['switched_output'] = true;
$data['is_doDelete'] = true;
$data['del_entry'] = sprintf(RIP_ENTRY, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
printf(RIP_ENTRY, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
echo '<br />';
$cont_draw = true;
case 'doMultiDelete':
@ -344,21 +529,18 @@ switch($serendipity['GET']['adminAction']) {
}
$parts = explode(',', $serendipity['GET']['id']);
$data['switched_output'] = true;
$data['del_entry'] = array();
foreach($parts AS $id) {
$id = (int)$id;
if ($id > 0) {
$entry = serendipity_fetchEntry('id', $id, 1, 1);
serendipity_deleteEntry((int)$id);
$data['is_doMultiDelete'] = true;
$data['del_entry'][] = sprintf(RIP_ENTRY, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
printf(RIP_ENTRY, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
echo '<br />';
}
}
}
case 'editSelect':
$data['switched_output'] = false;
serendipity_drawList();
break;
@ -369,11 +551,16 @@ switch($serendipity['GET']['adminAction']) {
$newLoc = '?' . serendipity_setFormToken('url') . '&amp;serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=doDelete&amp;serendipity[id]=' . (int)$serendipity['GET']['id'];
$entry = serendipity_fetchEntry('id', $serendipity['GET']['id'], 1, 1);
$data['switched_output'] = true;
$data['is_delete'] = true;
$data['newLoc'] = $newLoc;
// for smartification printf had to turn into sprintf!!
$data['rip_entry'] = sprintf(DELETE_SURE, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
printf(DELETE_SURE, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
?>
<br />
<br />
<div>
<a href="<?php echo htmlspecialchars($_SERVER["HTTP_REFERER"]); ?>" class="serendipityPrettyButton input_button"><?php echo NOT_REALLY; ?></a>
<?php echo str_repeat('&nbsp;', 10); ?>
<a href="<?php echo $newLoc; ?>" class="serendipityPrettyButton input_button"><?php echo DUMP_IT; ?></a>
</div>
<?php
break;
case 'multidelete':
@ -382,16 +569,22 @@ switch($serendipity['GET']['adminAction']) {
}
$ids = '';
$data['rip_entry'] = array();
foreach($serendipity['POST']['multiDelete'] AS $idx => $id) {
$ids .= (int)$id . ',';
$entry = serendipity_fetchEntry('id', $id, 1, 1);
$data['is_multidelete'] = true;
$data['rip_entry'][] = sprintf(DELETE_SURE, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
printf(DELETE_SURE, $entry['id'] . ' - ' . htmlspecialchars($entry['title']));
echo '<br />';
}
$newLoc = '?' . serendipity_setFormToken('url') . '&amp;serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=doMultiDelete&amp;serendipity[id]=' . $ids;
$data['switched_output'] = true;
$data['newLoc'] = $newLoc;
?>
<br />
<br />
<div>
<a href="<?php echo htmlspecialchars($_SERVER["HTTP_REFERER"]); ?>" class="serendipityPrettyButton input_button "><?php echo NOT_REALLY; ?></a>
<?php echo str_repeat('&nbsp;', 10); ?>
<a href="<?php echo $newLoc; ?>" class="serendipityPrettyButton input_button"><?php echo DUMP_IT; ?></a>
</div>
<?php
break;
case 'edit':
@ -399,7 +592,7 @@ switch($serendipity['GET']['adminAction']) {
default:
include_once S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
// edit entry mode
serendipity_printEntryForm(
'?',
array(
@ -410,20 +603,5 @@ switch($serendipity['GET']['adminAction']) {
(isset($entry) ? $entry : array())
);
}
$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
if(!isset($data['urltoken'])) $data['urltoken'] = serendipity_setFormToken('url');
if(!isset($data['formtoken'])) $data['formtoken'] = serendipity_setFormToken();
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/entries.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -1,15 +1,12 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
if (IN_serendipity !== true) {
die ('Don\'t hack!');
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
echo WELCOME_BACK . ' ' . htmlspecialchars($_SESSION['serendipityUser']);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/entries_overview.inc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -1,15 +1,15 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
if (IN_serendipity !== true) {
die ("Don't hack!");
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/export.inc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
?>
<div>
<a href="<?php echo $serendipity['baseURL'] ?>rss.php?version=2.0&all=1" class="serendipityPrettyButton input_button"><?php echo EXPORT_FEED; ?></a>
</div>
<?php
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -1,4 +1,6 @@
<?php # $Id:$
<?php # $Id: users.inc.php 114 2005-05-22 15:37:11Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
if (IN_serendipity !== true) {
die ('Don\'t hack!');
@ -8,14 +10,11 @@ if (!serendipity_checkPermission('adminUsersGroups')) {
return;
}
$data = array();
/* Delete a group */
if (isset($_POST['DELETE_YES']) && serendipity_checkFormToken()) {
$group = serendipity_fetchGroup($serendipity['POST']['group']);
serendipity_deleteGroup($serendipity['POST']['group']);
$data['delete_yes'] = true;
$data['group_id'] = $serendipity['POST']['group'];
$data['group'] = $group;
printf('<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . DELETED_GROUP . '</div>', htmlspecialchars($serendipity['POST']['group']), htmlspecialchars($group['name']));
}
/* Save new group */
@ -23,9 +22,7 @@ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) {
$serendipity['POST']['group'] = serendipity_addGroup($serendipity['POST']['name']);
$perms = serendipity_getAllPermissionNames();
serendipity_updateGroupConfig($serendipity['POST']['group'], $perms, $serendipity['POST'], false, $serendipity['POST']['forbidden_plugins'], $serendipity['POST']['forbidden_hooks']);
$data['save_new'] = true;
$data['group_id'] = $serendipity['POST']['group'];
$data['group'] = $group;
printf('<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . CREATED_GROUP . '</div>', '#' . htmlspecialchars($serendipity['POST']['group']) . ', ' . htmlspecialchars($serendipity['POST']['name']));
}
@ -33,103 +30,233 @@ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) {
if (isset($_POST['SAVE_EDIT']) && serendipity_checkFormToken()) {
$perms = serendipity_getAllPermissionNames();
serendipity_updateGroupConfig($serendipity['POST']['group'], $perms, $serendipity['POST'], false, $serendipity['POST']['forbidden_plugins'], $serendipity['POST']['forbidden_hooks']);
$data['save_edit'] = true;
$data['name'] = $serendipity['POST']['name'];
printf('<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . MODIFIED_GROUP . '</div>', htmlspecialchars($serendipity['POST']['name']));
}
if ( $serendipity['GET']['adminAction'] != 'delete' ) {
$data['delete'] = false;
?>
<table width="100%">
<tr>
<td><strong><?php echo GROUP; ?></strong></td>
<td width="200">&nbsp;</td>
</tr>
<tr>
<td colspan="3">
<?php
if (serendipity_checkPermission('adminUsersMaintainOthers')) {
$groups = serendipity_getAllGroups();
} elseif (serendipity_checkPermission('adminUsersMaintainSame')) {
$groups = serendipity_getAllGroups($serendipity['authorid']);
} else {
$groups = array();
}
$i = 0;
foreach($groups as $group) {
?>
<div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo ($i++ % 2) ? 'even' : 'uneven' ?>">
<table width="100%">
<tr>
<td><?php echo htmlspecialchars($group['name']); ?></td>
<td width="200" align="right"> <a href="?serendipity[adminModule]=groups&amp;serendipity[adminAction]=edit&amp;serendipity[group]=<?php echo $group['id'] ?>" title="<?php echo EDIT . " " . htmlspecialchars($group['name']); ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/edit.png'); ?>" alt="<?php echo EDIT . " " . htmlspecialchars($group['name']); ?>" /><?php echo EDIT ?></a>
<a href="?<?php echo serendipity_setFormToken('url'); ?>&amp;serendipity[adminModule]=groups&amp;serendipity[adminAction]=delete&amp;serendipity[group]=<?php echo $group['id'] ?>" title="<?php echo DELETE . " " . htmlspecialchars($group['name']); ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/delete.png'); ?>" alt="<?php echo DELETE . " " . htmlspecialchars($group['name']); ?>" /><?php echo DELETE ?></a></td>
</tr>
</table>
</div>
<?php
}
?>
</td>
</tr>
<?php if ( !isset($_POST['NEW']) ) { ?>
<tr>
<td colspan="3" align="right">
<form action="?serendipity[adminModule]=groups" method="post">
<input type="submit" name="NEW" value="<?php echo CREATE_NEW_GROUP; ?>" class="serendipityPrettyButton input_button" />
</form>
</td>
</tr>
<?php } ?>
</table>
if (serendipity_checkPermission('adminUsersMaintainOthers')) {
$groups = serendipity_getAllGroups();
} elseif (serendipity_checkPermission('adminUsersMaintainSame')) {
$groups = serendipity_getAllGroups($serendipity['authorid']);
} else {
$groups = array();
}
$data['groups'] = $groups;
if ( !isset($_POST['NEW']) ) {
$data['start'] = true;
}
$data['deleteFormToken'] = serendipity_setFormToken('url');
<?php
}
if ($serendipity['GET']['adminAction'] == 'edit' || isset($_POST['NEW'])) {
if (isset($_POST['NEW'])) {
$data['new'] = true;
} else {
$data['edit'] = true;
}
$data['formToken'] = serendipity_setFormToken();
if ($serendipity['GET']['adminAction'] == 'edit') {
$group = serendipity_fetchGroup($serendipity['GET']['group']);
$from = &$group;
} else {
$from = array();
}
$data['from'] = $from;
?>
<br />
<br />
<hr noshade="noshade">
<form action="?serendipity[adminModule]=groups" method="post">
<?php echo serendipity_setFormToken(); ?>
<div>
<h3>
<?php
if ($serendipity['GET']['adminAction'] == 'edit') {
$group = serendipity_fetchGroup($serendipity['GET']['group']);
echo EDIT;
$from = &$group;
echo '<input type="hidden" name="serendipity[group]" value="' . $from['id'] . '" />';
} else {
echo CREATE;
$from = array();
}
?>
</h3>
<table>
<tr>
<td><?php echo NAME; ?></td>
<td><input class="input_textbox" type="text" name="serendipity[name]" value="<?php echo htmlspecialchars($from['name']); ?>" /></td>
</tr>
<tr>
<td valign="top"><?php echo USERCONF_GROUPS; ?></td>
<td><select name="serendipity[members][]" multiple="multiple" size="5">
<?php
$allusers = serendipity_fetchUsers();
$users = serendipity_getGroupUsers($from['id']);
$allusers = serendipity_fetchUsers();
$users = serendipity_getGroupUsers($from['id']);
$selected = array();
foreach((array)$users AS $user) {
$selected[$user['id']] = true;
}
$data['selected'] = $selected;
$data['allusers'] = $allusers;
$selected = array();
foreach((array)$users AS $user) {
$selected[$user['id']] = true;
}
foreach($allusers AS $user) {
echo '<option value="' . (int)$user['authorid'] . '" ' . (isset($selected[$user['authorid']]) ? 'selected="selected"' : '') . '>' . htmlspecialchars($user['realname']) . '</option>' . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<?php
$perms = serendipity_getAllPermissionNames();
ksort($perms);
$data['perms'] = $perms;
foreach($perms AS $perm => $userlevels) {
if (defined('PERMISSION_' . strtoupper($perm))) {
$data['perms'][$perm]['permission_name'] = constant('PERMISSION_' . strtoupper($perm));
} else {
$data['perms'][$perm]['permission_name'] = $perm;
if (substr($perm, 0, 2) == 'f_') {
continue;
}
if (!serendipity_checkPermission($perm) && $perm != 'hiddenGroup') {
$data['perms'][$perm]['permission'] = false;
if (isset($from[$perm]) && $from[$perm] === 'true') {
$selected = 'checked="checked"';
} else {
$data['perms'][$perm]['permission'] = true;
$selected = '';
}
if (!isset($section)) {
$section = $perm;
}
if ($section != $perm && substr($perm, 0, strlen($section)) == $section) {
$indent = '&nbsp;&nbsp;';
$indentB = '';
} elseif ($section != $perm) {
$indent = '<br />';
$indentB = '<br />';
$section = $perm;
}
if (defined('PERMISSION_' . strtoupper($perm))) {
$permname = constant('PERMISSION_' . strtoupper($perm));
} else {
$permname = $perm;
}
if (!serendipity_checkPermission($perm) && $perm != 'hiddenGroup') {
echo "<tr>\n";
echo "<td>$indent" . htmlspecialchars($permname) . "</td>\n";
echo '<td>' . $indentB . ' ' . (!empty($selected) ? YES : NO) . '</td>' . "\n";
echo "</tr>\n";
} else {
echo "<tr>\n";
echo "<td>$indent<label for=\"" . htmlspecialchars($perm) . "\">" . htmlspecialchars($permname) . "</label></td>\n";
echo '<td>' . $indentB . '<input class="input_checkbox" id="' . htmlspecialchars($perm) . '" type="checkbox" name="serendipity[' . htmlspecialchars($perm) . ']" value="true" ' . $selected . ' /></td>' . "\n";
echo "</tr>\n";
}
}
if ($serendipity['enablePluginACL']) {
$data['enablePluginACL'] = true;
$allplugins =& serendipity_plugin_api::get_event_plugins();
$allhooks = array();
$data['allplugins'] = $allplugins;
foreach($allplugins AS $plugid => $currentplugin) {
foreach($currentplugin['b']->properties['event_hooks'] AS $hook => $set) {
$allhooks[$hook] = true;
}
$data['allplugins'][$plugid]['has_permission'] = serendipity_hasPluginPermissions($plugid, $from['id']);
}
ksort($allhooks);
$data['allhooks'] = $allhooks;
foreach($allhooks AS $hook => $set) {
$data['allhooks'][$hook]['has_permission'] = serendipity_hasPluginPermissions($hook, $from['id']);
}
?>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td valign="top"><?php echo PERMISSION_FORBIDDEN_PLUGINS; ?></td>
<td>
<select name="serendipity[forbidden_plugins][]" multiple="multiple" size="5">
<?php
foreach($allplugins AS $plugid => $currentplugin) {
foreach($currentplugin['b']->properties['event_hooks'] AS $hook => $set) {
$allhooks[$hook] = true;
}
echo '<option value="' . urlencode($plugid) . '" ' . (serendipity_hasPluginPermissions($plugid, $from['id']) ? '' : 'selected="selected"') . '>' . htmlspecialchars($currentplugin['b']->properties['name']) . '</option>' . "\n";
}
ksort($allhooks);
?>
</select>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td valign="top"><?php echo PERMISSION_FORBIDDEN_HOOKS; ?></td>
<td>
<select name="serendipity[forbidden_hooks][]" multiple="multiple" size="5">
<?php
foreach($allhooks AS $hook => $set) {
echo '<option value="' . urlencode($hook) . '" ' . (serendipity_hasPluginPermissions($hook, $from['id']) ? '' : 'selected="selected"') . '>' . htmlspecialchars($hook) . '</option>' . "\n";
}
?>
</select>
</td>
</tr>
<?php
} else {
?>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><?php echo PERMISSION_FORBIDDEN_ENABLE_DESC; ?></td>
</tr>
<?php
}
?>
</table>
<?php
if ($serendipity['GET']['adminAction'] == 'edit') { ?>
<input type="submit" name="SAVE_EDIT" value="<?php echo SAVE; ?>" class="serendipityPrettyButton input_button" />
<?php echo ' - ' . WORD_OR . ' - ' ?>
<input type="submit" name="SAVE_NEW" value="<?php echo CREATE_NEW_GROUP; ?>" class="serendipityPrettyButton input_button" />
<?php } else { ?>
<input type="submit" name="SAVE_NEW" value="<?php echo CREATE_NEW_GROUP; ?>" class="serendipityPrettyButton input_button" />
<?php } ?>
</div>
</form>
<?php
} elseif ($serendipity['GET']['adminAction'] == 'delete') {
$data['delete'] = true;
$group = serendipity_fetchGroup($serendipity['GET']['group']);
$data['group_id'] = $serendipity['GET']['group'];
$data['group'] = $group;
$data['formToken'] = serendipity_setFormToken();
?>
<form action="?serendipity[adminModule]=groups" method="post">
<div>
<?php printf(DELETE_GROUP, (int)$serendipity['GET']['group'], htmlspecialchars($group['name'])); ?>
<br /><br />
<?php echo serendipity_setFormToken(); ?>
<input type="hidden" name="serendipity[group]" value="<?php echo htmlspecialchars($serendipity['GET']['group']); ?>" />
<input type="submit" name="DELETE_YES" value="<?php echo DUMP_IT; ?>" class="serendipityPrettyButton input_button" />
<input type="submit" name="NO" value="<?php echo NOT_REALLY; ?>" class="serendipityPrettyButton input_button" />
</div>
</form>
<?php
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/groups.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
/* vim: set sts=4 ts=4 expandtab : */
?>

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!");
}
$data = array();
if (!serendipity_checkPermission('adminImport')) {
return;
}
@ -198,41 +196,62 @@ class Serendipity_Import {
}
}
if (isset($serendipity['GET']['importFrom']) && serendipity_checkFormToken()) {
$data['importForm'] = true;
/* Include the importer */
$class = @require_once(S9Y_INCLUDE_PATH . 'include/admin/importers/'. basename($serendipity['GET']['importFrom']) .'.inc.php');
if ( !class_exists($class) ) {
$data['die'] = true;
} else {
/* Init the importer with form data */
$importer = new $class($serendipity['POST']['import']);
/* Yes sir, we are importing if we have valid data */
if ( $importer->validateData() ) {
$data['validateData'] = true;
/* import() MUST return (bool)true, otherwise we assume it failed */
if ( ($result = $importer->import()) !== true ) {
$data['result'] = $result;
}
/* Apprently we do not have valid data, ask for some */
} else {
$data['formToken'] = serendipity_setFormToken();
$fields = $importer->getInputFields();
foreach ($fields as &$field ) {
ob_start();
serendipity_guessInput($field['type'], 'serendipity[import]['. $field['name'] .']', (isset($serendipity['POST']['import'][$field['name']]) ? $serendipity['POST']['import'][$field['name']] : $field['default']), $field['default']);
$field['guessedInput'] = ob_get_contents();
ob_end_clean();
}
$data['fields'] = $fields;
$data['notes'] = $importer->getImportNotes();
}
die('FAILURE: Unable to require import module, possible syntax error?');
}
/* Init the importer with form data */
$importer = new $class($serendipity['POST']['import']);
/* Yes sir, we are importing if we have valid data */
if ( $importer->validateData() ) {
echo IMPORT_STARTING . '<br />';
/* import() MUST return (bool)true, otherwise we assume it failed */
if ( ($result = $importer->import()) !== true ) {
echo IMPORT_FAILED .': '. $result . '<br />';
} else {
echo IMPORT_DONE . '<br />';
}
/* Apprently we do not have valid data, ask for some */
} else {
?>
<?php echo IMPORT_PLEASE_ENTER ?>:<br />
<br />
<form action="" method="POST" enctype="multipart/form-data">
<?php echo serendipity_setFormToken(); ?>
<table cellpadding="3" cellspacing="2">
<?php foreach ( $importer->getInputFields() as $field ) { ?>
<tr>
<td><?php echo $field['text'] ?></td>
<td><?php serendipity_guessInput($field['type'], 'serendipity[import]['. $field['name'] .']', (isset($serendipity['POST']['import'][$field['name']]) ? $serendipity['POST']['import'][$field['name']] : $field['default']), $field['default']) ?></td>
</tr>
<?php } ?>
<?php if ($notes = $importer->getImportNotes()){ ?>
<tr>
<td colspan="2">
<b><?php echo IMPORT_NOTES; ?></b><br />
<?php echo $notes ?>
</td>
</tr>
<?php } ?>
<tr>
<td colspan="2" align="right"><input type="submit" value="<?php echo IMPORT_NOW ?>" class="serendipityPrettyButton input_button"></td>
</tr>
</table>
</form>
<?php
}
} else {
$importpath = S9Y_INCLUDE_PATH . 'include/admin/importers/';
$dir = opendir($importpath);
$list = array();
@ -250,19 +269,24 @@ if (isset($serendipity['GET']['importFrom']) && serendipity_checkFormToken()) {
}
closedir($dir);
ksort($list);
$data['formToken'] = serendipity_setFormToken();
$data['list'] = $list;
?>
<?php echo IMPORT_WELCOME ?>.<br />
<?php echo IMPORT_WHAT_CAN ?>. <br />
<br />
<?php echo IMPORT_SELECT ?>:<br />
<br />
<form action="" method="GET">
<input type="hidden" name="serendipity[adminModule]" value="import">
<?php echo serendipity_setFormToken(); ?>
<strong><?php echo IMPORT_WEBLOG_APP ?>: </strong>
<select name="serendipity[importFrom]">
<?php foreach ($list as $v=>$k) { ?>
<option value="<?php echo $v ?>"><?php echo $k ?></option>
<?php } ?>
</select>
<input type="submit" value="<?php echo GO ?>" class="serendipityPrettyButton input_button">
</form>
<?php
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/import.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -39,9 +39,9 @@ class Serendipity_Import_Blogger extends Serendipity_Import {
function getImportNotes(){
if (empty($_REQUEST['token'])) {
$msg = 'In order to import your blog on Blogger, Serendipity needs to be able to access it via Google\'s Blogger Data APIs.';
$msg .= 'Login to your Google/Blogger account and then click the link below.';
$msg .= '<a class="block_level standalone" href="https://www.google.com/accounts/AuthSubRequest?scope=http%3A%2F%2Fwww.blogger.com%2Ffeeds%2F&session=1&secure=0&next='. urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']) .'">Go to Google to grant access</a>';
$msg = 'In order to import your blog on Blogger, Serendipity needs to be able to access it via Google\'s Blogger Data APIs.<br />';
$msg .= 'Login to your Google/Blogger account and then click the link below.<br /><br />';
$msg .= '<a href="https://www.google.com/accounts/AuthSubRequest?scope=http%3A%2F%2Fwww.blogger.com%2Ffeeds%2F&session=1&secure=0&next='. urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']) .'">Go to Google to grant access</a><br />';
return $msg;
} else {
return '';
@ -154,7 +154,7 @@ class Serendipity_Import_Blogger extends Serendipity_Import {
}
// Export success
echo '<span class="block_level">Successfully exported entries from Blogger</span>';
echo 'Successfully exported entries from Blogger<br />';
// Get Serendipity authors list
$authorList = array();
@ -247,32 +247,29 @@ class Serendipity_Import_Blogger extends Serendipity_Import {
}
// Report on resultant authors
echo '<span class="block_level">Current list of authors: </span>'. join(', ', array_values($authorList));
echo '<br />Current list of authors: <br />'. join(', ', array_values($authorList)) .'<br /><br />';
// Do cleanup and report on entries
echo '<span class="block_level">The following entries were successfully imported:</span>';
echo '<ul>';
echo 'The following entries were successfully imported:<br />';
foreach ($entryList as $eId => $eDetails) {
// Update comment count for entry in s9y
serendipity_db_query("UPDATE ". $serendipity['dbPrefix'] ."entries SET comments = ". $eDetails[2] ." WHERE id = ". $eDetails[0]);
echo '<li>'. $eDetails[1] .' comments('. $eDetails[2] .')</li>';
echo '- '. $eDetails[1] .' comments('. $eDetails[2] .')<br />';
}
echo '</ul>';
echo '<br />';
// Report fails
echo '<span class="block_level">The following entries ran into trouble and was not imported:</span>';
echo '<ul>';
echo 'The following entries ran into trouble and was not imported:<br />';
foreach ($entryFailList as $eId => $eDetails) {
echo '<li>'. $eDetails .'</li>';
echo '- '. $eDetails .'<br />';
}
echo '</ul>';
// Reset autodiscovery
$serendipity['noautodiscovery'] = $noautodiscovery;
// All done!
echo '<span class="msg_notice">Import finished.</span>';
echo "Import finished.<br />";
return true;
}
@ -280,4 +277,4 @@ class Serendipity_Import_Blogger extends Serendipity_Import {
return 'Serendipity_Import_Blogger';
?>
?>

View File

@ -143,18 +143,18 @@ class Serendipity_Import_Generic extends Serendipity_Import {
if (PEAR::isError($res) || $req->getResponseCode() != '200') {
serendipity_request_end();
echo '<span class="block_level">' . IMPORT_FAILED . ': ' . htmlspecialchars($this->data['url']) . '</span>';
echo IMPORT_FAILED . ': ' . htmlspecialchars($this->data['url']);
echo "<br />\n";
return false;
}
$fContent = $req->getResponseBody();
serendipity_request_end();
echo '<span class="block_level">' . strlen($fContent) . " Bytes</span>";
echo strlen($fContent) . " Bytes<br />\n";
if (version_compare(PHP_VERSION, '5.0') === -1) {
echo '<span class="block_level">';
printf(UNMET_REQUIREMENTS, 'PHP >= 5.0');
echo "</span>";
echo "<br />\n";
return false;
}
@ -194,9 +194,9 @@ class Serendipity_Import_Generic extends Serendipity_Import {
'parentid' => 0,
'category_left' => 0,
'category_right' => 0);
echo '<span class="block_level">';
printf(CREATE_CATEGORY, htmlspecialchars($cat_name));
echo "</span>";
echo "<br />\n";
if ($dry_run) {
$s9y_cat[$cat_name] = time();
} else {
@ -235,7 +235,7 @@ class Serendipity_Import_Generic extends Serendipity_Import {
foreach($item->category AS $idx => $category) {
$cstring=(string)$category;
if (!isset($s9y_cat[$cstring])) {
echo "<span class='msg_error'>WARNING: $category unset!</span>";
echo "WARNING: $category unset!<br />\n";
} else {
$entry['categories'][] = $s9y_cat[$cstring];
}
@ -252,9 +252,8 @@ class Serendipity_Import_Generic extends Serendipity_Import {
} else {
$s9y_users[$wp_user]['authorid'] = serendipity_addAuthor($wp_user, md5(time()), $wp_user, '', USERLEVEL_EDITOR);
}
echo '<span class="block_level">';
printf(CREATE_AUTHOR, htmlspecialchars($wp_user));
echo "</span>";
echo "<br />\n";
}
$entry['authorid'] = $s9y_users[$wp_user]['authorid'];
@ -309,7 +308,7 @@ class Serendipity_Import_Generic extends Serendipity_Import {
$s9y_cid[$c_id] = $cid;
}
echo "<span class='msg_notice'>Entry '" . htmlspecialchars($entry['title']) . "' ($c_i comments) imported.</span>";
echo "Entry '" . htmlspecialchars($entry['title']) . "' ($c_i comments) imported.<br />\n";
}
return true;
}

View File

@ -253,7 +253,7 @@ class Serendipity_Import_LiveJournalXML extends Serendipity_Import {
}
}
$id = serendipity_updertEntry($new_entry);
echo '<span class="msg_notice">Inserted entry #' . $id . ', "' . htmlspecialchars($new_entry['title']) . '"</span>';
echo 'Inserted entry #' . $id . ', "' . htmlspecialchars($new_entry['title']) . '"<br />' . "\n";
if (is_array($new_entry['comments'])) {
$cid_map = array();
$jids = array();
@ -265,7 +265,7 @@ class Serendipity_Import_LiveJournalXML extends Serendipity_Import {
$cid = serendipity_insertComment($id, $comment);
$cid_map[$comment['jtalkid']] = $cid;
}
echo '<span class="msg_notice">Inserted comments for entry #' . $id . '</span>';
echo 'Inserted comments for entry #' . $id . '<br />' . "\n";
}
if (function_exists('ob_flush')) {

View File

@ -67,7 +67,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
if ($debug) {
$c++;
echo '<span class="block_level">#' . $c . ' [' . date('d.m.Y H:i.s') . '] ' . $string . "</span>";
echo '#' . $c . ' [' . date('d.m.Y H:i.s') . '] ' . $string . "<br />\n";
}
}
@ -139,7 +139,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
$au_inf = serendipity_fetchAuthor($data);
if ( !is_array($au_inf) ) {
$tasks[] = sprintf(CREATE_AUTHOR, htmlspecialchars($data));
$tasks[] = '<ul class="plainList"><li>Input array is: ' . print_r($data, true) . '</li><<li>Return is: ' . print_r($au_inf, true) . '</li></ul>';
$tasks[] = 'Input array is: ' . print_r($data, true) . '<br />Return is: ' . print_r($au_inf, true) . '<br />';
$au_inf = serendipity_fetchAuthor($serendipity['authorid']);
}
$authors[$data] = $au_inf[0];
@ -183,9 +183,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
$cat_found = false;
if (is_array($this->categories)) {
for ( $y=0 ; $y<sizeof($this->categories) ; $y++ ) {
echo '<span class="block_level">';
echo '"' . $this->categories[$y]['category_name'] . '" == "' . $data;
echo '</span>';
echo '"' . $this->categories[$y]['category_name'] . '" == "' . $data . '"<br />';
if ( $this->categories[$y]['category_name'] == $data ) {
$cat_found = true;
break;
@ -427,7 +425,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
if ( !sizeof($tasks) || $force == true ) {
serendipity_db_begin_transaction();
foreach ($entries as $entry) {
#echo '<pre>' . printR_($entry, true) . '</pre>';
#echo '<pre>' . printR_($entry, true) . '</pre><br />';
#continue;
if (empty($entry['authorid'])) {
$entry['authorid'] = $serendipity['authorid'];
@ -448,7 +446,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
unset($entry['s9y_comments']);
if ( !is_int($r = serendipity_updertEntry($entry)) ) {
echo '<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . $r . '</div>';
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . $r . '</div>';
} else {
$this->debug('Saved entry ' . $r . ' (' . $entry['title'] . ')');
$entry['id'] = $r;
@ -458,7 +456,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
$cid = serendipity_db_insert_id('comments', 'id');
serendipity_approveComment($cid, $entry['id'], true);
} else {
echo '<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . $rc . '</div>';
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . $rc . '</div>';
}
}
// Let the plugins do some additional stuff. Here it's used with
@ -474,4 +472,4 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
}
}
return 'Serendipity_Import_MovableType';
?>
?>

View File

@ -59,7 +59,7 @@ class Serendipity_Import_OldBlogger extends Serendipity_Import {
<p class="style1">BLOGGER.COM to SERENDIPITY IMPORT</p>
<p class="style2">Version 0.1,( 29/10/2005 )</p>
<p class="style2">
<p class="style2"> <br />
1. First go to Blogger.com, login.</p>
<p class="style2">2. Go to the templates section. Set the following as your template. You should backup the current template if you want to reset it back after this operation. Click &quot;Save template changes&quot; button to save this new template.</p>
<p class="style2">
@ -97,8 +97,10 @@ ENDPOST
<p class="style2">9. Now in the box below type in the path to the &quot;index.html&quot; file blogger created under your &quot;blogger&quot; directory. File path should then look something like &quot;/httpdocs/blogger/index.html&quot;.</p>
<p class="style2">10. This script will create the users as from the blogger blog being imported. However if a user already exists, then that user will be used instead of creating a new user with similar name. For the new users that this script will create, you need to provide a default password. Type it in the box below.</p>
<p class="style2">11. Click &quot;Submit&quot;. Your posts and comments should be imported to serendipity!</p>
<p class="style2"> If you have questions or problems, feel free to drop me a mail at jaa at technova dot com dot mv.</p>
<p class="style2">Jaa, http://jaa.technova.com.mv</p>';
<p class="style2"> If you have questions or problems, feel free to drop me a mail at jaa at technova dot com dot mv.<br />
<br />
Jaa<br />
http://jaa.technova.com.mv</p>';
return $out;
}
@ -125,45 +127,45 @@ ENDPOST
# locate the post title
if (preg_match("/TITLE:(.*)/", $post, $title)) {
$title = trim($title[1]);
echo "<b class='block_level'>" . htmlspecialchars($title) . "</b>";
echo "<b>" . htmlspecialchars($title) . "</b><br />";
} else {
$title = "";
echo "<b class='block_level'>Empty title</b>";
echo "<b>Empty title</b><br />";
}
# locate the post author
if (preg_match("/AUTHOR:(.*)/", $post, $author)) {
$author = trim($author[1]);
echo "<em class='block_level'>" . htmlspecialchars($author[1]) . "</em>";
echo "<em>" . htmlspecialchars($author[1]) . "</em><br />";
} else {
$author = "";
echo "<em class='block_level'>Unknown author</em>";
echo "<em>Unknown author</em><br />";
}
# locate the post date
if (preg_match("/DATE:(.*)/", $post, $date)) {
$date = strtotime(trim($date[1]));
echo "<span class='block_level'>Posted on " . htmlspecialchars($date[1]) . ".</span>";
echo "Posted on " . htmlspecialchars($date[1]) . ".<br />";
} else {
$date = time();
echo "<span class='block_level'>Unknown posting time.</span>";
echo "Unknown posting time.<br />";
}
# locate the post body
if (preg_match("/BODY:(.*)-----/sU", $post, $body)) {
$body = trim($body[1]);
echo '<span class="block_level">' . strlen($body) . " Bytes of text.</span>";
echo strlen($body) . " Bytes of text.<br />";
} else {
$body = "";
echo "<span class='msg_error'>Empty Body!</span>";
echo "<strong>Empty Body!</strong><br />";
}
# find all comments for the post using pattern matching
if (preg_match_all( "/COMMENT:(.*)----/sU", $post, $commentlist)) {
echo '<span class="block_level">' . count($commentlist[1]) . " comments found.</span>";
echo count($commentlist[1]) . " comments found.<br />";
} else {
$commentlist = array();
echo "<span class='block_level'>No comments found.</span>";
echo "No comments found.<br />";
}
$result = serendipity_db_query("SELECT authorid FROM ". $serendipity['dbPrefix'] ."authors WHERE username = '". serendipity_db_escape_string($author) ."' LIMIT 1", true, 'assoc');
@ -190,12 +192,12 @@ ENDPOST
'authorid' => $authorid
);
echo "<span class='block_level'>Entry insert...</span>";
echo "Entry insert...<br />";
if (!is_int($id = serendipity_updertEntry($entry))) {
echo "<span class='msg_error'>Inserting entry failed.</span>";
echo "Inserting entry failed.<br />";
return $id;
} else {
echo "<span class='msg_notice'>Entry $id inserted.</span>";
echo "Entry $id inserted.<br />";
}
# iterate through all comments
@ -240,10 +242,10 @@ ENDPOST
}
serendipity_db_query("UPDATE ". $serendipity['dbPrefix'] ."entries SET comments = ". $c ." WHERE id = ". $id);
echo "<span class='block_level'>Comment count set to: ". $c ."</span>";
echo "Comment count set to: ". $c ."<br />";
}
echo "<span class='msg_success'>Import finished.</span>";
echo "Import finished.<br />";
return true;
}
@ -252,4 +254,4 @@ ENDPOST
return 'Serendipity_Import_OldBlogger';
/* vim: set sts=4 ts=4 expandtab : */
?>
?>

View File

@ -74,7 +74,7 @@ class Serendipity_Import_Pivot extends Serendipity_Import {
$this->data['pivot_path'] = $check_dir;
}
printf('<span class="block_level">' . CHECKING_DIRECTORY . ': ', $this->data['pivot_path']) . '</span>';
printf('<br />' . CHECKING_DIRECTORY . '<br /><br />', $this->data['pivot_path']);
if ($root = opendir($this->data['pivot_path'])) {
// Fetch category data:
$s9y_categories = serendipity_fetchCategories('all');
@ -83,7 +83,6 @@ class Serendipity_Import_Pivot extends Serendipity_Import {
'categories' => array()
);
echo '<ul>';
foreach($categories AS $pivot_category_id => $category) {
$found = false;
$pivot_category = trim(stripslashes($category[0]));
@ -95,10 +94,10 @@ class Serendipity_Import_Pivot extends Serendipity_Import {
}
if ($found) {
echo '<li>Pivot Category "' . htmlspecialchars($pivot_category) . '" mapped to Serendipity ID ' . $found . '</li>';
echo '&middot; Pivot Category "' . htmlspecialchars($pivot_category) . '" mapped to Serendipity ID ' . $found . '<br />';
$pivot_to_s9y['categories'][$pivot_category] = $found;
} else {
echo '<li>Created Pivot Category "' . htmlspecialchars($pivot_category) . '".</li>';
echo '&middot; Created Pivot Category "' . htmlspecialchars($pivot_category) . '".<br />';
$cat = array('category_name' => $pivot_category,
'category_description' => '',
'parentid' => 0,
@ -115,11 +114,11 @@ class Serendipity_Import_Pivot extends Serendipity_Import {
while (false !== ($dir = readdir($root))) {
if ($dir[0] == '.') continue;
if (substr($dir, 0, 8) == 'standard') {
printf('<li>' . CHECKING_DIRECTORY . '...</li>', $dir);
printf('&nbsp;&nbsp;&middot; ' . CHECKING_DIRECTORY . '...<br />', $dir);
$data = $this->unserialize($this->data['pivot_path'] . '/' . $dir . '/index-' . $dir . '.php');
if (empty($data) || !is_array($data) || count($data) < 1) {
echo '<li><span class="msg_error">FATAL: File <em>' . $dir . '/index-' . $dir . '.php</em> has no data!</span></li>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;&middot; <strong style="color: red">FATAL: File <em>' . $dir . '/index-' . $dir . '.php</em> has no data!</strong><br />';
flush();
ob_flush();
continue;
@ -129,14 +128,14 @@ class Serendipity_Import_Pivot extends Serendipity_Import {
$entryid = str_pad($entry['code'], 5, '0', STR_PAD_LEFT);
if ($i >= $max_import) {
echo '<li>Skipping entry data for #' . $entryid . '</li>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;&middot; Skipping entry data for #' . $entryid . '<br />';
continue;
}
echo '<li>Fetching entry data for #' . $entryid . '</li>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;&middot; Fetching entry data for #' . $entryid . '<br />';
$entrydata = $this->unserialize($this->data['pivot_path'] . '/' . $dir . '/' . $entryid . '.php');
if (empty($entrydata) || !is_array($entrydata) || count($entrydata) < 1) {
echo '<li><span class="msg_error">FATAL: File <em>' . $dir . '/' . $entryid . '.php</em> has no data!</span></li>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;&middot; <strong style="color: red">FATAL: File <em>' . $dir . '/' . $entryid . '.php</em> has no data!</strong><br />';
flush();
ob_flush();
continue;
@ -183,13 +182,12 @@ class Serendipity_Import_Pivot extends Serendipity_Import {
serendipity_db_insert('comments', $comment);
}
}
echo '<li><span class="msg_success">Entry #' . $entryid . ' imported</span></li>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;&middot; <strong style="color: green">Entry #' . $entryid . ' imported</strong><br />';
flush();
ob_flush();
}
}
}
echo '</ul>';
} else {
return sprintf(ERROR_NO_DIRECTORY, $this->data['pivot_path']);
}

View File

@ -17,11 +17,12 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
function getImportNotes() {
// TODO: I18n!
return '<p>This importer is still work in progress. It can currently import most things of the database. HOWEVER it can NOT import previously installed plugins (including their configuration) or any database tables of installed plugins. Those must be migrated manually. Also, you must use FTP to transfer your uploaded images to the new location.</p>
<p>Please do a test-run first if you are SQL-savvy. If you encounter any errors, save the message output you get - it will definitely help debugging!</p>
<p>This is <strong>NOT</strong> an importer meant for upgrading Serendipity. This importer assumes that both Serendipity installations use the same version.</p>
<p>It is strongly advised that you test this importer in an isolated environment first, do not use it on a production blog unless you made sure it works in a cloned installation. Always make a backup of both the source and the target blog.<p/>
<p>After these precautions: The importer code generally works very well for me and my purposes. Your mileage may vary.</p>';
return 'This importer is still work in progress. It can currently import most things of the database. HOWEVER it can NOT import previously installed plugins (including their configuration) or any database tables of installed plugins. Those must be migrated manually. Also, you must use FTP to transfer your uploaded images to the new location.<br />
Please do a test-run first if you are SQL-savvy. If you encounter any errors, save the message output you get - it will definitely help debugging!<br />
<br/>
This is <strong>NOT</strong> an importer meant for upgrading Serendipity. This importer assumes that both Serendipity installations use the same version.<br />
It is strongly advised that you test this importer in an isolated environment first, do not use it on a production blog unless you made sure it works in a cloned installation. Always make a backup of both the source and the target blog.<br /><br />
After these precautions: The importer code generally works very well for me and my purposes. Your mileage may vary.';
}
function Serendipity_Import_Serendipity ($data) {
@ -95,7 +96,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
function import_table(&$s9ydb, $table, $primary_keys, $where = null, $dupe_check = false, $fix_relations = false, $skip_dupes = false) {
global $serendipity;
echo "<span class='block_level'>Starting with table <strong>{$table}</strong>...</span>";
echo "<br /><br />Starting with table <strong>{$table}</strong>...<br />\n";
if ($dupe_check) {
$dupes = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}" . $table . " " . $where, false, 'both', false, $dupe_check);
@ -160,7 +161,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
}
if (!$this->execute && $this->debug) {
echo "<span>Fix relation from $fix_relation_table.$fix_relation_primary_key={$primary_vals[$fix_relation_primary_key]} to {$row[$primary_key]} (assoc_val: $assoc_val)</span>";
echo "Fix relation from $fix_relation_table.$fix_relation_primary_key={$primary_vals[$fix_relation_primary_key]} to {$row[$primary_key]} (assoc_val: $assoc_val)<br />\n";
}
}
}
@ -169,7 +170,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
if ($insert) {
if ($dupe_check && isset($dupes[$row[$dupe_check]])) {
if ($this->debug) {
echo "Skipping duplicate: <pre>" . print_r($dupes[$row[$dupe_check]], true) . "</pre>";
echo "Skipping duplicate: <pre>" . print_r($dupes[$row[$dupe_check]], true) . "</pre><br />\n";
}
foreach($primary_vals AS $primary_key => $primary_val) {
$this->storage[$table][$primary_key][$primary_val] = $dupes[$row[$dupe_check]][$primary_key];
@ -181,7 +182,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
$dbid = serendipity_db_insert_id($table, $primary_key);
$this->storage[$table][$primary_key][$primary_val] = $dbid;
}
echo "<span class='block_level'>Migrated entry #{$dbid} into {$table}.</span>";
echo "Migrated entry #{$dbid} into {$table}.<br />\n";
} else {
if ($this->debug) {
echo 'DB Insert: <pre>' . print_r($row, true) . '</pre>';
@ -198,7 +199,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
}
} else {
if ($this->debug && !$this->execute) {
echo "<span class='block_level'>Ignoring Duplicate.</span>";
echo "Ignoring Duplicate.<br />\n";
}
}
}
@ -206,7 +207,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
if (!$this->execute) {
echo 'Storage on '. $table . ':<pre>' . print_r($this->storage[$table], true) . '</pre>';
} else {
echo "<span class='block_level'>Finished table <strong>{$table}</strong></span>";
echo "Finished table <strong>{$table}</strong><br />\n";
}
}
@ -469,4 +470,4 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
return 'Serendipity_Import_Serendipity';
/* vim: set sts=4 ts=4 expandtab : */
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -13,7 +13,7 @@ class Serendipity_Import_smf extends Serendipity_Import {
var $categories = array();
function getImportNotes() {
return '<p>SMF uses salted MD5 passwords that Serendipity cannot import. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to a random string. <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.</p>';
return 'SMF uses salted MD5 passwords that Serendipity cannot import. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to a random string. <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.<br />';
}
function Serendipity_Import_smf($data) {

View File

@ -13,8 +13,9 @@ class Serendipity_Import_sunlog extends Serendipity_Import {
var $categories = array();
function getImportNotes() {
return '<p>Sunlog uses a crypted string to represent stored passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity and can not be reconstructed. The passwords for all users have been set to "sunlog". <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.</p>'
. '<p>Sunlog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.</p>';
return 'Sunlog uses a crypted string to represent stored passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity and can not be reconstructed. The passwords for all users have been set to "sunlog". <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.<br />'
. '<br />'
. 'Sunlog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.';
}
function Serendipity_Import_sunlog($data) {

View File

@ -13,7 +13,7 @@ class Serendipity_Import_textpattern extends Serendipity_Import {
var $categories = array();
function getImportNotes() {
return '<p>Textpattern uses MySQLs native PASSWORD() function to save passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to "txp". <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.</p>';
return 'Textpattern uses MySQLs native PASSWORD() function to save passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to "txp". <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.<br />';
}
function Serendipity_Import_textpattern($data) {

View File

@ -82,7 +82,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
// Dependency on static pages
if (!class_exists('serendipity_event_staticpage')) {
die('<span class="msg_error">' . IMPORTER_VOODOO_REQUIREMENTFAIL . '</span>');
die(IMPORTER_VOODOO_REQUIREMENTFAIL . '<br/>');
}
// The selected file
@ -160,18 +160,18 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
// Either replace or insert depending on previous existence
if (!isset($thispage['id'])) {
echo '<span class="block_level">'.IMPORTER_VOODOO_CREATINGPAGE.': '. $mykey.'</span>';
echo '<br/>'.IMPORTER_VOODOO_CREATINGPAGE.': '. $mykey;
serendipity_db_insert('staticpages', $thispage);
$serendipity["POST"]["staticpage"] = serendipity_db_insert_id("staticpages", 'id');
} elseif ($this->data['updateExisting'] == 'true') {
echo '<span class="block_level">'.IMPORTER_VOODOO_UPDATINGPAGE.': '. $mykey.'</span>';
echo '<br/>'.IMPORTER_VOODOO_UPDATINGPAGE.': '. $mykey;
serendipity_db_update("staticpages", array("id" => $thispage["id"]), $thispage);
} else {
echo '<span class="block_level">'.IMPORTER_VOODOO_NOTUPDATING.': '. $mykey.'</span>';
echo '<br/>'.IMPORTER_VOODOO_NOTUPDATING.': '. $mykey;
}
} else {
// If its a url, the content is the link instead
echo '<span class="block_level">'.IMPORTER_VOODOO_RECORDURL.': '.$thispage['headline'].'</span>';
echo '<br/>'.IMPORTER_VOODOO_RECORDURL.': '.$thispage['headline'];
$aliases[$thispage['headline']] = $thispage['content'];
}
break;
@ -179,6 +179,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
}
// Now rewrite the permalinks
echo '<br/>';
if ($this->data['shouldWriteLinks'] == 'true') {
Serendipity_Import_VoodooPad::write_links($aliases);
}
@ -191,7 +192,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
global $serendipity;
// **TODO** Change this to pull out only entries for the current wiki
echo '<p>'.IMPORTER_VOODOO_WRITEINTRALINKS.'</p>';
echo '<br/><p>'.IMPORTER_VOODOO_WRITEINTRALINKS.'</p>';
$pages= &serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}staticpages ORDER BY pagetitle DESC");
@ -209,7 +210,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
serendipity_db_update("staticpages", array("id" => $thispage["id"]), $thispage);
}
echo '<span class="msg_success">' . DONE . '</span>';
echo DONE . '<br />';
}
// Search and replace avoiding content of links

View File

@ -110,7 +110,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
printf(COULDNT_SELECT_USER_INFO, mysql_error($wpdb));
} else {
if ($debug) echo "<span class='block_level'>Importing users...</span>";
if ($debug) echo "Importing users...<br />\n";
for ($x=0, $c = mysql_num_rows($res) ; $x < $c ; $x++) {
$users[$x] = mysql_fetch_assoc($res);
@ -137,7 +137,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
// Set association.
$assoc['users'][$users[$x]['ID']] = $users[$x]['authorid'];
}
if ($debug) echo "<span class='msg_success'>Imported users.</span>";
if ($debug) echo "Imported users.<br />\n";
// Clean memory
unset($users);
@ -152,7 +152,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
$no_cat = mysql_error($wpdb);
} else {
if ($debug) echo "<span class='block_level'>Importing categories (WP 2.2 style)...</span>";
if ($debug) echo "Importing categories (WP 2.2 style)...<br />\n";
// Get all the info we need
for ($x=0 ; $x<mysql_num_rows($res) ; $x++) {
@ -196,10 +196,10 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
// Clean memory
unset($categories);
if ($debug) echo "<span class='block_level'>Imported categories.</span>";
if ($debug) echo "<span class='block_level'>Rebuilding category tree...</span>";
if ($debug) echo "Imported categories.<br />\n";
if ($debug) echo "Rebuilding category tree...<br />\n";
serendipity_rebuildCategoryTree();
if ($debug) echo "<span class='block_level'>Rebuilt category tree.</span>";
if ($debug) echo "Rebuilt category tree.<br />\n";
}
/* Categories (WP >= 2.3 style) */
@ -219,7 +219,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
$no_cat = mysql_error($wpdb);
} elseif ($res) {
$no_cat = false;
if ($debug) echo "<span class='block_level'>Importing categories (WP 2.3 style)...</span>";
if ($debug) echo "Importing categories (WP 2.3 style)...<br />\n";
// Get all the info we need
for ($x=0 ; $x<mysql_num_rows($res) ; $x++) {
@ -263,10 +263,10 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
// Clean memory
unset($categories);
if ($debug) echo "<span class='block_level'>Imported categories.</span>";
if ($debug) echo "<span class='block_level'>Rebuilding category tree...</span>";
if ($debug) echo "Imported categories.<br />\n";
if ($debug) echo "Rebuilding category tree...<br />\n";
serendipity_rebuildCategoryTree();
if ($debug) echo "<span class='block_level'>Rebuilt category tree.</span>";
if ($debug) echo "Rebuilt category tree.<br />\n";
}
if ($no_cat) {
printf(COULDNT_SELECT_CATEGORY_INFO, $no_cat);
@ -282,7 +282,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
printf(COULDNT_SELECT_ENTRY_INFO, mysql_error($wpdb));
} else {
if ($debug) echo "<span class='block_level'>Importing entries...</span>";
if ($debug) echo "Importing entries...<br />\n";
for ($x=0, $c = mysql_num_rows($res) ; $x < $c ; $x++ ) {
$entries[$x] = mysql_fetch_assoc($res);
@ -300,13 +300,13 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!is_int($entries[$x]['entryid'] = serendipity_updertEntry($entry))) {
printf(COULDNT_SELECT_ENTRY_INFO, mysql_error($wpdb));
echo "<span class='block_level'>ID: {$entries[$x]['ID']} - {$entry['title']}</span>";
echo "ID: {$entries[$x]['ID']} - {$entry['title']}<br />\n";
return $entries[$x]['entryid'];
}
$assoc['entries'][$entries[$x]['ID']] = $entries[$x]['entryid'];
}
if ($debug) echo "<span class='msg_success'>Imported entries...</span>";
if ($debug) echo "Imported entries...<br />\n";
// Clean memory
unset($entries);
@ -318,13 +318,13 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
$no_entrycat = mysql_error($wpdb);
} else {
if ($debug) echo "<span class='block_level'>Importing category associations (WP 2.2 style)...</span>";
if ($debug) echo "Importing category associations (WP 2.2 style)...<br />\n";
while ($a = mysql_fetch_assoc($res)) {
$data = array('entryid' => $assoc['entries'][$a['post_id']],
'categoryid' => $assoc['categories'][$a['category_id']]);
serendipity_db_insert('entrycat', $this->strtrRecursive($data));
}
if ($debug) echo "<span class='msg_success'>Imported category associations.</span>";
if ($debug) echo "Imported category associations.<br />\n";
}
/* Entry/category (WP > 2.3 style)*/
@ -335,13 +335,13 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
$no_entrycat = mysql_error($wpdb);
} elseif ($res) {
$no_entrycat = false;
if ($debug) echo "<span class='block_level'>Importing category associations (WP 2.3 style)...</span>";
if ($debug) echo "Importing category associations (WP 2.3 style)...<br />\n";
while ($a = mysql_fetch_assoc($res)) {
$data = array('entryid' => $assoc['entries'][$a['post_id']],
'categoryid' => $assoc['categories'][$a['category_id']]);
serendipity_db_insert('entrycat', $this->strtrRecursive($data));
}
if ($debug) echo "<span class='msg_success'>Imported category associations.</span>";
if ($debug) echo "Imported category associations.<br />\n";
}
if ($no_entrycat) {
@ -354,7 +354,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
printf(COULDNT_SELECT_COMMENT_INFO, mysql_error($wpdb));
} else {
$serendipity['allowSubscriptions'] = false;
if ($debug) echo "<span class='block_level'>Importing comments...</span>";
if ($debug) echo "Importing comments...<br />\n";
while ($a = mysql_fetch_assoc($res)) {
$comment = array('entry_id ' => $assoc['entries'][$a['comment_post_ID']],
'parent_id' => 0,
@ -373,7 +373,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
serendipity_approveComment($cid, $assoc['entries'][$a['comment_post_ID']], true);
}
}
if ($debug) echo "<span class='msg_success'>Imported comments.</span>";
if ($debug) echo "Imported comments.<br />\n";
}
$serendipity['noautodiscovery'] = $noautodiscovery;

View File

@ -1,4 +1,6 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
if (IN_serendipity !== true) {
die ("Don't hack!");
@ -12,11 +14,6 @@ define('S9Y_I_ERROR', -1);
define('S9Y_I_WARNING', 0);
define('S9Y_I_SUCCESS', 1);
// smartification needs to pull everything first for installation and db purposes
//include(S9Y_INCLUDE_PATH . 'serendipity_config.inc.php');
$data = array();
if (defined('S9Y_DATA_PATH')) {
// Shared installation. S9Y_INCLUDE_PATH points to repository,
// S9Y_DATA_PATH points to the local directory.
@ -26,8 +23,6 @@ if (defined('S9Y_DATA_PATH')) {
$basedir = serendipity_query_default('serendipityPath', false);
}
$data['basedir'] = $basedir;
/**
* Checks a return code constant if it's successfull or an error and return HTML code
*
@ -40,19 +35,16 @@ $data['basedir'] = $basedir;
* @return string returned String
*/
function serendipity_installerResultDiagnose($result, $s) {
global $errorCount, $data;
global $errorCount;
if ( $result === S9Y_I_SUCCESS ) {
$data['i_success'] = true; // we dont need data here explicitely, but we keep it for possible future purposes
return '<span class="msg_success">'. $s .'</span>';
return '<span class="serendipityAdminMsgSuccessInstall" style="color: green; font-weight: bold">'. $s .'</span>';
}
if ( $result === S9Y_I_WARNING ) {
$data['i_warning'] = true;
return '<span class="msg_notice">'. $s .' [?]</span>';
return '<span class="serendipityAdminMsgWarningInstall" style="color: orange; font-weight: bold">'. $s .' [?]</span>';
}
if ( $result === S9Y_I_ERROR ) {
$errorCount++;
$data['i_error'] = true;
return '<span class="msg_error">'. $s .' [!]</span>';
return '<span class="serendipityAdminMsgErrorInstall" style="color: red; font-weight: bold">'. $s .' [!]</span>';
}
}
@ -64,7 +56,7 @@ if (!empty($serendipity['POST']['getstep']) && is_numeric($serendipity['POST']['
}
/* From configuration to install */
if ( sizeof($_POST) > 1 && (int)$serendipity['GET']['step'] == 3 ) {
if ( sizeof($_POST) > 1 && $serendipity['GET']['step'] == 3 ) {
/* One problem, if the user chose to do an easy install, not all config vars has been transfered
Therefore we fetch all config vars with their default values, and merge them with our POST data */
@ -78,8 +70,10 @@ if ( sizeof($_POST) > 1 && (int)$serendipity['GET']['step'] == 3 ) {
}
if ( is_array($errors = serendipity_checkInstallation()) ) {
$data['is_errors'] = true;
$data['errors'] = $errors;
foreach ( $errors as $error ) {
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />'. $error .'</div>';
}
$from = $_POST;
/* Back to configuration, user did something wrong */
$serendipity['GET']['step'] = $serendipity['POST']['step'];
@ -89,266 +83,451 @@ if ( sizeof($_POST) > 1 && (int)$serendipity['GET']['step'] == 3 ) {
}
}
$data['s9yGETstep'] = $serendipity['GET']['step'];
if ( (int)$serendipity['GET']['step'] == 0 ) {
$data['getstepint0'] = true;
$data['print_ERRORS_ARE_DISPLAYED_IN'] = sprintf(ERRORS_ARE_DISPLAYED_IN, serendipity_installerResultDiagnose(S9Y_I_ERROR, RED), serendipity_installerResultDiagnose(S9Y_I_WARNING, YELLOW), serendipity_installerResultDiagnose(S9Y_I_SUCCESS, GREEN));
$data['s9yversion'] = $serendipity['version'];
?>
<?php echo WELCOME_TO_INSTALLATION ?>.
<br /><?php echo FIRST_WE_TAKE_A_LOOK ?>.
<br /><?php echo sprintf(ERRORS_ARE_DISPLAYED_IN, serendipity_installerResultDiagnose(S9Y_I_ERROR, RED), serendipity_installerResultDiagnose(S9Y_I_WARNING, YELLOW), serendipity_installerResultDiagnose(S9Y_I_SUCCESS, GREEN)); ?>.
<br />
<br>
<div align="center">- <?php echo sprintf(PRE_INSTALLATION_REPORT, $serendipity['version']) ?> -</div><br />
$errorCount = 0;
if (is_readable(S9Y_INCLUDE_PATH . 'checksums.inc.php')) {
$badsums = serendipity_verifyFTPChecksums();
if (empty($badsums)) {
$data['installerResultDiagnose_CHECKSUMS'][] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, CHECKSUMS_PASS);
} else {
foreach ($badsums as $file => $sum) {
$data['installerResultDiagnose_CHECKSUMS'][] = serendipity_installerResultDiagnose(S9Y_I_WARNING, sprintf(CHECKSUM_FAILED, $file));
}
}
} else {
$data['installerResultDiagnose_CHECKSUMS'][] = serendipity_installerResultDiagnose(S9Y_I_WARNING, CHECKSUMS_NOT_FOUND);
<?php $errorCount = 0 ?>
<div align="center">
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="2" style="font-weight: bold"><?php echo INTEGRITY ?></td>
</tr>
<?php if (is_readable(S9Y_INCLUDE_PATH . 'checksums.inc.php')) {
$badsums = serendipity_verifyFTPChecksums();
?>
<?php if (empty($badsums)) {?>
<tr>
<td colspan="2"><?php echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, CHECKSUMS_PASS); ?></td>
</tr>
<?php } else {
foreach ($badsums as $file => $sum) {
?>
<tr>
<td colspan="2"><?php echo serendipity_installerResultDiagnose(S9Y_I_WARNING, sprintf(CHECKSUM_FAILED, $file)); ?></td>
</tr>
<?php }
}
$data['php_uname'] = php_uname('s') .' '. php_uname('r') .', '. php_uname('m');
$data['php_sapi_name'] = php_sapi_name();
if ( version_compare(phpversion(), '5.2.6', '>=') ) {
$data['installerResultDiagnose_VERSION'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES .', '. phpversion());
} else {
$data['installerResultDiagnose_VERSION'] = serendipity_installerResultDiagnose(S9Y_I_ERROR, NO);
}
if ( sizeof(($_res = serendipity_probeInstallation('dbType'))) == 0 ) {
$data['installerResultDiagnose_DBTYPE'] = serendipity_installerResultDiagnose(S9Y_I_ERROR, NONE);
} else {
$data['installerResultDiagnose_DBTYPE'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, implode(', ', $_res));
}
if ( extension_loaded('session') ) {
$data['installerResultDiagnose_SESSION'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
$data['installerResultDiagnose_SESSION'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, NO);
}
if ( extension_loaded('pcre') ) {
$data['installerResultDiagnose_PCRE'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
$data['installerResultDiagnose_PCRE'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, NO);
}
if ( extension_loaded('gd') ) {
$data['installerResultDiagnose_GD'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
$data['installerResultDiagnose_GD'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
if ( extension_loaded('openssl') ) {
$data['installerResultDiagnose_OPENSSL'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
$data['installerResultDiagnose_OPENSSL'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
if ( extension_loaded('mbstring') ) {
$data['installerResultDiagnose_MBSTR'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
$data['installerResultDiagnose_MBSTR'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
if ( extension_loaded('iconv') ) {
$data['installerResultDiagnose_ICONV'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
$data['installerResultDiagnose_ICONV'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
if ( extension_loaded('zlib') ) {
$data['installerResultDiagnose_ZLIB'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
$data['installerResultDiagnose_ZLIB'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
if ($binary = serendipity_query_default('convert', false)) {
$data['installerResultDiagnose_IM'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, $binary);
} else {
$data['installerResultDiagnose_IM'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NOT_FOUND);
}
if ( !serendipity_ini_bool(ini_get('safe_mode')) ) {
$data['installerResultDiagnose_SSM'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
$data['installerResultDiagnose_SSM'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
}
if ( serendipity_ini_bool(ini_get('register_globals')) ) {
$data['installerResultDiagnose_SRG'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
} else {
$data['installerResultDiagnose_SRG'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
}
if ( !serendipity_ini_bool(ini_get('magic_quotes_gpc')) ) {
$data['installerResultDiagnose_SMQG'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
$data['installerResultDiagnose_SMQG'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
}
if ( !serendipity_ini_bool(ini_get('magic_quotes_runtime')) ) {
$data['installerResultDiagnose_SMQR'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
$data['installerResultDiagnose_SMQR'] = serendipity_installerResultDiagnose(S9Y_I_ERROR, 'ON');
}
if ( !serendipity_ini_bool(ini_get('session.use_trans_sid')) ) {
$data['installerResultDiagnose_SSUTS'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
$data['installerResultDiagnose_SSUTS'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
}
if ( serendipity_ini_bool(ini_get('allow_url_fopen')) ) {
$data['installerResultDiagnose_SAUF'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'ON');
} else {
$data['installerResultDiagnose_SAUF'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, 'OFF');
}
if ( serendipity_ini_bool(ini_get('file_uploads')) ) {
$data['installerResultDiagnose_SFU'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'ON');
} else {
$data['installerResultDiagnose_SFU'] = serendipity_installerResultDiagnose(S9Y_I_ERROR, 'OFF');
}
if ( serendipity_ini_bytesize(ini_get('post_max_size')) >= (10*1024*1024) ) {
$data['installerResultDiagnose_SPMS'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, ini_get('post_max_size'));
} else {
$data['installerResultDiagnose_SPMS'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, ini_get('post_max_size'));
}
if ( serendipity_ini_bytesize(ini_get('upload_max_filesize')) >= (10*1024*1024) ) {
$data['installerResultDiagnose_SUMF'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, ini_get('upload_max_filesize'));
} else {
$data['installerResultDiagnose_SUMF'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, ini_get('upload_max_filesize'));
}
if ( serendipity_ini_bytesize(ini_get('memory_limit')) >= ((PHP_INT_SIZE == 4 ? 8 : 16)*1024*1024) ) {
$data['installerResultDiagnose_SML'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, ini_get('memory_limit'));
} else {
$data['installerResultDiagnose_SML'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, ini_get('memory_limit'));
}
$basewritable = False;
if ( is_writable($basedir) ) {
$data['installerResultDiagnose_WRITABLE'][] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
$basewritable = True;
} else {
#Figure out if we already have all we need
#PATH_SMARTY_COMPILE/
#uploads/
#archives/
#.htaccess
#serendipity_config_local.inc.php
# For completeness we could test to make sure the directories
# really are directories, but that's probably overkill
foreach (array('archives/', PATH_SMARTY_COMPILE . '/', 'uploads/', '.htaccess', 'serendipity_config_local.inc.php') as $path) {
if (!is_writeable($basedir . $path)) {
$data['installerResultDiagnose_WRITABLE'][] = serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
break;
}
}
if (!$showWritableNote) {
$data['installerResultDiagnose_WRITABLE'][] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
}
}
if ( is_writable($basedir . PATH_SMARTY_COMPILE) ) {
$data['installerResultDiagnose_COMPILE'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
if ($basewritable && !is_dir($basedir . PATH_SMARTY_COMPILE)) {
$data['installerResultDiagnose_COMPILE'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
#This directory will be created later in the process
} else {
$data['installerResultDiagnose_COMPILE'] = serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
}
if ( is_writable($basedir . 'archives/') ) {
$data['installerResultDiagnose_ARCHIVES'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
if ($basewritable && !is_dir($basedir . 'archives/')) {
$data['installerResultDiagnose_ARCHIVES'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
#This directory will be created later in the process
} else {
$data['installerResultDiagnose_ARCHIVES'] = serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
}
if ( is_writable($basedir . 'plugins/') ) {
$data['installerResultDiagnose_PLUGINS'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
$data['installerResultDiagnose_PLUGINS'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NOT_WRITABLE . NOT_WRITABLE_SPARTACUS);
}
if ( is_dir($basedir .'uploads/') ) {
$data['is_dir_uploads'] = true;
if ( is_writable($basedir . 'uploads/') ) {
$data['installerResultDiagnose_UPLOADS'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
if ($basewritable && !is_dir($basedir . 'uploads/')) {
$data['installerResultDiagnose_UPLOADS'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
#This directory will be created later in the process
} else { ?>
<tr>
<td colspan="2"><?php echo serendipity_installerResultDiagnose(S9Y_I_WARNING, CHECKSUMS_NOT_FOUND); ?></td>
</tr>
<?php } ?>
</table>
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="2" style="font-weight: bold"><?php echo PHP_INSTALLATION ?></td>
</tr>
<tr>
<td><?php echo OPERATING_SYSTEM ?></td>
<td><?php echo php_uname('s') .' '. php_uname('r') .', '. php_uname('m') ?></td>
</tr>
<tr>
<td><?php echo WEBSERVER_SAPI ?></td>
<td><?php echo php_sapi_name() ?></td>
</tr>
<tr>
<td>PHP version >= 5.2.6</td>
<td width="200"><?php
if ( version_compare(phpversion(), '5.2.6', '>=') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES .', '. phpversion());
} else {
$data['installerResultDiagnose_UPLOADS'] = serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, NO);
}
}
}
?></td>
</tr>
<tr>
<td>Database extensions</td>
<td width="200"><?php
if (function_exists('is_executable')) {
$data['is_imb_executable'] = true;
if ($binary = serendipity_query_default('convert', false)) {
if (is_executable($binary)) {
$data['installerResultDiagnose_IMB'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
if ( sizeof(($_res = serendipity_probeInstallation('dbType'))) == 0 ) {
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, NONE);
} else {
$data['installerResultDiagnose_IMB'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, implode(', ', $_res));
}
} else {
$data['installerResultDiagnose_IMB'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NOT_FOUND);
}
}
?></td>
</tr>
<tr>
<td>Session extension</td>
<td width="200"><?php
if ( extension_loaded('session') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, NO);
}
?></td>
</tr>
<tr>
<td>PCRE extension</td>
<td width="200"><?php
if ( extension_loaded('pcre') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, NO);
}
?></td>
</tr>
<tr>
<td>GDlib extension</td>
<td width="200"><?php
if ( extension_loaded('gd') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
?></td>
</tr>
<tr>
<td>OpenSSL extension</td>
<td><?php
if ( extension_loaded('openssl') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
?></td>
</tr>
<tr>
<td>mbstring extension</td>
<td width="200"><?php
if ( extension_loaded('mbstring') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
?></td>
</tr>
<tr>
<td>iconv extension</td>
<td width="200"><?php
if ( extension_loaded('iconv') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
?></td>
</tr>
<tr>
<td>zlib extension</td>
<td width="200"><?php
if ( extension_loaded('zlib') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
?></td>
</tr>
<tr>
<td>Imagemagick binary </td>
<td><?php
if ($binary = serendipity_query_default('convert', false)) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, $binary);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NOT_FOUND);
}
?></td>
</tr>
</table>
<br />
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="3" style="font-weight: bold"><?PHP echo PHPINI_CONFIGURATION ?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="150"><em><?php echo RECOMMENDED ?></em></td>
<td width="150"><em><?php echo ACTUAL ?></em></td>
</tr>
<tr>
<td>safe_mode</td>
<td width="150"><strong><?php echo 'OFF' ?></strong></td>
<td width="150"><?php
if ( !serendipity_ini_bool(ini_get('safe_mode')) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
}
?></td>
</tr>
<tr>
<td>register_globals</td>
<td width="150"><strong><?php echo 'OFF' ?></strong></td>
<td width="150"><?php
if ( serendipity_ini_bool(ini_get('register_globals')) ) {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
} else {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
}
?></td>
</tr>
<tr>
<td>magic_quotes_gpc</td>
<td width="150"><strong><?php echo 'OFF' ?></strong></td>
<td width="150"><?php
if ( !serendipity_ini_bool(ini_get('magic_quotes_gpc')) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
}
?></td>
</tr>
<tr>
<td>magic_quotes_runtime</td>
<td width="150"><strong><?php echo 'OFF' ?></strong></td>
<td width="150"><?php
if ( !serendipity_ini_bool(ini_get('magic_quotes_runtime')) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, 'ON');
}
?></td>
</tr>
<tr>
<td>session.use_trans_sid</td>
<td width="150"><strong><?php echo 'OFF' ?></strong></td>
<td width="150"><?php
if ( !serendipity_ini_bool(ini_get('session.use_trans_sid')) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'OFF');
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, 'ON');
}
?></td>
</tr>
<tr>
<td>allow_url_fopen</td>
<td width="150"><strong><?php echo 'ON' ?></strong></td>
<td width="150"><?php
if ( serendipity_ini_bool(ini_get('allow_url_fopen')) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'ON');
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, 'OFF');
}
?></td>
</tr>
<tr>
<td>file_uploads</td>
<td width="150"><strong><?php echo 'ON' ?></strong></td>
<td width="150"><?php
if ( serendipity_ini_bool(ini_get('file_uploads')) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, 'ON');
} else {
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, 'OFF');
}
?></td>
</tr>
<tr>
<td>post_max_size</td>
<td width="150"><strong>10M</strong></td>
<td width="150"><?php
if ( serendipity_ini_bytesize(ini_get('post_max_size')) >= (10*1024*1024) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, ini_get('post_max_size'));
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, ini_get('post_max_size'));
}
?></td>
</tr>
<tr>
<td>upload_max_filesize</td>
<td width="150"><strong>10M</strong></td>
<td width="150"><?php
if ( serendipity_ini_bytesize(ini_get('upload_max_filesize')) >= (10*1024*1024) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, ini_get('upload_max_filesize'));
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, ini_get('upload_max_filesize'));
}
?></td>
</tr>
<tr>
<td>memory_limit</td>
<td width="150"><strong><?php echo (PHP_INT_SIZE == 4 ? '8M' : '16M'); ?></strong></td>
<td width="150"><?php
if ( serendipity_ini_bytesize(ini_get('memory_limit')) >= ((PHP_INT_SIZE == 4 ? 8 : 16)*1024*1024) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, ini_get('memory_limit'));
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, ini_get('memory_limit'));
}
?></td>
</tr>
$data['showWritableNote'] = $showWritableNote;
$data['errorCount'] = $errorCount;
</table>
} elseif ( $serendipity['GET']['step'] == '2a' ) {
<br />
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="2" style="font-weight: bold"><?php echo PERMISSIONS ?></td>
</tr>
<tr>
<td style="vertical-align: top"><?php echo $basedir ?></td>
<td width="200"><?php
$basewritable = False;
if ( is_writable($basedir) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
$basewritable = True;
} else {
#Figure out if we already have all we need
#PATH_SMARTY_COMPILE/
#uploads/
#archives/
#.htaccess
#serendipity_config_local.inc.php
# For completeness we could test to make sure the directories
# really are directories, but that's probably overkill
foreach (array('archives/', PATH_SMARTY_COMPILE . '/', 'uploads/', '.htaccess', 'serendipity_config_local.inc.php') as $path) {
if (!is_writeable($basedir . $path)) {
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
break;
}
}
if (!$showWritableNote) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
}
}
?></td>
</tr>
<tr>
<td style="vertical-align: top"><?php echo $basedir . PATH_SMARTY_COMPILE?></td>
<td width="200"><?php
if ( is_writable($basedir . PATH_SMARTY_COMPILE) ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
if ($basewritable && !is_dir($basedir . PATH_SMARTY_COMPILE)) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
#This directory will be created later in the process
} else {
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
}
?></td>
</tr>
<tr>
<td style="vertical-align: top"><?php echo $basedir . 'archives/'?></td>
<td width="200"><?php
if ( is_writable($basedir . 'archives/') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
if ($basewritable && !is_dir($basedir . 'archives/')) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
#This directory will be created later in the process
} else {
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
}
?></td>
</tr>
<tr>
<td style="vertical-align: top"><?php echo $basedir . 'plugins/'?></td>
<td width="200"><?php
if ( is_writable($basedir . 'plugins/') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NOT_WRITABLE . NOT_WRITABLE_SPARTACUS);
}
?></td>
</tr>
<?php if ( is_dir($basedir .'uploads/') ) { ?>
<tr>
<td style="vertical-align: top"><?php echo $basedir . 'uploads/'?></td>
<td width="200"><?php
if ( is_writable($basedir . 'uploads/') ) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
} else {
if ($basewritable && !is_dir($basedir . 'uploads/')) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
#This directory will be created later in the process
} else {
echo serendipity_installerResultDiagnose(S9Y_I_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
}
?></td>
</tr>
<?php } ?>
<?php if (function_exists('is_executable')) { ?>
<tr>
<td style="vertical-align: top">Execute Imagemagick binary </td>
<td><?php
if ($binary = serendipity_query_default('convert', false)) {
if (is_executable($binary)) {
echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
}
} else {
echo serendipity_installerResultDiagnose(S9Y_I_WARNING, NOT_FOUND);
}
?></td>
</tr>
<?php } ?>
</table>
<?php if ( $showWritableNote === true ) { ?>
<div class="serendipityAdminMsgNote"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_note.png'); ?>" alt="" /><?php echo sprintf(PROBLEM_PERMISSIONS_HOWTO, 'chmod 1777') ?></div>
<?php } ?>
<div align="center">
<?php if ( $errorCount > 0 ) { ?>
<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_error.png'); ?>" alt="" /><?php echo PROBLEM_DIAGNOSTIC ?></div>
<h2><a href="serendipity_admin.php"><?php echo RECHECK_INSTALLATION ?></a></h2>
<?php } else { ?>
<?php echo SELECT_INSTALLATION_TYPE ?>:
<h2><a href="?serendipity[step]=2a"><?php echo SIMPLE_INSTALLATION ?></a> - <a href="?serendipity[step]=2b"><?php echo EXPERT_INSTALLATION ?></a></h2>
<?php } ?>
</div>
</div>
<?php } elseif ( $serendipity['GET']['step'] == '2a' ) { ?>
<form action="?" method="post">
<input type="hidden" name="serendipity[step]" value="<?php echo $serendipity['GET']['step'] ?>">
<input type="hidden" name="serendipity[getstep]" value="3">
<?php
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE, null, array('simpleInstall'));
ob_start();
serendipity_printConfigTemplate($config, $from, true, false, false);
$data['ob_serendipity_printConfigTemplate'] = ob_get_contents();
ob_end_clean();
?>
<div align="center"><input name="submit" type="submit" value="<?php echo COMPLETE_INSTALLATION ?>" class="serendipityPrettyButton input_button"></div>
</form>
} elseif ( $serendipity['GET']['step'] == '2b' ) {
<?php } elseif ( $serendipity['GET']['step'] == '2b' ) { ?>
<form action="?" method="post">
<input type="hidden" name="serendipity[step]" value="<?php echo $serendipity['GET']['step'] ?>">
<input type="hidden" name="serendipity[getstep]" value="3">
<?php
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
ob_start();
serendipity_printConfigTemplate($config, $from, true, false, false);
$data['ob_serendipity_printConfigTemplate'] = ob_get_contents();
ob_end_clean();
?>
<div align="center"><input name="submit" type="submit" value="<?php echo COMPLETE_INSTALLATION ?>" class="serendipityPrettyButton input_button"></div>
</form>
} elseif ( (int)$serendipity['GET']['step'] == 3 ) {
<?php } elseif ( (int)$serendipity['GET']['step'] == 3 ) { ?>
<?php
$data['getstepint3'] = true;
$serendipity['dbPrefix'] = $_POST['dbPrefix'];
echo CHECK_DATABASE_EXISTS .'...';
$t = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors", false, 'both', false, false, false, true);
$data['authors_query'] = $t;
if ( is_array($t) ) {
// void
echo ' <strong>'. THEY_DO .'</strong>, '. WONT_INSTALL_DB_AGAIN;
echo '<br />';
echo '<br />';
} else {
serendipity_installDatabase();
$data['install_DB'] = true;
echo ' <strong>'. THEY_DONT .'</strong>';
echo '<br />';
echo CREATE_DATABASE;
serendipity_installDatabase();
echo ' <strong>' . DONE . '</strong><br />';
echo sprintf(CREATING_PRIMARY_AUTHOR, htmlspecialchars($_POST['user'])) .'...';
$authorid = serendipity_addAuthor($_POST['user'], $_POST['pass'], $_POST['realname'], $_POST['email'], USERLEVEL_ADMIN, 1);
$mail_comments = (serendipity_db_bool($_POST['want_mail']) ? 1 : 0);
serendipity_set_user_var('mail_comments', $mail_comments, $authorid);
@ -357,47 +536,38 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
serendipity_addDefaultGroup('USERLEVEL_EDITOR_DESC', USERLEVEL_EDITOR);
serendipity_addDefaultGroup('USERLEVEL_CHIEF_DESC', USERLEVEL_CHIEF);
serendipity_addDefaultGroup('USERLEVEL_ADMIN_DESC', USERLEVEL_ADMIN);
$data['add_authors'] = true;
echo ' <strong>' . DONE . '</strong><br />';
echo SETTING_DEFAULT_TEMPLATE .'... ';
serendipity_set_config_var('template', $serendipity['defaultTemplate']);
$data['set_template_vars'] = true;
echo ' <strong>' . DONE . '</strong><br />';
echo INSTALLING_DEFAULT_PLUGINS .'... ';
include_once S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php';
serendipity_plugin_api::register_default_plugins();
$data['register_default_plugins'] = true;
echo ' <strong>' . DONE . '</strong><br />';
}
echo sprintf(ATTEMPT_WRITE_FILE, '.htaccess') . '... ';
$errors = serendipity_installFiles($basedir);
$data['errors_sif'] = $errors;
if ( $errors === true ) {
echo ' <strong>' . DONE . '</strong><br />';
} else {
echo ' <strong>' . FAILED . '</strong><br />';
foreach ( $errors as $error ) {
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . $error .'</div>';
}
}
if ( serendipity_updateConfiguration() ) {
$data['s9y_installed'] = true;
}
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png'). '" alt="" />' . SERENDIPITY_INSTALLED .'</div>';
echo '<div align="center" style="font-size: large"><a href="'. $_POST['serendipityHTTPPath'] .'">'. VISIT_BLOG_HERE .'</a></div>';
echo '<div align="center">'. THANK_YOU_FOR_CHOOSING .'</div>';
} else {
echo '<div class="serendipityAdminMsgError"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />'. ERROR_DETECTED_IN_INSTALL .'</div>';
}
}
if (!defined('S9Y_FRAMEWORK_FUNCTIONS')) {
include dirname(dirname(__FILE__)) . "/functions.inc.php";
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/installer.inc.tpl";
ob_start();
include $tfile;
$content = ob_get_contents();
ob_end_clean();
#$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
#echo $content;
// eval a string template and do not store compiled code
echo $serendipity['smarty']->display('eval:'.$content);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -1,4 +1,7 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
if (IN_serendipity !== true) {
die ("Don't hack!");
@ -25,7 +28,7 @@ $output = array(
'<a href="http://www.s9y.org/33.html">' . FURTHER_LINKS_S9Y_DOCS . '</a>',
'<a href="http://blog.s9y.org/">' . FURTHER_LINKS_S9Y_BLOG . '</a>',
'<a href="http://www.s9y.org/forums/">' . FURTHER_LINKS_S9Y_FORUMS . '</a>',
'<a href="http://spartacus.s9y.org/">' . FURTHER_LINKS_S9Y_SPARTACUS . '</a>',
'<a href="http://php-blog.sf.net/">' . FURTHER_LINKS_S9Y_SPARTACUS . '</a>',
'<a href="' . $bookmarklet . '" onclick="alert(\'' . FURTHER_LINKS_S9Y_BOOKMARKLET_DESC . '\'); return false;" title="' . FURTHER_LINKS_S9Y_BOOKMARKLET_DESC . '">' . FURTHER_LINKS_S9Y_BOOKMARKLET . '</a>'
),
'links_css' => 'further_links',
@ -34,16 +37,16 @@ $output = array(
serendipity_plugin_api::hook_event('backend_frontpage_display', $output);
$data['output'] = $output;
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
if ($output['show_links']) {
echo '<div class="' . $output['links_css'] . '">' . "\n";
echo '<p class="further_links_head">' . $output['links_title'] . '</p>' . "\n";
echo '<ul>' . "\n";
foreach($output['links'] AS $link) {
echo '<li>' . $link . '</li>' . "\n";
}
echo '</ul>' . "\n";
echo '<p class="further_links_foot" style="display: none"></p>' . "\n";
echo '</div>' . "\n";
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/overview.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
/* vim: set sts=4 ts=4 expandtab : */
echo '<h3 class="serendipityWelcomeBack">' . $output['welcome'] . '</h3>';
echo $output['more'];

View File

@ -6,8 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!");
}
$data = array();
if (!serendipity_checkPermission('personalConfiguration')) {
return;
}
@ -16,17 +14,16 @@ $from = array();
if ($serendipity['GET']['adminAction'] == 'save' && serendipity_checkFormToken()) {
$config = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
$data['adminAction'] = "save";
if ( (!serendipity_checkPermission('adminUsersEditUserlevel') || !serendipity_checkPermission('adminUsersMaintainOthers') )
&& (int)$_POST['userlevel'] > $serendipity['serendipityUserlevel']) {
$data['not_authorized'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . CREATE_NOT_AUTHORIZED_USERLEVEL . '</div>';
} elseif (empty($_POST['username'])) {
$data['empty_username'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . USERCONF_CHECK_USERNAME_ERROR . '</div>';
} elseif (!empty($_POST['password']) && $_POST['check_password'] != $_SESSION['serendipityPassword'] && serendipity_passwordhash($_POST['check_password']) != $_SESSION['serendipityPassword']) {
$data['password_check_fail'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . USERCONF_CHECK_PASSWORD_ERROR . '</div>';
} else {
$valid_groups = serendipity_getGroups($serendipity['authorid'], true);
$data['realname'] = $_POST['realname'];
foreach($config as $category) {
foreach ($category['items'] as $item) {
if (in_array('groups', $item['flags'])) {
@ -59,7 +56,7 @@ if ($serendipity['GET']['adminAction'] == 'save' && serendipity_checkFormToken()
}
/*
if (count($_POST[$item['var']]) < 1) {
echo '<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . WARNING_NO_GROUPS_SELECTED . '</div>';
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . WARNING_NO_GROUPS_SELECTED . '</div>';
} else {
serendipity_updateGroups($_POST[$item['var']], $serendipity['authorid'], false);
}
@ -96,32 +93,26 @@ if ($serendipity['GET']['adminAction'] == 'save' && serendipity_checkFormToken()
}
}
$from = $_POST;
}
}
?>
<div class="serendipityAdminMsgSuccess"><img width="22px" height="22px" style="border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_success.png'); ?>" alt="" /><?php echo sprintf(MODIFIED_USER, htmlspecialchars($_POST['realname'])) ?></div>
<?php }
} ?>
$data['formToken'] = serendipity_setFormToken();
<form action="?serendipity[adminModule]=personal&amp;serendipity[adminAction]=save" method="post">
<?php
echo serendipity_setFormToken();
$template = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
$user = serendipity_fetchUsers($serendipity['authorid']);
$from = $user[0];
$from['groups'] = serendipity_getGroups($serendipity['authorid']);
unset($from['password']);
ob_start();
serendipity_printConfigTemplate($template, $from, true, false);
$data['config'] = ob_get_contents();
ob_get_clean();
?>
<div align="right"><input class="serendipityPrettyButton input_button" type="submit" name="SAVE" value="<?php echo SAVE; ?>" /></div>
</form>
<?php
$add = array('internal' => true);
serendipity_plugin_api::hook_event('backend_sidebar_entries_event_display_profiles', $from, $add);
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/personal.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -1,4 +1,6 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
if (IN_serendipity !== true) {
die ('Don\'t hack!');
@ -8,8 +10,6 @@ if (!serendipity_checkPermission('adminPlugins')) {
return;
}
$data = array();
include_once S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php';
include_once S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php';
include_once S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
@ -63,8 +63,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
if (!($plugin->protected === FALSE || $plugin->serendipity_owner == '0' || $plugin->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'))) {
return;
}
$data['plugin_to_conf'] = true;
$bag = new serendipity_property_bag;
$plugin->introspect($bag);
@ -121,44 +120,78 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
$plugin->cleanup();
}
?>
if ( isset($save_errors) && is_array($save_errors) && count($save_errors) > 0 ) {
$data['save_errors'] = $save_errors;
} elseif ( isset($_POST['SAVECONF'])) {
$data['saveconf'] = true;
$data['timestamp'] = serendipity_strftime('%H:%M:%S');
}
$data['formToken'] = serendipity_setFormToken();
$data['name'] = $name;
$data['class'] = get_class($plugin);
$data['desc'] = $desc;
$data['documentation'] = $documentation;
$data['plugin'] = $plugin;
if (@file_exists(dirname($plugin->pluginFile) . '/ChangeLog')) {
$data['changelog'] = true;
<?php if ( isset($save_errors) && is_array($save_errors) && count($save_errors) > 0 ) { ?>
<div class="serendipityAdminMsgError">
<img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_error.png'); ?>" alt="" />
<?php
echo ERROR . ":<br />\n";
echo "<ul>\n";
foreach($save_errors AS $save_error) {
echo '<li>' . $save_error . "</li>\n";
}
echo "</ul>\n";
?>
</div>
<?php } elseif ( isset($_POST['SAVECONF'])) { ?>
<div class="serendipityAdminMsgSuccess"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_success.png'); ?>" alt="" /><?php echo DONE .': '. sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')); ?></div>
<?php } ?>
if (@file_exists(dirname($plugin->pluginFile) . '/documentation_' . $serendipity['lang'] . '.html')) {
$data['documentation_local'] = '/documentation_' . $serendipity['lang'] . '.html';
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation_en.html')) {
$data['documentation_local'] = '/documentation_en.html';
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation.html')) {
$data['documentation_local'] = '/documentation.html';
} elseif (@file_exists(dirname($plugin->pluginFile) . '/README')) {
$data['documentation_local'] = '/README';
}
<form method="post" name="serendipityPluginConfigure">
<?php echo serendipity_setFormToken(); ?>
<table cellpadding="5" style="border: 1px dashed" width="90%" align="center">
<tr>
<th width="100"><?php echo NAME; ?></th>
<td><?php echo $name; ?> (<em><?php echo get_class($plugin); ?></em>)</td>
</tr>
$data['license'] = $license;
ob_start();
serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups);
$data['config'] = ob_get_contents();
ob_end_clean();
<tr>
<th style="vertical-align: top"><?php echo DESCRIPTION; ?></th>
<td>
<?php
echo $desc;
if (!empty($documentation)) {
echo '<br /><a href="' . htmlspecialchars($documentation) . '">' . PLUGIN_DOCUMENTATION . '</a>';
}
if (@file_exists(dirname($plugin->pluginFile) . '/ChangeLog')) {
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/ChangeLog">' . PLUGIN_DOCUMENTATION_CHANGELOG . '</a>';
}
if (@file_exists(dirname($plugin->pluginFile) . '/documentation_' . $serendipity['lang'] . '.html')) {
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/documentation_' . $serendipity['lang'] . '.html">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation_en.html')) {
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/documentation_en.html">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
} elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation.html')) {
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/documentation.html">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
} elseif (@file_exists(dirname($plugin->pluginFile) . '/README')) {
echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/README">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
}
?>
</td>
</tr>
<?php
if (!empty($license)) {
echo '<tr><th>'.MEDIA_PROPERTY_COPYRIGHT.'</th><td>'.$license.'</td></tr>';
}
?>
</table>
<br />
<?php serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups); ?>
</form>
<?php
} elseif ( $serendipity['GET']['adminAction'] == 'addnew' ) {
$data['adminAction'] = 'addnew';
$data['type'] = $serendipity['GET']['type'];
?>
<?php if ( $serendipity['GET']['type'] == 'event' ) { ?>
<h2><?php echo EVENT_PLUGINS ?></h2>
<?php } else { ?>
<h2><?php echo SIDEBAR_PLUGINS ?></h2>
<?php } ?>
<br />
<?php
$foreignPlugins = $pluginstack = $errorstack = array();
serendipity_plugin_api::hook_event('backend_plugins_fetchlist', $foreignPlugins);
$pluginstack = array_merge((array)$foreignPlugins['pluginstack'], $pluginstack);
@ -243,49 +276,157 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
}
ksort($pluggroups);
$data['errorstack'] = $errorstack;
foreach($errorstack as $e_idx => $e_name) {
echo ERROR . ': ' . $e_name . '<br />';
}
if ($serendipity['GET']['only_group'] == 'UPGRADE') {
serendipity_plugin_api::hook_event('backend_pluginlisting_header_upgrade', $pluggroups);
}
?>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<?php
$available_groups = array_keys($pluggroups);
$data['available_groups'] = $available_groups;
$groupnames = array();
foreach($available_groups as $available_group) {
$groupnames[$available_group] = serendipity_groupname($available_group);
}
$data['groupnames'] = $groupnames;
$data['pluggroups'] = $pluggroups;
$data['formToken'] = serendipity_setFormToken();
$data['only_group'] = $serendipity['GET']['only_group'];
$requirement_failures = array();
foreach($pluggroups AS $pluggroup => $groupstack) {
if (empty($pluggroup)) {
?>
<tr>
<td colspan="2" class="serendipity_pluginlist_header">
<form action="serendipity_admin.php" method="get">
<?php echo serendipity_setFormToken(); ?>
<input type="hidden" name="serendipity[adminModule]" value="plugins" />
<input type="hidden" name="serendipity[adminAction]" value="addnew" />
<input type="hidden" name="serendipity[type]" value="<?php echo htmlspecialchars($serendipity['GET']['type']); ?>" />
<?php echo FILTERS; ?>: <select name="serendipity[only_group]">
<?php foreach((array)$available_groups AS $available_group) {
?>
<option value="<?php echo $available_group; ?>" <?php echo ($serendipity['GET']['only_group'] == $available_group ? 'selected="selected"' : ''); ?>><?php echo serendipity_groupname($available_group); ?>
<?php } ?>
<option value="ALL" <?php echo ($serendipity['GET']['only_group'] == 'ALL' ? 'selected="selected"' : ''); ?>><?php echo ALL_CATEGORIES; ?>
<option value="UPGRADE" <?php echo ($serendipity['GET']['only_group'] == 'UPGRADE' ? 'selected="selected"' : ''); ?>><?php echo WORD_NEW; ?>
</select>
<input class="serendipityPrettyButton input_button" type="submit" value="<?php echo GO; ?>" />
</form>
</td>
</tr>
<?php
if (!empty($serendipity['GET']['only_group'])) {
continue;
}
} elseif (!empty($serendipity['GET']['only_group']) && $pluggroup != $serendipity['GET']['only_group']) {
continue;
} else {
?>
<tr>
<td colspan="2" class="serendipity_pluginlist_section"><strong><?php echo serendipity_groupname($pluggroup); ?></strong></td>
</tr>
<?php
}
?>
<tr>
<td><strong>Plugin</strong></td>
<td width="100" align="center"><strong>Action</strong></td>
</tr>
<?php
foreach ($groupstack as $plug) {
$jsLine = " onmouseout=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='';\"";
$jsLine .= " onmouseover=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='serendipity_PluginAdminHighlight';\"";
$pluginInfo = $notice = array();
if (!empty($plug['author'])) {
$pluginInfo[] = AUTHOR . ': ' . $plug['author'];
}
if (!empty($plug['version'])) {
$pluginInfo[] = VERSION . ': ' . $plug['version'];
}
if (!empty($plug['website'])) {
$pluginInfo[] = '<a href="' . htmlspecialchars($plug['website']) . '">' . PLUGIN_DOCUMENTATION . '</a>';
}
if (!empty($plug['local_documentation'])) {
$pluginInfo[] = '<a href="' . htmlspecialchars($plug['local_documentation']) . '">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>';
}
if (!empty($plug['changelog'])) {
$pluginInfo[] = '<a href="' . htmlspecialchars($plug['changelog']) . '">' . PLUGIN_DOCUMENTATION_CHANGELOG . '</a>';
}
if (!empty($plug['upgrade_version']) && $plug['upgrade_version'] != $plug['version']) {
$pluginInfo[] = sprintf(UPGRADE_TO_VERSION, $plug['upgrade_version']);
}
if (!empty($plug['pluginlocation']) && $plug['pluginlocation'] != 'local') {
$pluginInfo[] = '(' . htmlspecialchars($plug['pluginlocation']) . ')';
$installimage = serendipity_getTemplateFile('admin/img/install_now_' . strtolower($plug['pluginlocation']) . '.png');
} else {
$installimage = serendipity_getTemplateFile('admin/img/install_now.png');
}
if (!isset($plug['customURI'])) {
$plug['customURI'] = '';
}
if ( !empty($plug['requirements']['serendipity']) && version_compare($plug['requirements']['serendipity'], serendipity_getCoreVersion($serendipity['version']), '>') ) {
$requirement_failures[$plug['class_name']] = array("s9y" => true);
$notice['requirements_failures'][] = 's9y ' . $plug['requirements']['serendipity'];
}
if ( !empty($plug['requirements']['php']) && version_compare($plug['requirements']['php'], phpversion(), '>') ) {
if (isset($requirement_failures[$plug['class_name']])) {
$requirement_failures[$plug['class_name']] = array_merge($requirement_failures[$plug['class_name']] , array("php" => true));
} else {
$requirement_failures[$plug['class_name']] = array("php" => true);
}
$notice['requirements_failures'][] = 'PHP ' . $plug['requirements']['php'];
}
/* Enable after Smarty 2.6.7 upgrade.
* TODO: How can we get current Smarty version here? $smarty is not created!
if ( !empty($plug['requirements']['smarty']) && version_compare($plug['requirements']['smarty'], '2.6.7', '>') ) {
if (isset($requirement_failures[$plug['class_name']])) {
$requirement_failures[$plug['class_name']] = array_merge($requirement_failures[$plug['class_name']] , array("smarty" => true));
} else {
$requirement_failures[$plug['class_name']] = array("smarty" => true);
}
$notice['requirements_failures'][] = 'Smarty: ' . $plug['requirements']['smarty'];
}
*/
if (count($notice['requirements_failures']) > 0) {
$plug['requirements_fail'] = true;
}
?>
<tr id="serendipity_plugin_<?php echo $plug['class_name']; ?>">
<td colspan="2" <?php echo $jsLine ?>>
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td><strong><?php echo $plug['name'] ?></strong></td>
<td width="100" align="center" valign="middle" rowspan="3">
<?php if ( $plug['requirements_fail'] == true ) { ?>
<span style="color: #cccccc"><?php printf(UNMET_REQUIREMENTS, implode(', ', $notice['requirements_failures'])); ?></span>
<?php } elseif ( $plug['upgradable'] == true ) { ?>
<a href="?serendipity[adminModule]=plugins&amp;serendipity[pluginPath]=<?php echo $plug['pluginPath']; ?>&amp;serendipity[install_plugin]=<?php echo $plug['plugin_class'] . $plug['customURI'] ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/upgrade_now.png') ?>" title="<?php echo UPGRADE ?>" alt="<?php echo UPGRADE ?>" border="0" /></a>
<?php } elseif ($plug['installable'] == true) { ?>
<a href="?serendipity[adminModule]=plugins&amp;serendipity[pluginPath]=<?php echo $plug['pluginPath']; ?>&amp;serendipity[install_plugin]=<?php echo $plug['plugin_class'] . $plug['customURI'] ?>"><img src="<?php echo $installimage ?>" title="<?php echo INSTALL ?>" alt="<?php echo INSTALL ?>" border="0" /></a>
<?php } else { ?>
<span style="color: #cccccc"><?php echo ALREADY_INSTALLED ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td style="padding-left: 10px"><?php echo $plug['description'] ?></td>
</tr>
<?php if (count($pluginInfo) > 0) { ?>
<tr>
<td style="padding-left: 10px; font-size: x-small">(<?php echo $plug['class_name']; ?>) <?php echo implode('; ', $pluginInfo); ?></td>
</tr>
<?php } ?>
</table>
</td>
</tr>
<?php
}
}
$data['requirements_failues'] = $requirement_failures;
?>
<tr>
<td colspan="2" align="right"><?php printf(PLUGIN_AVAILABLE_COUNT, count($pluginstack)); ?></td>
</tr>
</table>
<?php
} else {
/* show general plugin list */
@ -372,8 +513,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
/* Load the new plugin */
$plugin = &serendipity_plugin_api::load_plugin($inst);
if (!is_object($plugin)) {
echo "<dl><dt>DEBUG: Plugin $inst not an object: " . print_r($plugin, true) . ".</dt><dd>Input: " . print_r($serendipity['GET'], true) . ".</dd><dd>This error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)</dd>";
echo "<dt>Backtrace:</dt><dd>" . implode("<br />\n", $serendipity['debug']['pluginload']) . "<br /></dd></dl>";
echo "DEBUG: Plugin $inst not an object: " . print_r($plugin, true) . ".<br />Input: " . print_r($serendipity['GET'], true) . ".<br /><br />\n\nThis error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)<br />\n";
echo "Backtrace:<br />\n" . implode("<br />\n", $serendipity['debug']['pluginload']) . "<br />";
}
$bag = new serendipity_property_bag;
$plugin->introspect($bag);
@ -401,51 +542,42 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
}
}
}
if (isset($_POST['SAVE'])) {
$data['save'] = true;
$data['timestamp'] = serendipity_strftime('%H:%M:%S');
}
?>
<?php if (isset($_POST['SAVE'])) { ?>
<div class="serendipityAdminMsgSuccess"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_success.png'); ?>" alt="" /><?php echo DONE .': '. sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')); ?></div>
<?php } ?>
<div><?php echo BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS ?></div>
<?php
if (!isset($serendipity['eyecandy']) || serendipity_db_bool($serendipity['eyecandy'])) {
$data['eyecandy'] = true;
echo '<script src="' . serendipity_getTemplateFile('dragdrop.js') . '" type="text/javascript"></script>';
echo '<div class="warning js_warning"><em>' . PREFERENCE_USE_JS_WARNING . '</em></div>';
}
serendipity_plugin_api::hook_event("backend_pluginlisting_header" ,$eyecandy);
serendipity_plugin_api::hook_event('backend_pluginlisting_header', $serendipity['eyecandy']);
?>
<br />
ob_start();
serendipity_plugin_api::hook_event('backend_plugins_sidebar_header', $serendipity);
$data['backend_plugins_sidebar_header'] = ob_get_contents();
ob_end_clean();
<h3><?php echo SIDEBAR_PLUGINS ?></h3>
<a href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/install.png') ?>" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" /><?php echo sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, SIDEBAR_PLUGIN) ?></a>
<?php serendipity_plugin_api::hook_event('backend_plugins_sidebar_header', $serendipity); ?>
<?php show_plugins(false, $sidebars); ?>
ob_start();
show_plugins(false, $sidebars);
$data['sidebar_plugins'] = ob_get_contents();
ob_end_clean();
<br />
<br />
ob_start();
serendipity_plugin_api::hook_event('backend_plugins_event_header', $serendipity);
$data['backend_plugins_event_header'] = ob_get_contents();
ob_end_clean();
<h3><?php echo EVENT_PLUGINS ?></h3>
<a href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew&amp;serendipity[type]=event" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/install.png') ?>" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" /><?php echo sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, EVENT_PLUGIN) ?></a>
<?php serendipity_plugin_api::hook_event('backend_plugins_event_header', $serendipity); ?>
<?php show_plugins(true); ?>
ob_start();
show_plugins(true);
$data['event_plugins'] = ob_get_contents();
ob_end_clean();
if (count($serendipity['memSnaps']) > 0) {
$data['$memsnaps'] = $serendipity['memSnaps'];
}
<?php if (count($serendipity['memSnaps']) > 0) { ?>
<h3>Memory Usage</h3>
<div>
<pre><?php print_r($serendipity['memSnaps']); ?></pre>
</div>
<?php } ?>
<?php
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/plugins.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -56,8 +56,6 @@ class template_option {
}
}
$data = array();
if ($serendipity['GET']['adminAction'] == 'install' ) {
serendipity_plugin_api::hook_event('backend_templates_fetchtemplate', $serendipity);
@ -66,17 +64,16 @@ if ($serendipity['GET']['adminAction'] == 'install' ) {
serendipity_set_config_var('template', htmlspecialchars($serendipity['GET']['theme']));
serendipity_set_config_var('template_engine', isset($themeInfo['engine']) ? $themeInfo['engine'] : 'default');
$data["adminAction"] = "install";
$data["install_template"] = htmlspecialchars($serendipity['GET']['theme']);
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . sprintf(TEMPLATE_SET, htmlspecialchars($serendipity['GET']['theme'])) .'</div>';
}
?>
<?php
if ( @file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] .'/layout.php') ) {
$data["deprecated"] = true;
echo '<div class="serendipityAdminMsgNote"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_note.png') . '" alt="" />'. WARNING_TEMPLATE_DEPRECATED .'</div>';
}
$data["cur_template"] = $serendipity['template'];
echo '<h3>' . STYLE_OPTIONS . ' (' . $serendipity['template'] . ')</h3>';
if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php')) {
serendipity_smarty_init();
include_once $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php';
@ -84,7 +81,6 @@ if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] .
if (is_array($template_config)) {
serendipity_plugin_api::hook_event('backend_templates_configuration_top', $template_config);
$data["has_config"] = true;
if ($serendipity['POST']['adminAction'] == 'configure' && serendipity_checkFormToken()) {
$storage = new template_option();
@ -92,11 +88,13 @@ if (is_array($template_config)) {
foreach($serendipity['POST']['template'] AS $option => $value) {
$storage->set_config($option, $value);
}
$data["adminAction"] = "configure";
$data["save_time"] = sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S'));
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . DONE .': '. sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')) . '</div>';
}
$data["form_token"] = serendipity_setFormToken();
echo '<form method="post" action="serendipity_admin.php">';
echo '<input type="hidden" name="serendipity[adminModule]" value="templates" />';
echo '<input type="hidden" name="serendipity[adminAction]" value="configure" />';
echo serendipity_setFormToken();
include S9Y_INCLUDE_PATH . 'include/functions_plugins_admin.inc.php';
@ -106,7 +104,6 @@ if (is_array($template_config)) {
$template_options->import($template_config);
$template_options->values =& $template_vars;
ob_start();
serendipity_plugin_config(
$template_options,
$template_vars,
@ -120,62 +117,100 @@ if (is_array($template_config)) {
'template',
$template_config_groups
);
$data["configuration"] = ob_get_contents();
ob_end_clean();
echo '</form><br />';
serendipity_plugin_api::hook_event('backend_templates_configuration_bottom', $template_config);
} else {
echo '<p>' . STYLE_OPTIONS_NONE . '</p>';
serendipity_plugin_api::hook_event('backend_templates_configuration_none', $template_config);
}
echo '<h3>' . SELECT_TEMPLATE . '</h3>';
?>
<br />
<?php
$i = 0;
$stack = array();
serendipity_plugin_api::hook_event('backend_templates_fetchlist', $stack);
$themes = serendipity_fetchTemplates();
$data['templates'] = array();
$data['templates'][$theme] = array();
foreach($themes AS $theme) {
$stack[$theme] = serendipity_fetchTemplateInfo($theme);
}
ksort($stack);
foreach ($stack as $theme => $info) {
$data['templates'][$theme]['info'] = $info;
$i++;
/* Sorry, but we don't display engines */
if ( strtolower($info['engine']) == 'yes' ) {
continue;
}
$preview = '';
$preview_link = false;
if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg')) {
$data['templates'][$theme]['fullsize_preview'] = $serendipity['baseURL'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg';
$preview .= '<a href="' . $serendipity['baseURL'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg" target="_blank">';
$preview_link = true;
} elseif (!empty($info['preview_fullsizeURL'])) {
$data['templates'][$theme]['fullsize_preview'] = $info['preview_fullsizeURL'];
$preview .= '<a href="' . $info['preview_fullsizeURL'] . '" target="_blank">';
$preview_link = true;
# } else {
# echo "No large preview";
}
if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview.png')) {
$data['templates'][$theme]['preview'] = $serendipity['templatePath'] . $theme . '/preview.png';
$preview .= '<img src="' . $serendipity['templatePath'] . $theme . '/preview.png" width="100" style="border: 1px #000000 solid" />';
} elseif (!empty($info['previewURL'])) {
$data['templates'][$theme]['preview'] = $info['previewURL'] ;
$preview .= '<img src="' . $info['previewURL'] . '" width="100" style="border: 1px #000000 solid" />';
} else {
$preview .= '&nbsp;';
}
if ($preview_link) {
$preview .= '</a>';
}
if (empty($info['customURI'])) {
$info['customURI'] = '';
}
$unmetRequirements = array();
if ( isset($info['require serendipity']) && version_compare($info['require serendipity'], serendipity_getCoreVersion($serendipity['version']), '>') ) {
$unmetRequirements[] = 'Serendipity '. $info['require serendipity'];
$data['templates'][$theme]['unmetRequirements'] = sprintf(UNMET_REQUIREMENTS, implode(', ', $unmetRequirements));
}
/* TODO: Smarty versioncheck */
$class = (($i % 2 == 0) ? 'even' : 'uneven');
?>
<div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo $class ?>">
<table width="100%" id="serendipity_theme_<?php echo $theme; ?>">
<tr>
<td colspan="2"><span class="serendipityTemplateSelectName"><strong><?php echo $info['name']; ?></strong></span></td>
<td valign="middle" align="center" width="70" rowspan="2">
<?php
if ( $serendipity['template'] != $theme ) {
if ( !sizeof($unmetRequirements) ) {
?>
<a href="?serendipity[adminModule]=templates&amp;serendipity[adminAction]=install&amp;serendipity[theme]=<?php echo $theme . $info['customURI']; ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/install_now' . $info['customIcon'] . '.png') ?>" alt="<?php echo SET_AS_TEMPLATE ?>" title="<?php echo SET_AS_TEMPLATE ?>" border="0" /></a>
<?php } else { ?>
<span class="serendipityTemplateSelectUnmetRequirements" style="color: #cccccc"><?php echo sprintf(UNMET_REQUIREMENTS, implode(', ', $unmetRequirements)); ?></span>
<?php
}
} ?>
</td>
</tr>
<tr>
<td width="100" style="padding-left: 10px"><?php echo $preview; ?></td>
<td valign="top">
<span class="serendipityTemplateSelectDetails"><?php echo AUTHOR; ?>: <?php echo $info['author'];?></span><br />
<span class="serendipityTemplateSelectDetails"><?php echo LAST_UPDATED; ?>: <?php echo $info['date']; ?></span><br />
<span class="serendipityTemplateSelectDetails"><?php echo CUSTOM_ADMIN_INTERFACE; ?>: <?php echo $info['custom_admin_interface']; ?></span><br />
</td>
</tr>
</table>
</div>
<?php
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/templates.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -1,161 +0,0 @@
{* HTML5: Yes *}
{* jQuery: No *}
{if $post_save}
{if $new}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.CATEGORY_SAVED}</span>
{/if}
{if $edit}
{if isset($editPermission) && $editPermission == false}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.PERM_DENIED}</span>
{else}
{if $subcat}{$subcat}{else}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.CATEGORY_SAVED}</span>
{/if}
{/if}
{/if}
{/if}
{if $doDelete}
{if $deleteSuccess}
<span class="msg_success"><span class="icon-ok-circle"></span> {if $remainingCat}{$CONST.CATEGORY_DELETED_ARTICLES_MOVED|sprintf:$remainingCat:$cid}{else}{$cid|string_format:"{$CONST.CATEGORY_DELETED}"}{/if}</span>
{else}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.INVALID_CATEGORY}</span>
{/if}
{/if}
{if $delete}
{if $deletePermission == true}
<h2>{$categoryName|escape:"html"}</h2>
<form method="POST" name="serendipityCategory" action="?serendipity[adminModule]=category&amp;serendipity[adminAction]=doDelete&amp;serendipity[cid]={$cid}">
{$formToken}
<div class="form_select">
<label for="remaining_cat">{$CONST.CATEGORY_REMAINING}:</label>
<select id="remaining_cat" name="serendipity[cat][remaining_catid]">
<option value="0">{$CONST.NO_CATEGORY}</option>
{foreach $cats as $cat_data}
<option value="{$cat_data.categoryid}">{$cat_data.category_name|escape:"html"}</option>
{/foreach}
</select>
</div>
<input name="REMOVE" type="submit" value="{$CONST.GO}">
</form>
{/if}
{/if}
{if (! $post_save) && ($edit || $new)}
{if $edit}
<h2>{$category_name|escape:"html"|string_format:"{$CONST.EDIT_THIS_CAT}"}</h2>
{/if}
<form id="serendipity_category" method="POST" name="serendipityCategory">
{$formToken}
<div class="form_field">
<label for="category_name">{$CONST.NAME}</label>
<input id="category_name" name="serendipity[cat][name]" type="text" value="{$this_cat.category_name|default:""|escape:"html"}">
</div>
<div class="form_field">
<label for="category_description">{$CONST.DESCRIPTION}</label>
<input id="category_description" name="serendipity[cat][description]" type="text" value="{$this_cat.category_description|default:""|escape:"html"}">
</div>
<div class="form_field">
<label for="category_icon">{$CONST.IMAGE}</label>
{* TODO: this should probably become/fallback to input[type=file] *}
<input id="category_icon" name="serendipity[cat][icon]" type="text" value="{$this_cat.category_icon|default:""|escape:"html"}" onchange="document.getElementById('imagepreview').src = this.value; document.getElementById('imagepreview').style.display = '';">
<script>
var category_icon = document.getElementById('category_icon');
var imgBtn = document.createElement('div');
imgBtn.id = "insert_image";
imgBtn.innerHTML = '<input type="button" name="insImage" value="{$CONST.IMAGE}" onclick="window.open(\'serendipity_admin_image_selector.php?serendipity[htmltarget]=category_icon&amp;serendipity[filename_only]=true\', \'ImageSel\', \'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1\');">';
category_icon.parentNode.insertBefore(imgBtn, category_icon.nextSibling);
</script>
<!-- noscript>FIXXME: Emit a warning if JS is disabled</noscript -->
</div>
<figure id="preview">
<figcaption>{$CONST.PREVIEW}</figcaption>
<img id="imagepreview" src="{$this_cat.category_icon|default:""|escape:"html"}" alt="">
</figure>
<div class="form_multiselect">
<label for="read_authors">{$CONST.PERM_READ}</label>
<select id="read_authors" size="6" multiple name="serendipity[cat][read_authors][]">
<option value="0"{if $selectAllReadAuthors} selected{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups as $group}
<option value="{$group.confkey}"{if isset($read_groups.{$group.confkey})} selected{/if} >{$group.confvalue|escape:"html"}</option>
{/foreach}
</select>
</div>
<div class="form_multiselect">
<label for="write_authors">{$CONST.PERM_WRITE}</label>
<select id="write_authors"size="6" multiple name="serendipity[cat][write_authors][]">
<option value="0"{if $selectAllReadAuthors} selected{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups as $group}
<option value="{$group.confkey}"{if isset($read_groups.{$group.confkey})} selected{/if}>{$group.confvalue|escape:"html"}</option>
{/foreach}
</select>
</div>
<div class="form_select">
<label for="parent_cat">{$CONST.PARENT_CATEGORY}</label>
<select id="parent_cat" name="serendipity[cat][parent_cat]">
<option value="0"{if $cid == 0} selected{/if}>{$CONST.NO_CATEGORY}</option>
{foreach $categories as $cat}
{if $cat.categoryid == $cid}{continue}{/if}
<option value="{$cat.categoryid}"{if $this_cat.parentid == $cat.categoryid} selected{/if}>{for $i=1 to $cat.depth}&nbsp{/for} {$cat.category_name}</option>
{/foreach}
</select>
</div>
<fieldset>
<legend><span>{$CONST.CATEGORY_HIDE_SUB}</span></legend>
<p>{$CONST.CATEGORY_HIDE_SUB_DESC}</p>
<div class="clearfix">
<div class="form_radio">
<input id="hide_sub_yes" name="serendipity[cat][hide_sub]" type="radio" value="1"{if $this_cat.hide_sub== 1} checked="checked"{/if}>
<label for="hide_sub_yes">{$CONST.YES}</label>
</div>
<div class="form_radio">
<input id="hide_sub_no" name="serendipity[cat][hide_sub]" type="radio" value="0"{if $this_cat.hide_sub == 0} checked="checked"{/if}>
<label for="hide_sub_no">{$CONST.NO}</label>
</div>
</div>
</fieldset>
<input name="SAVE" type="submit" value="{$save}">
</form>
<script src="serendipity_editor.js"></script>
{/if}
{if $view}
<h2>{$CONST.CATEGORY_INDEX}:</h2>
{if is_array($viewCats)}
<ul id="categories" class="plainList">
{foreach $viewCategories as $category}
{* TODO: Ideally, this should use true nesting, i.e. nested lists instead of a level class. *}
<li class="clearfix level_{$category.depth}">
<details class="category_data">
<summary class="category_name{if $category.category_icon} category_hasicon{/if}"><span class="icon-folder-open"></span> {$category.category_name|escape:"html"}</summary>
<div class="category_info clearfix">
{if $category.category_description != ''}
<span class="category_desc">{$category.category_description|escape:"html"}</span>
{/if}
<span class="category_author">{if $category.authorid == 0}{$CONST.ALL_AUTHORS}{else}{$category.realname|escape:"html"}{/if}</span>
</div>
</details>
<ul class="plainList edit_actions">
<li><a class="icon_link" href="?serendipity[adminModule]=category&amp;serendipity[adminAction]=edit&amp;serendipity[cid]={$category.categoryid}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
<li><a class="icon_link" href="?serendipity[adminModule]=category&amp;serendipity[adminAction]=delete&amp;serendipity[cid]={$category.categoryid}" title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
</ul>
</li>
{/foreach}
</ul>
{else}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.NO_CATEGORIES}</span>
{/if}
<a class="link_create" href="?serendipity[adminModule]=category&serendipity[adminAction]=new">{$CONST.CREATE_NEW_CAT}</a>
{/if}

View File

@ -1,178 +0,0 @@
{* HTML5: Yes *}
{* jQuery: No *}
{if !empty($errormsg)}
<span class="msg_error"><span class="attention"></span> {$errormsg}</span>
{/if}
<script type="text/javascript">
var view_full = '{$CONST.VIEW_FULL}';
var view_hide = '{$CONST.HIDE}';
</script>
<script src="serendipity_editor.js"></script>
<h2>{$CONST.COMMENTS}</h2>
<form action="" method="GET">
{$formtoken}
<input name="serendipity[adminModule]" type="hidden" value="comments">
<input name="serendipity[page]" type="hidden" value="{$page}">
<fieldset id="filter_comments">
<legend><span>{$CONST.FILTERS} ({$CONST.FIND_COMMENTS})</span></legend>
<div class="clearfix">
<div class="form_field">
<label for="filter_author">{$CONST.AUTHOR}</label>
<input id="filter_author" name="serendipity[filter][author]" type="text" value="{$get.filter.author|escape}">
</div>
<div class="form_field">
<label for="filter_email">{$CONST.EMAIL}</label>
<input id="filter_email" name="serendipity[filter][email]" type="text" value="{$get.filter.email|escape}">
</div>
<div class="form_field">
<label for="filter_url">{$CONST.URL}</label>
<input id="filter_url" name="serendipity[filter][url]" type="text" value="{$get.filter.url|escape}">
</div>
<div class="form_field">
<label for="filter_ip">IP</label>
<input id="filter_ip" name="serendipity[filter][ip]" type="text" value="{$get.filter.ip|escape}">
</div>
<div class="form_field">
<label for="filter_body">{$CONST.CONTENT}</label>
<input id="filter_body" name="serendipity[filter][body]" type="text" value="{$get.filter.body|escape}">
</div>
<div class="form_field">
<label for="filter_referer">{$CONST.REFERER}</label>
<input id="filter_referer" name="serendipity[filter][referer]" type="text" value="{$get.filter.referer|escape}">
</div>
<div class="form_select">
<label for="filter_perpage">{$CONST.COMMENTS}</label>
<select id="filter_perpage" name="serendipity[filter][perpage]">
{foreach $filter_vals AS $filter}
<option value="{$filter}" {($commentsPerPage == $filter) ? ' selected' : ''}>{$filter}</option>
{/foreach}
</select>
</div>
<div class="form_select">
<label for="filter_show">{$CONST.COMMENTS_FILTER_SHOW}</label>
<select id="filter_show" name="serendipity[filter][show]">
<option value="all"{if $get.filter.show == 'all'} selected{/if}>{$CONST.COMMENTS_FILTER_ALL}</option>
<option value="approved"{if $get.filter.show == 'approved'} selected{/if}>{$CONST.COMMENTS_FILTER_APPROVED_ONLY}</option>
<option value="pending"{if $get.filter.show == 'pending'} selected{/if}>{$CONST.COMMENTS_FILTER_NEED_APPROVAL}</option>
<option value="confirm"{if $get.filter.show == 'confirm'} selected{/if}>{$CONST.COMMENTS_FILTER_NEED_CONFIRM}</option>
</select>
</div>
<div class="form_select">
<label for="filter_type">{$CONST.TYPE}</label>
<select id="filter_type" name="serendipity[filter][type]">
<option value="">{$CONST.COMMENTS_FILTER_ALL}</option>
<option value="NORMAL"{if $c_type == 'NORMAL'} selected{/if}>{$CONST.COMMENTS}</option>
<option value="TRACKBACK"{if $c_type == 'TRACKBACK'} selected{/if}>{$CONST.TRACKBACKS}</option>
<option value="PINGBACK"{if $c_type == 'PINGBACK'} selected{/if}>{$CONST.PINGBACKS}</option>
</select>
</div>
</div>
</fieldset>
<div class="form_buttons">
<input name="submit" type="submit" value="{$CONST.GO}">
{serendipity_hookPlugin hookAll=true hook="backend_comments_top" addData=$sql}
</div>
</form>
{if !is_array($sql)}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.NO_COMMENTS}</span>
<a class="block_level" href="serendipity_admin.php?serendipity[adminModule]=comments">Return to default comment list</a> {* l18n *}
{else}
<form id="formMultiDelete" action="" method="POST" name="formMultiDelete">
{$formtoken}
<input name="serendipity[formAction]" type="hidden" value="multiDelete">
<h3>{$CONST.PAGE_BROWSE_COMMENTS|sprintf:$page:$pages:$totalComments}</h3>
{if ($page != 1 && $page <= $pages)||$page != $pages}
<nav class="pagination">
<h4 class="visuallyhidden">Comments pagination</h4> {* i18n *}
<ul class="clearfix">
{if ($page != 1 && $page <= $pages)}
<li><a class="icon_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-circled"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a></li>
{/if}
{if $page != $pages}
<li><a class="icon_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="icon-right-circled"></span><span class="visuallyhidden"> {$CONST.NEXT}</span></a></li>
{/if}
</ul>
</nav>
{/if}
{if is_array($comments)}
<ul id="serendipity_comments_list" class="clearfix plainList">
{foreach $comments AS $comment}
<li class="clearfix">
<div class="form_check">
<input id="serendipity_multidelete_comment_{$comment.id}" type="checkbox" name="serendipity[delete][{$comment.id}]" value="{$comment.entry_id}" onclick="highlightComment('comment_{$comment.id}', this.checked)" tabindex="{$i}">
<label for="serendipity_multidelete_comment_{$comment.id}" class="visuallyhidden">Multiselect this comment</label> {* i18n *}
</div>
<h4 id="c{$comment.id}">{($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id}, {$CONST.IN_REPLY_TO} <a href="{$comment.entry_url}">{$comment.title|escape}</a> {$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'}</h4>
<div id="comment_{$comment.id}">
<dl class="comment_data clearfix">
<dt>{$CONST.AUTHOR}:</dt>
<dd>{$comment.author|escape|truncate:30:"&hellip;"} {$comment.action_author}</dd>
<dt>{$CONST.EMAIL}:</dt>
<dd>{if empty($comment.email)}N/A{else}<a href="mailto:{$comment.email|escape}" title="{$comment.email|escape}">{$comment.email|escape|truncate:30:"&hellip;"}</a>{if $comment.subscribed == 'true'} <span class="serendipity_subscription_on">({$CONST.ACTIVE_COMMENT_SUBSCRIPTION})</span>{/if}{/if}</dd>
{* TODO: This should not emit an img *}
<dd class="action_email">{$comment.action_email}</dd>
<dt>IP:</dt>
<dd>{if empty($comment.ip)}N/A{else}{$comment.ip|escape}{/if}</dd>
{* TODO: This should not emit an img *}
<dd class="action_ip">{$comment.action_ip}</dd>
<dt>{$CONST.URL}:</dt>
<dd>{if empty($comment.url)}N/A{else}<a class="icon_link" href="{$comment.url|escape}" title="{$comment.url|escape}"><span class="icon-link"></span> {$comment.url|escape|truncate:30:"&hellip;"}</a> {/if}</dd>
<dd class="action_url">{$comment.action_url}</dd>
<dt>{$CONST.REFERER}:</dt>
<dd>{if empty($comment.referer)}N/A{else}<a class="icon_link" href="{$comment.referer|escape}" title="{$comment.referer|escape}"><span class="icon-link"></span> {$comment.referer|escape|truncate:30:"&hellip;"}</a>{/if}</dd>
<dd class="action_referer">{$comment.action_referer}</dd>
</dl>
<div id="{$comment.id}_summary" class="comment_summary">{$comment.fullBody|truncate:120:"&hellip;"}</div>
<div id="{$comment.id}_full" class="comment_full hidden">{$comment.fullBody}</div>
<ul class="actions clearfix">
{if ($comment.status == 'pending') || ($comment.status == 'confirm')}
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=approve&amp;serendipity[id]={$comment.id}&amp;{$urltoken}" title="{$CONST.APPROVE}"><span class="icon-lock-open"></span><span class="visuallyhidden">{$CONST.APPROVE}</span></a></li>
{/if}
{if ($comment.status == 'approved')}
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=pending&amp;serendipity[id]={$comment.id}&amp;{$urltoken}" title="{$CONST.SET_TO_MODERATED}"><span class="icon-lock"></span><span class="visuallyhidden"> {$CONST.SET_TO_MODERATED}</span></a></li>
{/if}
{if $comment.excerpt}
<li><a class="icon_link" href="#c{$comment.id}" onclick="FT_toggle({$comment.id}); return false;" title="{$CONST.TOGGLE_ALL}"><span id="{$comment.id}_text">{$CONST.TOGGLE_ALL}</span></a></li>
{/if}
<li><a class="icon_link" href="{$comment.entrylink}" title="{$CONST.VIEW}"><span class="icon-eye"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li>
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;{$urltoken}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=delete&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;{$urltoken}" onclick='return confirm("{($CONST.COMMENT_DELETE_CONFIRM|sprintf:$comment.id:$comment.author)|escape}")' title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
<li><a class="icon_link" onclick="cf = window.open(this.href, 'CommentForm', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1'); cf.focus(); return false;" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=reply&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;serendipity[noBanner]=true&amp;serendipity[noSidebar]=true&amp;{$urltoken}" title="{$CONST.REPLY}"><span class="icon-chat"></span><span class="visuallyhidden"> {$CONST.REPLY}</span></a></li>
</ul>
{$comment.action_more}
</div>
</li>
{/foreach}
</ul>
{/if}
<div class="multidelete_actions form_buttons">
<input name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}" onclick="invertSelection()">
<input name="toggle" type="submit" value="{$CONST.DELETE_SELECTED_COMMENTS}" onclick="return confirm('{$CONST.COMMENTS_DELETE_CONFIRM}')" tabindex="{($i+1)}">
<input name="serendipity[togglemoderate]" type="submit" value="{$CONST.MODERATE_SELECTED_COMMENTS}">
</div>
{* TODO: Clone pagination using JS *}
</form>
{/if}

View File

@ -1,25 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $installAction == 'check'}
{if $diagnosticError}
<h2>{$CONST.DIAGNOSTIC_ERROR}</h2>
{foreach $res as $r}
<span class="msg_error"><span class="icon-attention"></span> {$r}</span>
{/foreach}
{else}
{if $htaccessRewrite}
<h2>{$CONST.ATTEMPT_WRITE_FILE|sprintf:"{$serendipityPath}htaccess"}</h2>
{if is_array($res)}
{foreach $res as $r}
<span class="msg_notice"><span class="icon-info-circle"></span> {$r}</span>
{/foreach}
{else}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.DONE}</span>
{/if}
{/if}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.WRITTEN_N_SAVED}</span>
{/if}
{else}
{$config}
{/if}

View File

@ -1,206 +0,0 @@
{* HTML5: Yes *}
{* jQuery: No *}
{if $drawList}
<form action="?" method="get">
<input name="serendipity[action]" type="hidden" value="admin">
<input name="serendipity[adminModule]" type="hidden" value="entries">
<input name="serendipity[adminAction]" type="hidden" value="editSelect">
<fieldset id="filter_entries">
<legend><span>{$CONST.FILTERS} ({$CONST.FIND_ENTRIES})</span></legend>
<div class="clearfix">
<div class="form_select">
<label for="filter_author">{$CONST.AUTHOR}</label>
<select id="filter_author" name="serendipity[filter][author]">
<option value="">-</option>
{if is_array($users)}
{foreach $users AS $user}
{if isset($user.artcount) && $user.artcount < 1}{continue}{/if}
<option value="{$user.authorid}" {(isset($get.filter.author) && ($get.filter.author == $user.authorid)) ? 'selected' : ''}>{$user.realname|escape}</option>
{/foreach}
{/if}
</select>
</div>
<div class="form_select">
<label for="filter_draft">Entry status</label> {* i18n *}
<select id="filter_draft" name="serendipity[filter][isdraft]">
<option value="all">{$CONST.COMMENTS_FILTER_ALL}</option>
<option value="draft" {(isset($get.filter.isdraft) && ($get.filter.isdraft == 'draft') ? 'selected' : '')}>{$CONST.DRAFT}</option>
<option value="publish" {(isset($get.filter.isdraft) && ($get.filter.isdraft == 'publish') ? 'selected' : '')}>{$CONST.PUBLISH}</option>
</select>
</div>
<div class="form_select">
<label for="filter_category">{$CONST.CATEGORY}</label>
<select id="filter_category" name="serendipity[filter][category]">
<option value="">-</option>
{foreach $categories as $cat}
<option value="{$cat.categoryid}"{($get.filter.category == $cat.categoryid) ? ' selected' : ''}>{'&nbsp;'|str_repeat:$cat.depth} {$cat.category_name|escape}</option>
{/foreach}
</select>
</div>
<div class="form_field">
<label for="filter_content">{$CONST.CONTENT}</label>
<input id="filter_content" name="serendipity[filter][body]" type="text" value="{(isset($get.filter.body)) ? "{$get.filter.body|escape}" : ''}">
</div>
</div>
</fieldset>
<fieldset id="sort_entries">
<legend><span>{$CONST.SORT_ORDER}</span></legend>
<div class="clearfix">
<div class="form_select">
<label for="sort_order">{$CONST.SORT_BY}</label>
<select id="sort_order" name="serendipity[sort][order]">
{foreach $sort_order as $so_key => $so_val}
<option value="{$so_key}" {(isset($get.sort.order) && ($get.sort.order == $so_key) ? 'selected': '')}>{$so_val}</option>
{/foreach}
</select>
</div>
<div class="form_select">
<label for="sort_ordermode">{$CONST.SORT_ORDER}</label>
<select id="sort_ordermode" name="serendipity[sort][ordermode]">
<option value="DESC" {(isset($get.sort.ordermode) && ($get.sort.ordermode == 'DESC') ? 'selected' : '')}>{$CONST.SORT_ORDER_DESC}</option>
<option value="ASC" {(isset($get.sort.ordermode) && ($get.sort.ordermode == 'ASC') ? 'selected' : '')}>{$CONST.SORT_ORDER_ASC}</option>
</select>
</div>
<div class="form_select">
<label for="sort_perpage">{$CONST.ENTRIES_PER_PAGE}</label>
<select id="sort_perpage" name="serendipity[sort][perPage]">
{foreach $per_page AS $per_page_nr}
<option value="{$per_page_nr}" {((isset($get.sort.perPage) && ($get.sort.perPage == $per_page_nr)) ? 'selected' : '')}> {$per_page_nr}</option>
{/foreach}
</select>
</div>
</div>
</fieldset>
<input name="go" type="submit" value="{$CONST.GO}">
</form>
{if $is_entries}
{if ($offSet > 0) || ($count > $perPage)}
<nav class="pagination">
<ul class="clearfix">
{if ($offSet > 0)}
<li><a class="icon_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-circled"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a></li>
{/if}
{if ($count > $perPage)}
<li><a class="icon_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="icon-right-circled"></span><span class="visuallyhidden"> {$CONST.NEXT}</span></a></li>
{/if}
</ul>
</nav>
{/if}
<script src="{serendipity_getFile file='admin/admin_scripts.js'}"></script>
<form id="formMultiDelete" action="?" method="post" name="formMultiDelete">
{$formtoken}
<input name="serendipity[action]" type="hidden" value="admin">
<input name="serendipity[adminModule]" type="hidden" value="entries">
<input name="serendipity[adminAction]" type="hidden" value="multidelete">
<ul id="entries_list" class="plainList">
{foreach $entries as $entry}
{if ($entry@index > $perPage)}{continue}{/if}
<li class="clearfix"><div class="form_check">
<input id="multidelete_entry{$entry.id}" name="serendipity[multiDelete][]" type="checkbox" value="{$entry.id}"><label for="multidelete_entry{$entry.id}" class="visuallyhidden">Select #{$entry_id} for multidelete</label> {* i18n *}
</div>
<h3><a href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$entry.id}" title="#{$entry.id}">{$entry.title|escape|truncate:50:"&hellip;"}</a></h3>
<div class="entry_status">
{if !$showFutureEntries && ($entry.timestamp >= $serverOffsetHour)}
<span class="status_future">{$CONST.ENTRY_PUBLISHED_FUTURE}</span>
{/if}
{if $entry.ep_is_sticky}
<span class="status_sticky">{$CONST.STICKY_POSTINGS}</span>
{/if}
{if $entry.isdraft}
<span class="status_draft">{$CONST.DRAFT}</span>
{/if}
<span class="status_timestamp">
{$entry.timestamp|@formatTime:"{$CONST.DATE_FORMAT_SHORT}"}{if $entry.timestamp <= ($entry.last_modified - 1800)} <a class="icon_link" href="#" title="{$CONST.LAST_UPDATED}: {$entry.last_modified|@formatTime:"{$CONST.DATE_FORMAT_SHORT}"}" onclick="alert(this.title)"><span class="icon-info-circle"></span><span class="visuallyhidden"> {$CONST.LAST_UPDATED}</span></a>{/if}
</span>
</div>
<span class="entry_meta">{$CONST.POSTED_BY} {$entry.author|escape}
{if count($entry.cats)} {$CONST.IN}
{foreach $entry.cats AS $cat}
{$cat}{if (count($entry.cats) > 1) && !$cat@last}, {/if}
{/foreach}
{/if}
</span>
<ul class="actions">
{if $entry.preview || (!$showFutureEntries && ($entry.timestamp >= $serverOffsetHour))}
<li><a class="icon_link" href="{$entry.preview_link}" title="{$CONST.PREVIEW} #{$entry.id}"><span class="icon-eye"></span><span class="visuallyhidden"> {$CONST.PREVIEW}</span></a></li>
{else}
<li><a class="icon_link" href="{$entry.archive_link}" title="{$CONST.VIEW} #{$entry.id}"><span class="icon-eye"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li>
{/if}
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$entry.id}" title="{$CONST.EDIT} #{$entry.id}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=delete&amp;serendipity[id]={$entry.id}&amp;{$urltoken}" title="{$CONST.DELETE} #{$entry.id}" title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
</ul>
</li>
{/foreach}
</ul>
{/if}
<div id="multidelete_tools" class="form_buttons">
<input name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}" onclick="invertSelection()">
<input name="toggle" type="submit" value="{$CONST.DELETE_SELECTED_ENTRIES}">
</div>
</form>
<form action="?" method="get">
<input name="serendipity[action]" type="hidden" value="admin">
<input name="serendipity[adminModule]" type="hidden" value="entries">
<input name="serendipity[adminAction]" type="hidden" value="editSelect">
<div id="entry_skip" class="form_field">
<label for="skipto_entry">{$CONST.EDIT_ENTRY} #</label>
<input id="skipto_entry" name="serendipity[id]" type="text" size="3">
</div>
<input name="serendipity[editSubmit]" type="submit" value="{$CONST.GO}">
</form>
{/if}
{if $no_entries}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.NO_ENTRIES_TO_PRINT}</span>
{/if}
{if $switched_output}
{if ($get.adminAction && $dateval)}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.DATE_INVALID}</span>
{/if}
{if ($get.adminAction && $use_legacy)}
{if $is_draft}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.IFRAME_SAVE_DRAFT}</span>
{/if}
{if $is_iframe}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.IFRAME_SAVE}</span>
{/if}
{if $is_iframepreview}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.IFRAME_PREVIEW}</span>
{/if}
{/if}
{if ($is_doDelete || $is_doMultiDelete )}
{foreach $del_entry AS $delent}
<span class="msg_dialogue"><span class="icon-help-circle"></span> {$delent}</span>
{/foreach}
{/if}
{if ( $is_delete || $is_multidelete )}
{foreach $rip_entry AS $ripent}
<span class="msg_dialogue"><span class="icon-help-circle"></span> {$ripent}</span>
{/foreach}
<ul class="dialogue_delrip plainList clearfix">
<li><a class="link_abort" href="{$smarty.server.HTTP_REFERER|escape}">{$CONST.NOT_REALLY}</a></li>
<li><a class="link_confirm" href="{$newLoc}">{$CONST.DUMP_IT}</a></li>
</ul>
{/if}
{/if}

View File

@ -1,4 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
<p><strong>{$CONST.WELCOME_BACK} {$smarty.session.serendipityUser|escape}</strong></p>

View File

@ -1,4 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
<span class="block_level standalone"><span class="icon-rss"></span> <a id="export_rss" href="{$serendipityBaseURL}rss.php?version=2.0&all=1">{$CONST.EXPORT_FEED}</a></span>

View File

@ -1,126 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $delete_yes}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.DELETED_GROUP|sprintf:"{$group_id|escape:"html"}":"{$group.name|escape:"html"}"}</span>
{/if}
{if $save_new}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.CREATED_GROUP|sprintf:"{$group_id|escape:"html"}":"{$group.name|escape:"html"}"}</span>
{/if}
{if $save_edit}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.MODIFIED_GROUP|sprintf:"{$name|escape:"html"}"}</span>
{/if}
{if !$delete}
<h2>{$CONST.GROUP}</h2>
<ul id="serendipity_groups" class="plainList">
{foreach $groups as $group}
<li class="clearfix">
<span class="group_name"><span class="icon-users"></span> {$group.name|escape:"html"}</span>
<ul class="plainList edit_actions">
<li><a class="icon_link" href="?serendipity[adminModule]=groups&amp;serendipity[adminAction]=edit&amp;serendipity[group]={$group.id}" title="{$CONST.EDIT} {$group.name|escape:"html"}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
<li><a class="icon_link" href="?{$deleteFormToken}&amp;serendipity[adminModule]=groups&amp;serendipity[adminAction]=delete&amp;serendipity[group]={$group.id}" title="{$CONST.DELETE} {$group.name|escape:"html"}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
</ul>
</li>
{/foreach}
</ul>
{if $start}
<form action="?serendipity[adminModule]=groups" method="post">
<input name="NEW" type="submit" value="{$CONST.CREATE_NEW_GROUP}">
</form>
{/if}
{/if}
{if $edit || $new}
<form action="?serendipity[adminModule]=groups" method="post">
{$formToken}
{if $edit}
<h3>{$CONST.EDIT}</h3>
<input name="serendipity[group]" type="hidden" value="{$from.id}">
{else}
<h3>{$CONST.CREATE}</h3>
{/if}
<div class="form_field">
<label for="group_name">{$CONST.NAME}</label>
{* BUG: Doesn't correctly pull the group name *}
<input id="group_name" name="serendipity[name]" type="text" value="{$from.name|escape:"html"}">
</div>
<div class="form_select">
<label for="group_members">{$CONST.USERCONF_GROUPS}</label>
<select id="group_members" name="serendipity[members][]" multiple size="5">
{foreach $allusers as $user}
<option value="{$user.authorid}" {if isset($selected.{$user.authorid})} selected{/if} >{$user.realname|escape:"html"}</option>
{/foreach}
</select>
</div>
{foreach $perms as $perm}
{* TODO: major rewrite *}
{if {{$perm@key}|truncate:"2":""} == 'f_'}{continue}{/if}
{if !isset($section)}
{$section=$perm@key}
{/if}
{if $section != {$perm@key} && {{$perm@key}|truncate:"{$section|count_characters}":""} == $section}
{$indent="&nbsp;&nbsp;"}
{else}
{if $section != {$perm@key}}
{$indent="<br>"}
{$section="{$perm@key}"}
{/if}
{/if}
{if !$perm.permission}
<div>
<span class="perm_name">{$indent} {$perm.permission_name|escape:"html"}</span>
<span class="perm_status">{(isset($from.{$perm@key}) && $from.{$perm@key} == "true") ? $CONST.YES : $CONST.NO}</span>
</div>
{else}
<div class="form_check">
{$indent} <label for="{{$perm@key}|escape:"html"}">{$perm.permission_name|escape:"html"}</label>
<input id="{{$perm@key}|escape:"html"}" name="serendipity[{{$perm@key}|escape:"html"}]" type="checkbox" value="true"{if isset({$from.{$perm@key}}) && {$from.{$perm@key}} == "true"} checked="checked"{/if}>
</div>
{/if}
{/foreach}
{if $enablePluginACL}
<div class="form_select">
<label for="forbidden_plugins">{$CONST.PERMISSION_FORBIDDEN_PLUGINS}</label>
<select id="forbidden_plugins" name="serendipity[forbidden_plugins][]" multiple size="5">
{foreach $allplugins as $plugin}
<option value="{{$plugin@key}|escape:"url"}{if $plugin.has_permission == false} selected{/if}">{$plugin.b->properties.name|escape:"html"}</option>
{/foreach}
</select>
</div>
<div class="form_select">
<label for="forbidden_hooks">{$CONST.PERMISSION_FORBIDDEN_HOOKS}</label>
<select name="serendipity[forbidden_hooks][]" multiple size="5">
{foreach $allhooks as $hook}
<option value="{{$hook@key}|escape:"url"}"{$hook.has_permission == false} 'selected'}>{{$hook@key}|escape:"html"}</option>
{/foreach}
</select>
</div>
{else}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.PERMISSION_FORBIDDEN_ENABLE_DESC}</span>
{/if}
{if $edit}
<input name="SAVE_EDIT" type="submit" value="{$CONST.SAVE}"> {$CONST.WORD_OR} <input name="SAVE_NEW" type="submit" value="{$CONST.CREATE_NEW_GROUP}">
{else}
<input name="SAVE_NEW" type="submit" value="{$CONST.CREATE_NEW_GROUP}">
{/if}
</form>
{else}
{if $delete}
<form action="?serendipity[adminModule]=groups" method="post">
{$formToken}
<input name="serendipity[group]" type="hidden" value="{$group_id|escape:"html"}">
<h2>{$CONST.DELETE_GROUP|sprintf:"{$group_id}":"{$group.name|escape:"html"}"}</h2>
<div id="groups_delete_action">
<input name="DELETE_YES" type="submit" value="{$CONST.DUMP_IT}">
<input name="NO" type="submit" value="{$CONST.NOT_REALLY}">
</div>
</form>
{/if}
{/if}

View File

@ -1,301 +0,0 @@
{* HTML5: Yes *}
{* jQuery: No *}
{if $case_imgedit}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.PREFERENCE_USE_JS_WARNING}</span>
{/if}
{if $case_sync}
{if !$perm_adminImagesSync}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.PERM_DENIED}</span>
{else}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.WARNING_THIS_BLAHBLAH|replace:'\\n':'<br>'}</span>
<form method="POST" action="serendipity_admin.php?serendipity[adminModule]=media&amp;serendipity[adminAction]=doSync">
<fieldset>
<legend><span>{$CONST.SYNC_OPTION_LEGEND}</span></legend>
<div class="clearfix">
<div class="form_radio">
<input id="keepthumbs" name="serendipity[deleteThumbs]" type="radio" value="no" checked="checked">
<label for="keepthumbs">{$CONST.SYNC_OPTION_KEEPTHUMBS}</label>
</div>
<div class="form_radio">
<input id="sizecheckthumbs" name="serendipity[deleteThumbs]" type="radio" value="check">
<label for="sizecheckthumbs">{$CONST.SYNC_OPTION_SIZECHECKTHUMBS}</label>
</div>
<div class="form_radio">
<input id="deletethumbs" name="serendipity[deleteThumbs]" type="radio" value="yes">
<label for="deletethumbs">{$CONST.SYNC_OPTION_DELETETHUMBS}</label>
</div>
</div>
</fieldset>
<div class="form_buttons">
<input name="doSync" type="submit" value="{$CONST.CREATE_THUMBS}">
<a href="serendipity_admin.php">{$CONST.ABORT_NOW}</a>
</div>
</form>
{/if}
{/if}
{if $case_doSync}
{if !$perm_adminImagesSync}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.PERM_DENIED}</span>
{else}
<h2>{$CONST.SYNCING}</h2>
<span class="msg_success"><span class="icon-ok-circle"></span> {$print_SYNC_DONE}</span>
<h2>{$CONST.RESIZING}</h2>
<span class="msg_success"><span class="icon-ok-circle"></span> {$print_RESIZE_DONE}</span>
{/if}
{/if}
{if $case_delete}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.ABOUT_TO_DELETE_FILE|sprintf:"$file"}</span>
<form id="delete_image" method="get">
<div class="form_buttons">
<a href="{$newLoc}">{$CONST.DUMP_IT}</a>
<a href="{$abortLoc}">{$CONST.ABORT_NOW}</a>
</div>
</form>
{/if}
{if $switched_output}
<form id="delete_image" method="get">
{if ( $is_delete || $is_multidelete )}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.ABOUT_TO_DELETE_FILES}</span>
{foreach $rip_image AS $ripimg}
<span class="msg_dialogue"><span class="icon-help-circle"></span> {$ripimg}</span>
{/foreach}
<ul class="dialogue_delrip plainList clearfix">
<li><a class="link_abort" href="{$smarty.server.HTTP_REFERER|escape}">{$CONST.NOT_REALLY}</a></li>
<li><a class="link_confirm" href="{$newLoc}">{$CONST.DUMP_IT}</a></li>
</ul>
{/if}
</form>
{/if}
{if $case_rename}
{if $go_back}
<input type="button" value="{$CONST.BACK}" onclick="history.go(-1);">
{else}
<script>location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";</script>
<noscript><a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=default">{$CONST.DONE}</a></noscript>
{/if}
{/if}
{* TODO: obsolete? *}
{if $case_properties}
{** serendipity_showPropertyForm($new_media) **}
{/if}
{* END TODO *}
{if $case_add}
{if $smarty.post.adminSubAction == 'properties'}
<script>location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";</script>
<noscript><a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=default">{$CONST.DONE}</a></noscript>
{else}
{$showML_add}
{/if}
{/if}
{if $case_directoryDoDelete}
{if $print_DIRECTORY_WRITE_ERROR}{$print_DIRECTORY_WRITE_ERROR}{/if}
{if $ob_serendipity_killPath}{$ob_serendipity_killPath}{/if}
{if $print_ERROR_NO_DIRECTORY}{$print_ERROR_NO_DIRECTORY}{/if}
{/if}
{if $case_directoryEdit}
{if !empty($smarty.post.save)}
{if $ob_serendipity_moveMediaDirectory}{$ob_serendipity_moveMediaDirectory}{/if}
<span class="msg_notice"><span class="icon-info-circle"></span> {$print_CONST.SETTINGS_SAVED_AT}</span>
{/if}
<h2>{$CONST.MANAGE_DIRECTORIES}</h2>
<form id="image_directory_edit_form" method="POST" action="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryEdit&amp;serendipity[dir]={$dir|escape:'html'}">
{$formtoken}
<input name="serendipity[oldDir]" type="hidden" value="{$use_dir}">
<div class="form_field">
<label for="diredit_new">{$CONST.NAME}</label>
<input id="diredit_new" name="serendipity[newDir]" type="text" value="{$use_dir}">
</div>
<div class="form_select">
<label for="read_authors">{$CONST.PERM_READ}</label>
<select id="read_authors" name="serendipity[read_authors][]" multiple size="6">
<option value="0"{if $rgroups} selected{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups AS $group}
<option value="{$group.confkey}"{if isset($read_groups.{$group.confkey})} selected{/if}>{$group.confvalue|escape:'html'}</option>
{/foreach}
</select>
</div>
<div class="form_select">
<label for="write_authors">{$CONST.PERM_WRITE}</label>
<select id="write_authors" name="serendipity[write_authors][]" multiple size="6">
<option value="0"{if $wgroups} selected{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups AS $group}
<option value="{$group.confkey}"{if isset($write_groups.{$group.confkey})} selected{/if}>{$group.confvalue|escape:'html'}</option>
{/foreach}
</select>
</div>
<div class="form_check">
<input id="setchild" name="serendipity[update_children]" type="checkbox" value="true"{if !empty($smarty.post.update_children) == 'on'} checked="checked"{/if}><label for="setchild">{$CONST.PERM_SET_CHILD}</label>
</div>
<input name="serendipity[save]" type="submit" value="{$CONST.SAVE}">
</form>
{/if}
{if $case_directoryDelete}
<h2>{$CONST.DELETE_DIRECTORY}</h2>
<p>{$CONST.DELETE_DIRECTORY_DESC}</p>
<form id="image_directory_delete_form" method="POST" action="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryDoDelete&amp;serendipity[dir]={$dir|escape:'html'}">
{$formtoken}
<div class="form_check">
<input id="diredit_delete" name="serendipity[nuke]" type="checkbox" value="true">
<label for="diredit_delete"><b>{$basename_dir}</b> - {$CONST.FORCE_DELETE}</label>
</div>
{* I think this is redudant: <p>{$CONST.CONFIRM_DELETE_DIRECTORY|sprintf:$dir|escape:'html'}</p> *}
<input name="SAVE" type="submit" value="{$CONST.DELETE_DIRECTORY}">
</form>
{/if}
{if $case_directoryDoCreate}
{if $print_DIRECTORY_CREATED}{$print_DIRECTORY_CREATED}{/if}
{if $print_DIRECTORY_WRITE_ERROR}{$print_DIRECTORY_WRITE_ERROR}{/if}
{/if}
{if $case_directoryCreate}
<h2>{$CONST.CREATE_DIRECTORY}</h2>
<p>{$CONST.CREATE_DIRECTORY_DESC}</p>
<form id="image_directory_create_form" method="POST" action="?serendipity[step]=directoryDoCreate&amp;serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryDoCreate">
{$formtoken}
<div class="form_field">
<label for="dircreate_name">{$CONST.NAME}</label>
<input id="dircreate_name" name="serendipity[name]" type="text" value="">
</div>
<div class="form_select">
<label for="dircreate_parent">{$CONST.PARENT_DIRECTORY}</label>
<select id="dircreate_parent" name="serendipity[parent]">
<option value="">{$CONST.BASE_DIRECTORY}</option>
{foreach $folders as $folder}
<option{if $folder.relpath == $get.only_path} selected{/if} value="{$folder.relpath}">{'&nbsp;'|str_repeat:($folder.depth*2)} {$folder.name}</option>
{/foreach}
</select>
</div>
{serendipity_hookPlugin hookAll=true hook="backend_directory_createoptions" addData=$folders}
<input name="SAVE" type="submit" value="{$CONST.CREATE_DIRECTORY}">
</form>
{/if}
{if $case_directorySelect}
<h2>{$CONST.MANAGE_DIRECTORIES}</h2>
<p>{$CONST.DIRECTORIES_AVAILABLE}</p>
<h3>{$CONST.BASE_DIRECTORY}</h3>
<ul class="plainList">
{foreach $folders as $folder}
<li class="level_{$folder.depth} clearfix">
<span class="folder_name"><span class="icon-folder-open"></span> {$folder.name}</span>
<a class="icon_link" href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryEdit&amp;serendipity[dir]={$folder.relpath|escape:'html'}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a>
<a class="icon_link" href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryDelete&amp;serendipity[dir]={$folder.relpath|escape:'html'}" title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a>
</li>
{/foreach}
</ul>
<a class="link_create block_level" href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryCreate">{$CONST.CREATE_NEW_DIRECTORY}</a>
{/if}
{* TODO: obsolete? *}
{if $case_addSelect}
{** smarty display 'admin/media_upload.tpl' **}
{/if}
{* END TODO *}
{if $case_rotateCW}
{if $rotate_img_done}
<script>location.href="{$adminFile_redirect}";</script>
<noscript><a href="{$adminFile_redirect}">{$CONST.DONE}</a></noscript>
{/if}
{/if}
{if $case_rotateCCW}
{if $rotate_img_done}
<script>location.href="{$adminFile_redirect}";</script>
<noscript><a href="{$adminFile_redirect}">{$CONST.DONE}</a></noscript>
{/if}
{/if}
{if $case_scale}
{if $print_SCALING_IMAGE}<span class="msg_notice"><span class="icon-info-circle"></span> {$print_SCALING_IMAGE}</span>{/if}
{if $print_serendipity_scaleImg}<span class="msg_notice"><span class="icon-info-circle"></span> {$print_serendipity_scaleImg}</span>{/if}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.DONE}</span>
<script>location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";</script>
<noscript><a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=default">{$CONST.DONE}</a></noscript>
{/if}
{if $case_scaleSelect}
<script>
<!--
function rescale(dim, newval) {ldelim}
var originalWidth = {$img_width};
var originalHeight = {$img_height};
var ratio = originalHeight/originalWidth;
var trans = new Array();
trans['width'] = new Array('serendipity[height]', ratio);
trans['height'] = new Array('serendipity[width]', 1/ratio);
if (document.serendipityScaleForm.elements['auto'].checked == true) {ldelim}
document.serendipityScaleForm.elements[trans[dim][0]].value=Math.round(trans[dim][1]*newval);
{rdelim}
document.getElementsByName('serendipityScaleImg')[0].style.width =
document.serendipityScaleForm.elements['serendipity[width]'].value+'px';
document.getElementsByName('serendipityScaleImg')[0].style.height =
document.serendipityScaleForm.elements['serendipity[height]'].value+'px';
{rdelim}
//-->
</script>
{if $print_RESIZE_BLAHBLAH}<span class="msg_notice"><span class="icon-info-circle"></span> {$print_RESIZE_BLAHBLAH}</span>{/if}
{if $print_ORIGINAL_SIZE}<span class="msg_notice"><span class="icon-info-circle"></span> {$print_ORIGINAL_SIZE}</span>{/if}
<h2>{$CONST.HERE_YOU_CAN_ENTER_BLAHBLAH}</h2>
<form name="serendipityScaleForm" action="?" method="GET">
{$formtoken}
<input name="serendipity[adminModule]" type="hidden" value="images">
<input name="serendipity[adminAction]" type="hidden" value="scale">
<input name="serendipity[fid]" type="hidden" value="{$get.fid}">
<fieldset>
<legend><span>{$CONST.NEWSIZE}</span></legend>
<div class="form_field">
<label for="resize_width">Width</label> {* i18n *}
<input id="resize_width" name="serendipity[width]" type="text" onchange="rescale('width' , value);" value="{$img_width}">
</div>
<div class="form_field">
<label for="resize_height">Height</label> {* i18n *}
<input id="resize_height" name="serendipity[height]" type="text" onchange="rescale('height', value);" value="{$img_height}">
</div>
</fieldset>
<div class="form_check">
<input id="resize_keepprops" name="auto" type="checkbox" checked="checked">
<label for="resize_keepprops">{$CONST.KEEP_PROPORTIONS}</label>
</div>
<input name="scale" type="button" value="{$CONST.IMAGE_RESIZE}" onclick="if (confirm('{$CONST.REALLY_SCALE_IMAGE}')) document.serendipityScaleForm.submit();">
</form>
<img src="{$file}" name="serendipityScaleImg" style="width: {$img_width}px; height: {$img_height}px;" alt="">
{/if}
{if $case_default}
{if $showML_def}{$showML_def}{/if}
{/if}

View File

@ -1,55 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $importForm}
{if $die}
<span class="msg_error"><span class="icon-attention"></span> FAILURE: Unable to require import module, possible syntax error?</span>
{else}
{if $validateData}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.IMPORT_STARTING}</span>
{if $result != true}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.IMPORT_FAILED}: {$result}</span>
{else}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.IMPORT_DONE}</span>
{/if}
{else}
<h2>{$CONST.IMPORT_PLEASE_ENTER}</h2>
<form action="" method="POST" enctype="multipart/form-data">
{$formToken}
<dl>
{foreach $fields as $field}
<dt>{$field.text}</dt>
<dd>{$field.guessedInput}</dd>
{/foreach}
</dl>
{if $notes}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.IMPORT_NOTES}: {$notes}</span>
{/if}
<input type="submit" value="{$CONST.IMPORT_NOW}">
</form>
{/if}
{/if}
{else}
<h2>{$CONST.IMPORT_WELCOME}</h2>
<p>{$CONST.IMPORT_WHAT_CAN}</p>
<h3>{$CONST.IMPORT_SELECT}:</h3>
<form action="" method="GET">
<input name="serendipity[adminModule]" type="hidden" value="import">
{$formToken}
<div class="form_select">
<label for="import_from">{$CONST.IMPORT_WEBLOG_APP}:</label>
<select id="import_from" name="serendipity[importFrom]">
{foreach $list as $v => $k}
<option value="{$v}">{$k}</option>
{/foreach}
</select>
</div>
<input type="submit" value="{$CONST.GO}">
</form>
{/if}

View File

@ -1,264 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $is_errors && is_array($errors)}
{foreach $errors AS $error}
<span class="msg_error"><span class="icon-attention"></span> {$error}</span>
{/foreach}
{/if}
{if $getstepint0}
<h2>{$CONST.WELCOME_TO_INSTALLATION}</h2>
<h3>{$CONST.FIRST_WE_TAKE_A_LOOK}</h3>
<p>{$print_ERRORS_ARE_DISPLAYED_IN}</p>
<h3>{$CONST.PRE_INSTALLATION_REPORT|sprintf:$s9yversion}</h3>
<div id="diagnose">
<h4>{$CONST.INTEGRITY}</h4>
<ul class="plainList">
{foreach $installerResultDiagnose_CHECKSUMS AS $cksum}
<li>{$cksum}</li>
{/foreach}
</ul>
<table>
<caption>{$CONST.PHP_INSTALLATION}</caption>
<thead>
<tr>
{* TODO: These are probably poorly labelled, needs to be checked *}
<th>Key</th> {* i18n *}
<th>Value</th> {* i18n *}
</tr>
</thead>
<tbody>
<tr>
<td>{$CONST.OPERATING_SYSTEM}</td>
<td>{$php_uname}</td>
</tr>
<tr>
<td>{$CONST.WEBSERVER_SAPI}</td>
<td>{$php_sapi_name}</td>
</tr>
<tr>
<td>PHP version >= 5.2.6</td>
<td>{$installerResultDiagnose_VERSION}</td>
</tr>
<tr>
<td>Database extensions</td>
<td>{$installerResultDiagnose_DBTYPE}</td>
</tr>
<tr>
<td>Session extension</td>
<td>{$installerResultDiagnose_SESSION}</td>
</tr>
<tr>
<td>PCRE extension</td>
<td>{$installerResultDiagnose_PCRE}</td>
</tr>
<tr>
<td>GDlib extension</td>
<td>{$installerResultDiagnose_GD}</td>
</tr>
<tr>
<td>OpenSSL extension</td>
<td>{$installerResultDiagnose_OPENSSL}</td>
</tr>
<tr>
<td>mbstring extension</td>
<td>{$installerResultDiagnose_MBSTR}</td>
</tr>
<tr>
<td>iconv extension</td>
<td>{$installerResultDiagnose_ICONV}</td>
</tr>
<tr>
<td>zlib extension</td>
<td>{$installerResultDiagnose_ZLIB}</td>
</tr>
<tr>
<td>Imagemagick binary </td>
<td>{$installerResultDiagnose_IM}</td>
</tr>
</tbody>
</table>
<table>
<caption>{$CONST.PHPINI_CONFIGURATION}</caption>
<thead>
<tr>
<th>&nbsp;</th>
<th>{$CONST.RECOMMENDED}</th>
<th>{$CONST.ACTUAL}</th>
</tr>
</thead>
<tbody>
<tr>
<td>safe_mode</td>
<td><strong>OFF</strong></td>
<td>{$installerResultDiagnose_SSM}</td>
</tr>
<tr>
<td>register_globals</td>
<td><strong>OFF</strong></td>
<td>{$installerResultDiagnose_SRG}</td>
</tr>
<tr>
<td>magic_quotes_gpc</td>
<td><strong>OFF</strong></td>
<td>{$installerResultDiagnose_SMQG}</td>
</tr>
<tr>
<td>magic_quotes_runtime</td>
<td><strong>OFF</strong></td>
<td>{$installerResultDiagnose_SMQR}</td>
</tr>
<tr>
<td>session.use_trans_sid</td>
<td><strong>OFF</strong></td>
<td>{$installerResultDiagnose_SSUTS}</td>
</tr>
<tr>
<td>allow_url_fopen</td>
<td><strong>ON</strong></td>
<td>{$installerResultDiagnose_SAUF}</td>
</tr>
<tr>
<td>file_uploads</td>
<td><strong>ON</strong></td>
<td>{$installerResultDiagnose_SFU}</td>
</tr>
<tr>
<td>post_max_size</td>
<td><strong>10M</strong></td>
<td>{$installerResultDiagnose_SPMS}</td>
</tr>
<tr>
<td>upload_max_filesize</td>
<td><strong>10M</strong></td>
<td>{$installerResultDiagnose_SUMF}</td>
</tr>
<tr>
<td>memory_limit</td>
<td><strong>{($CONST.PHP_INT_SIZE == 4) ? '8M' : '16M'}</strong></td>
<td>{$installerResultDiagnose_SML}</td>
</tr>
</tbody>
</table>
<h4>{$CONST.PERMISSIONS}</h4>
<h5>{$basedir}</h5>
<ul class="plainList">
{foreach $installerResultDiagnose_WRITABLE AS $fwrite}
<li>{$fwrite}</li>
{/foreach}
</ul>
<h5>{$basedir} {$CONST.PATH_SMARTY_COMPILE}</h5>
<ul class="plainList">
{foreach $installerResultDiagnose_COMPILE AS $compile}
<li>{$compile}</li>
{/foreach}
</ul>
<h5>{$basedir}archives/</h5>
<ul class="plainList">
{foreach $installerResultDiagnose_ARCHIVES AS $archives}
<li>{$archives}</li>
{/foreach}
</ul>
<h5>{$basedir}plugins/</h5>
<ul class="plainList">
{foreach $installerResultDiagnose_PLUGINS AS $plugins}
<li>{$plugins}</li>
{/foreach}
</ul>
{if $is_dir_uploads}
<h5>{$basedir}uploads/</h5>
<ul class="plainList">
{foreach $installerResultDiagnose_UPLOADS AS $uploads}
<li>{$uploads}</li>
{/foreach}
</ul>
{/if}
{if $is_imb_executable}
<h5>Execute Imagemagick binary</h5>
<ul class="plainList">
{foreach $installerResultDiagnose_IMB AS $im_binary}
<li>{$im_binary}</li>
{/foreach}
</ul>
{/if}
{if $showWritableNote}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'}</span>
{/if}
{if $errorCount > 0}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.PROBLEM_DIAGNOSTIC}</span>
<a class="block_level" href="serendipity_admin.php">{$CONST.RECHECK_INSTALLATION}</a>
{else}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.SELECT_INSTALLATION_TYPE}:</span>
<div><a href="?serendipity[step]=2a">{$CONST.SIMPLE_INSTALLATION}</a> - <a href="?serendipity[step]=2b">{$CONST.EXPERT_INSTALLATION}</a></div>
{/if}
</div>
{elseif $s9yGETstep == '2a'}
<form action="?" method="post">
<input name="serendipity[step]" type="hidden" value="{$s9yGETstep}">
<input name="serendipity[getstep]" type="hidden" value="3">
{if $ob_serendipity_printConfigTemplate}{$ob_serendipity_printConfigTemplate}{/if}
<input name="submit" type="submit" value="{$CONST.COMPLETE_INSTALLATION}">
</form>
{elseif $s9yGETstep == '2b'}
<form action="?" method="post">
<input name="serendipity[step]" type="hidden" value="{$s9yGETstep}">
<input name="serendipity[getstep]" type="hidden" value="3">
{if $ob_serendipity_printConfigTemplate}{$ob_serendipity_printConfigTemplate}{/if}
<input name="submit" type="submit" value="{$CONST.COMPLETE_INSTALLATION}">
</form>
{elseif $getstepint3}
<h3>{$CONST.CHECK_DATABASE_EXISTS}</h3>
{if is_array($authors_query)}
<span class="msg_success"><span class="icon-ok-circle"></span> <strong>{$CONST.THEY_DO}</strong>, {$CONST.WONT_INSTALL_DB_AGAIN}</span>
{else}
<span class="msg_error"><span class="icon-attention"></span> <strong>{$CONST.THEY_DONT}</strong></span>
<ol>
<li>{$CONST.CREATE_DATABASE}{if $install_DB} <strong>{$CONST.DONE}</strong>{/if}</li>
<li>{$CONST.CREATING_PRIMARY_AUTHOR|sprintf:"{$smarty.post.user|escape}"}{if $add_authors} <strong>{$CONST.DONE}</strong>{/if}</li>
<li>{$CONST.SETTING_DEFAULT_TEMPLATE}{if $set_template_vars} <strong>{$CONST.DONE}</strong>{/if}</li>
<li>{$CONST.INSTALLING_DEFAULT_PLUGINS}{if $register_default_plugins} <strong>{$CONST.DONE}</strong>{/if}</li>
</ol>
{/if}
<h3>{$CONST.ATTEMPT_WRITE_FILE|sprintf:'.htaccess'}</h3>
{if $errors_sif === true}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.DONE}</span>
{else}
<h4>{$CONST.FAILED}</h4>
<ul class="plainList">
{foreach $errors_sif AS $error_f}
<li><span class="msg_error"><span class="icon-attention"></span> {$error_f}</span></li>
{/foreach}
</ul>
{/if}
{if $s9y_installed}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.SERENDIPITY_INSTALLED}</span>
<p><strong>{$CONST.THANK_YOU_FOR_CHOOSING}</strong></p>
<a class="block_level" href="{$smarty.post.serendipityHTTPPath}">{$CONST.VISIT_BLOG_HERE}</a>
{else}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.ERROR_DETECTED_IN_INSTALL}</span>
{/if}
{/if}

View File

@ -1,183 +0,0 @@
{* HTML5: Yes *}
{* jQuery: No *}
{* serendipity_plugins_admin.inc.php::serendipity_plugin_config() - the OUT_STACK loop *}
{if $ctype == 'seperator'}
{* This could just as well be replaced by a CSS-only solution … *}
<hr>
{* … then again, hr has new meaning in HTML5. *}
{/if}
{if $ctype == 'select'}
<div class="clearfix form_select">
<label for="serendipity_{$config_item}">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
{* Make sure id creation actually produces unique identifiers *}
<select id="serendipity_{$config_item}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]{($is_multi_select) ? '[]' : ''}" {($is_multi_select) ? 'multiple' : ''} {($is_multi_select && ($select_size > 0)) ? "size='{$select_size}'" : ''}>
{foreach $select AS $select_value => $select_desc}
{assign var="id" value="{$config_item|escape}_{$select_value|escape}"}
<!-- case select assign id={$id} -->
<option value="{$select_value}" {(in_array($select_value, $selected_options) || in_array($select_value, $pre_selected)) ? 'selected' : ''} title="{$select_desc|escape}">{$select_desc|escape}</option>
{/foreach}
</select>
</div>
{/if}
{if $ctype == 'radio'}
<div class="clearfix">
<fieldset>
<legend><span>{$cname}</span></legend>
{if $cdesc != ''}<p>{$cdesc}</p>{/if}
<div class="clearfix">
{foreach $radio_button AS $r}
<div class="form_radio">
<input id="serendipity_plugin_{$r['id']}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" type="radio" value="{$r['value']}" {(!empty($r['checked'])) ? 'checked="checked"' : ''} title="{$r['index']|escape}">
<label for="serendipity_plugin_{$r['id']}">{$r['index']}{* escapement is already done *}</label>
{assign var="r" value="counter[0]"}
</div>
{/foreach}
</div>
</fieldset>
</div>
{/if}
{if $ctype == 'string'}
<div class="clearfix form_field">
<label for="serendipity_{$config_item}">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
{* TODO: Make sure id creation actually produces unique identifiers *}
<input id="serendipity_{$config_item}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" type="{$input_type}" value="{$hvalue}">
</div>
{/if}
{if (($ctype == 'html') || ($ctype == 'text'))}
<div class="clearfix form_area">
<label for="nuggets{$elcount}">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
<textarea id="nuggets{$elcount}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" rows="{$text_rows}">{$hvalue}</textarea>
</div>
{/if}
{if $ctype == 'content'}
<div class="clearfix">
{$cbag_default}
</div>
{/if}
{if $ctype == 'custom'}
<div class="clearfix">
<input id="config_{$postKey}_{$config_item}" name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$hvalue}">
{$cbag_custom}
</div>
{/if}
{if $ctype == 'hidden'}
<div class="clearfix">
<input name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$cbag_value}">
</div>
{/if}
{if $ctype == 'media'}
<div class="clearfix">
{if !$mediajs_output}
<script src="serendipity_editor.js"></script>
<script src="{serendipity_getFile file='admin/image_selector.js'}"></script>
{/if}
<label for="serendipity[{$postKey}][{$config_item}]">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
<div id="{$config_item}_preview" style="background-image: url({$value}); width: {$preview_width}; height: {$preview_height}; background-repeat: no-repeat;">&nbsp;</div>
{* This should be input[type=file] … *}
<input id="serendipity[{$postKey}][{$config_item}]" name="serendipity[{$postKey}][{$config_item}]" type="text" value="{$value}" onchange="change_preview('{$config_item}')">
<a href="#" onclick="choose_media('serendipity[{$postKey}][{$config_item}]')">{$CONST.MEDIA_LIBRARY}</a>
{* … not touching it in order to not break it for now. *}
</div>
{/if}
{if $ctype == 'sequence'}
<div class="clearfix">
{if !$sequencejs_output}
<script src="{serendipity_getFile file='dragdrop.js'}"></script>
{/if}
<fieldset>
<legend><span>{$cname}</span></legend>
{if $cdesc != ''}
<p>{$cdesc}</p>
{/if}
<input id="{$config_item}_value" name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$value}">
<noscript>
<!-- Replace standard submit button when using up/down submits -->
<input name="SAVECONF" type="hidden" value="Save">
</noscript>
<ol id="{$config_item}" class="sequence_container pluginmanager_container">
{foreach $order_id as $orid}
<li id="{$orid['id']}" class="sequence_item pluginmanager_item_even">
<a id="g{$orid['id']}" class="icon_link" href="#" title="Move"><span class="icon-move"></span><span class="visuallyhidden"> Move</span></a>{* i18n *}
{* <div id="g{$orid['id']}" class="pluginmanager_grablet sequence_grablet"><a href="#"></a></div> *}
{if $checkable}
<div class="form_check">
<input id="activate_{$orid['id']}" name="serendipity[{$postKey}][activate][{$config_item}][{$orid['id']}]" {(in_array($orid['id'], $store_order)) ? ' checked="checked" ' : ''} type="checkbox" onclick="sort_{$config_item}_Sequence();" value="true">
{* TODO: needs label *}
</div>
{/if}
<span>{$items[{$orid['id']}]['display']}</span>
{if isset($items[{$orid['id']}]['img'])}
<img src="{$items[{$orid['id']}]['img']}">
{/if}
<noscript>
<div>
{if ($orid['sort_idx'] == 0)}
&nbsp;
{else}
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_up" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['oneup']}"><span class="icon-up-circled"></span><span class="visuallyhidden"> Move Up</span></button> {* i18n *}
{/if}
{if ($orid['sort_idx'] == $last)}
&nbsp;
{else}
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_down" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['onedown']}"><span class="icon-down-circled"></span><span class="visuallyhidden"> Move Down</span></button> {* i18n *}
{/if}
</div>
</noscript>
</li>
{/foreach}
</ol>
{if isset($no_sequence)}
{$no_sequence}
{/if}
</fieldset>
{*** Smarty 3 has a new auto literal option which is enabled by default.
When the { is surrounded by whitespace it is not interpreted as smarty delimiter but literal. e.g. ' } ;'
AS tests have proofed, ending javascript delimiters " } ;" and " };" and even "};" work fine as well. So back to origin. ***}
<script>
function sort_{$config_item}_Sequence() {
//var seq = DragDrop.serData('{$config_item}_group', null);
var seq = DragDrop.serData(null, '{$config_item}');
var start = seq.indexOf("(");
var end = seq.indexOf(")");
seq = seq.slice((start + 1), end);
checkable_seq = seq.split(",");
out_seq = '';
for (i in checkable_seq) {
if (document.getElementById('activate_' + checkable_seq[i]) && !document.getElementById('activate_' + checkable_seq[i]).checked) {
continue;
} else {
if (out_seq != '') {
out_seq += ',';
}
out_seq += checkable_seq[i];
}
}
var order = document.getElementById("{$config_item}_value");
order.value = out_seq;
}
function init_{$config_item}_Sequence() {
var lst = document.getElementById("{$config_item}");
DragDrop.makeListContainer(lst, '{$config_item}_group');
lst.onDragOut = function() {
sort_{$config_item}_Sequence();
};
}
addLoadEvent(init_{$config_item}_Sequence);
</script>
</div>
{/if}

View File

@ -1,16 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN*}
<h2>{$output.welcome}</h2>
{$output.more}
{if $output.show_links}
<aside class="{$output.links_css}">
<h3>{$output.links_title}</h3>
<ul class="plainList">
{foreach $output.links AS $link}
<li>{$link}</li>
{/foreach}
</ul>
</aside>
{/if}

View File

@ -1,19 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $adminAction == 'save'}
{if $not_authorized}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span>
{elseif $empty_username}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.USERCONF_CHECK_USERNAME_ERROR}</span>
{elseif $password_check_fail}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.USERCONF_CHECK_PASSWORD_ERROR}</span>
{else}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.MODIFIED_USER|sprintf:"{$realname|escape:"html"}"} ?></span>
{/if}
{/if}
<form action="?serendipity[adminModule]=personal&amp;serendipity[adminAction]=save" method="post">
{$formToken}
{$config}
<input name="SAVE" type="submit" value="{$CONST.SAVE}">
</form>

View File

@ -1,149 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $plugin_to_conf}
{if is_array($save_errors)}
<div class="msg_error">
<h2><span class="icon-attention"></span> {$CONST.ERROR}:</h2>
<ul class="plainList">
{foreach $save_errors as $save_error}
<li>$save_error</li>
{/foreach}
</ul>
</div>
{elseif $saveconf}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.DONE}: {$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</span>
{/if}
<form method="post" name="serendipityPluginConfigure">
{$formToken}
<div class="plugin_info">
<h2>{$name} (<span class="plugin_class">{$class}</span>)</h2>
<p><strong>{$CONST.DESCRIPTION}:</strong> {$desc}</p>
{if !empty($license)}
<p><strong>{$CONST.MEDIA_PROPERTY_COPYRIGHT}:</strong> {$license}</p>
{/if}
{if ! empty($documentation) || $changelog || $documentation_local}
<ul class="plainList">
{if !empty($documentation)}
<li><a href="{$documentation|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION}</a></li>
{/if}
{if $changelog}
<li><a href="plugins/{$plugin->act_pluginPath}/ChangeLog">{$CONST.PLUGIN_DOCUMENTATION_CHANGELOG}</a></li>
{/if}
{if $documentation_local}
<li><a href="plugins/{$plugin->act_pluginPath}{$documentation}">{$CONST.PLUGIN_DOCUMENTATION_LOCAL}</a></li>
{/if}
</ul>
{/if}
</div>
{$config}
</form>
{elseif $adminAction == 'addnew'}
<h3>{if $type == 'event'}{$CONST.EVENT_PLUGINS}{else}{$CONST.SIDEBAR_PLUGINS}{/if} <span class="plugins_available">{$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:"count({$pluginstack})"}</span></h3>
{foreach $errorstack as $e_idx => $e_name}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.ERROR}: {$e_name}</span>
{/foreach}
<form action="serendipity_admin.php" method="get">
{$formToken}
<input name="serendipity[adminModule]" type="hidden" value="plugins">
<input name="serendipity[adminAction]" type="hidden" value="addnew">
<input name="serendipity[type]" type="hidden" value="{$type|escape:"html"}">
<div class="form_select">
<label for="only_group">{$CONST.FILTERS}</label>
<select id="only_group" name="serendipity[only_group]">
{foreach $groupnames as $available_group => $available_name}
<option value="{$available_group}"{if $only_group == $available_group} selected{/if}>{$available_name}</option>
{/foreach}
<option value="ALL"{if $only_group == ALL} selected{/if}>{$CONST.ALL_CATEGORIES}</option>
<option value="UPGRADE"{if $only_group == UPGRADE} selected{/if}>{$CONST.WORD_NEW}</option>
</select>
</div>
<input type="submit" value="{$CONST.GO}">
</form>
{foreach $pluggroups AS $pluggroup => $groupstack}
{if empty($pluggroup)}
{if !empty($only_group)}{continue}{/if}
{elseif !empty($only_group) && $pluggroup != $only_group}{continue}{else}
<h4>{foreach $groupnames as $available_group => $available_name}{if $pluggroup == $available_group}{$available_name}{/if}{/foreach}</h4>
{/if}
<ul class="plainList">
{foreach $groupstack as $plug}
<li><h5>{$plug.name} ({$plug.class_name})</h5>
<p class="plugin_desc">{$plug.description}</p>
<ul class="plugin_info">
{if ! empty($plug.author)}
<li class="plugin_author">{$CONST.AUTHOR}: {$plug.author}</li>
{/if}
{if ! empty($plug.version)}
<li class="plugin_version">{$CONST.VERSION}: {$plug.version}</li>
{/if}
{if ! empty($plug.website)}
<li class="plugin_web"><a href="{$plug.website|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION}</a></li>
{/if}
{if ! empty($plug.local_documentation)}
<li class="plugin_localdoc"><a href="{$plug.local_documentation|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION_LOCAL}</a></li>
{/if}
{if ! empty($plug.changelog)}
<li class="plugin_changelog"><a href="{$plug.changelog|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION_CHANGELOG}</a></li>
{/if}
{if ! empty({$plug.upgrade_version}) && $plug.upgrade_version != $plug.version}
<li class="plugin_toversion">{$CONST.UPGRADE_TO_VERSION|sprintf:"{$plug.upgrade_version}"}{if ! empty($plug.pluginlocation) && $plug.pluginlocation != 'local'} ({$plug.pluginlocation|escape:"html"}){/if}</li>
{/if}
</ul>
<div class="plugin_status">
{if isset($requirements_failures.{$plug.class_name})}
<span class="unmet_requirements">{$CONST.UNMET_REQUIREMENTS|sprintf:"{if $requirements_failures.{$plug.class_name}.s9y}s9y $plug.requirements..serendipity,{/if} {if $requirements_failures.{$plug.class_name}.php}PHP $plug.requirements.php,{/if} {if $requirements_failures.{$plug.class_name}.smarty}Smarty $plug.requirements.smarty{/if}"}</span>
{elseif $plug['upgradable'] == true}
<a class="upgradable" href="?serendipity[adminModule]=plugins&amp;serendipity[pluginPath]={$plug.pluginPath}&amp;serendipity[install_plugin]={$plug.plugin_class}{if isset($plug['customURI'])}{$plug.customURI}{/if}">{$CONST.UPGRADE}</a>
{elseif $plug.installable == true}
<a class="installable" href="?serendipity[adminModule]=plugins&amp;serendipity[pluginPath]={$plug.pluginPath}&amp;serendipity[install_plugin]={$plug.plugin_class}{if isset($plug.customURI)}{$plug.customURI}{/if}">{$CONST.INSTALL}</a>
{else}
<span class="installed">{$CONST.ALREADY_INSTALLED}</span>
{/if}
</div>
</li>
{/foreach}
</ul>
{/foreach}
{else}
{if $save}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</span>
{/if}
<h2>{$CONST.BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS}</h2>
{if $eyecandy}
<script src="{serendipity_getFile file="dragdrop.js"}"></script>
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.PREFERENCE_USE_JS_WARNING}</span>
{/if}
<section id="pluginlist_sidebar">
<h3>{$CONST.SIDEBAR_PLUGINS}</h3>
<a class="install_plugins block_level" href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew">{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.SIDEBAR_PLUGIN}"}</a>
{$backend_plugins_sidebar_header}
{$sidebar_plugins}
</section>
<section id="pluginlist_event">
<h3>{$CONST.EVENT_PLUGINS}</h3>
<a class="install_plugins block_level" href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew&amp;serendipity[type]=event">{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.EVENT_PLUGIN}"}</a>
{$backend_plugins_event_header}
{$event_plugins}
</section>
{if $memsnaps}
<section>
<h3>Memory Usage</h3>
<pre>{$memSnaps|print_r}</pre>
</section>
{/if}
{/if}

View File

@ -1,66 +0,0 @@
{* HTML5: Yes *}
{* jQuery: No *}
{* serendipity_plugins_admin.inc.php::serendipity_plugin_config() *}
<script>
var const_view = '{$CONST.VIEW_FULL}';
var const_hide = '{$CONST.HIDE}';
var img_plus = '{serendipity_getFile file="img/plus.png"}';
var img_minus = '{serendipity_getFile file="img/minus.png"}';
</script>
{if $allow_admin_scripts}
<script src="{serendipity_getFile file='admin/admin_scripts.js'}"></script>
{/if}
{if $showSubmit_head}
<div class="save_conf">
<input name="SAVECONF" type="submit" value="{$CONST.SAVE}">
</div>
{/if}
{if $showTable}
<div id="serendipity_plugin_config">
{/if}
{if is_array($config_groups)}
<a id="optionall" href="#" onClick="showConfigAll({sizeof($config_groups)}); return false" title="{$CONST.TOGGLE_ALL}">{$CONST.TOGGLE_ALL}</a>
{foreach $config_groups AS $config_header => $config_groupkeys}
<h2><a id="optionel{$config_groupkeys@iteration}" href="#" onClick="showConfig('el{$config_groupkeys@iteration}'); return false" title="{$CONST.TOGGLE_OPTION}">{$config_header}</a></h2>
<div id="el{$config_groupkeys@iteration}" class="plugin_optiongroup">
{foreach $config_groupkeys AS $config_groupkey}
{$OUT_STACK[$config_groupkey]}
{/foreach}
</div>
<script>document.getElementById('el{$config_groupkeys@iteration}').style.display = "none";</script>
{/foreach}
{* Is this really necessary? What for? *}
<div id="configuration_footer">&nbsp;</div>
{* If it is not, drop the inline style from CSS. *}
{/if} {* foreach config_groups end *}
{foreach $OUT_STACK_REST as $out_stack_config_item}
{$out_stack_config_item}
{/foreach}
{if $showTable}
</div>
{/if}
{* $serendipity_printConfigJS *}{* outsourced to templates/default/admin/admin_scripts.js - see passed vars on top *}
{if $showSubmit_foot}
<div class="save_conf">
<input name="SAVECONF" type="submit" value="{$CONST.SAVE}">
</div>
{/if}
{if $showExample}
<div>{$plugin_example}</div>
{/if}
{if $spawnNuggets}
{serendipity_hookPlugin hook="backend_wysiwyg_nuggets" eventData=$ev hookAll=true}
{if ($ev['skip_nuggets'] === false)}
<script>
function Spawnnugget() {
{foreach $htmlnugget AS $htmlnuggetid}
Spawnnuggets('{$htmlnuggetid}');
{/foreach}
}
</script>
{/if}
{/if}

View File

@ -1,23 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{* functions_plugins_admin.inc.php::function ownership() *}
{if $show_ownership}
{if $is_plugin_owner}
<select name="serendipity[ownership][{$name}]">
<option value="0">{$CONST.ALL_AUTHORS}</option>
{/if}
{foreach $users AS $user}
{if (!$is_plugin_owner && ($user['authorid'] == $authorid))}
{assign var="realname" value="{$user['realname']|escape}"}
{elseif $is_plugin_owner}
<option value="{$user['authorid']}"{($user['authorid'] == $authorid) ? ' selected' : ''}>{$user['realname']|escape}</option>
{/if}
{/foreach}
{if $is_plugin_owner}
</select>
{else}
{(empty($realname)) ? $CONST.ALL_AUTHORS : $realname}
{/if}
{/if}

View File

@ -1,83 +0,0 @@
{* HTML5: Yes *}
{* jQuery: No *}
{* functions_plugins_admin.inc.php::function_show_plugins() including output of functions_plugins_admin.inc.php::function ownership() *}
{if !$eyecandy}
<form action="?serendipity[adminModule]=plugins" method="post">
{elseif !$event_only}
{* Smarty 3 has a new auto literal option which is enabled by default.
When the { is followed by a space it's not interpreted as smarty delimiter but literal. *}
<script>
function templatePluginMoverInit() {
{foreach $plugin_placements AS $sidebar}
{($is_first) ? 'var ' : ''}list = document.getElementById("{$sidebar}_col");
DragDrop.makeListContainer(list, 'g1');
list.onDragOver = function() { this.style["border"] = "1px solid #4d759b"; };
list.onDragOut = function() { this.style["border"] = "none"; };
{assign var="is_first" value=false}
{/foreach}
}
addLoadEvent(templatePluginMoverInit);
</script>
<form action="?serendipity[adminModule]=plugins" method="post" onsubmit="pluginMovergetSort(); return true">
<input id="order" name="serendipity[pluginorder]" type="hidden" value="">
{else}
<script>addLoadEvent(pluginMoverInitEvent);</script>
<form action="?serendipity[adminModule]=plugins" method="post" onsubmit="pluginMovergetSortEvent(); return true">
<input id="eventorder" name="serendipity[pluginorder]" type="hidden" value="">
{/if}
{$serendipity_setFormToken}
<div class="clearfix pluginmanager">
{foreach $placement as $plugin_placement}
<div class="pluginmanager_side pluginmanager_{($event_only) ? 'event' : 'sidebar'}">
<h4>{$plugin_placement['ptitle']}</h4>
<ol id="{$plugin_placement['pid']}_col" class="pluginmanager_container plainList">
{foreach $plugin_placement['plugin_data'] as $plugin_data}
<li id="{$plugin_data['css_key']}" class="pluginmanager_item_{cycle values="even,uneven"}">
<div id="g{$plugin_data['css_key']}" class="pluginmanager_grablet">
<a id="grab{$plugin_data['css_key']}" class="icon_link" href="#" title="Move"><span class="icon-move"></span><span class="visuallyhidden"> Move</span></a>{* i18n *}
</div>
{if $plugin_data['is_plugin_editable']}
<div class="form_check">
<input id="remove_{$plugin_data['name']}" name="serendipity[plugin_to_remove][]" type="checkbox" value="{$plugin_data['name']}">
<label for="remove_{$plugin_data['name']}" class="visuallyhidden">Remove this plugin</label>{* i18n *}
</div>
{/if}
{if $plugin_data['can_configure']}
<a class="pluginmanager_configure icon_link" href="?serendipity[adminModule]=plugins&amp;serendipity[plugin_to_conf]={$plugin_data['key']}" title="{$CONST.CONFIGURATION}"><span class="icon-cog-alt"></span><span class="visuallyhidden"> {$CONST.CONFIGURATION}</span></a>
{/if}
<h5>
{if $plugin_data['can_configure']}
<a title="{$plugin_data['name']}" href="?serendipity[adminModule]=plugins&amp;serendipity[plugin_to_conf]={$plugin_data['key']}">{$plugin_data['title']}</a>
{else}
{$plugin_data['title']}
{/if}
</h5>
<ul class="pluginmanager_plugininfo plainList">
<li class="pluginmanager_description">{$plugin_data['desc']}</li>
<li class="pluginmanager_ownership">{$plugin_data['ownership']}</li>
{($eyecandy) ? '<noscript>' : ''}
<li class="pluginmanager_place">{$plugin_data['place']}</li>
<li class="pluginmanager_move">{$plugin_data['moveup']} {$plugin_data['movedown']}</li>
{($eyecandy) ? '</noscript>' : ''}
</ul>
</li>
{/foreach}
</ol>
</div>
{/foreach}
<span class="plugin_count block_level">{$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$total}</span>
</div>
<div class="form_buttons">
<input name="REMOVE" type="submit" title="{$CONST.DELETE}" value="{$CONST.REMOVE_TICKED_PLUGINS}">
<input name="SAVE" type="submit" title="{$CONST.SAVE_CHANGES_TO_LAYOUT}" value="{$CONST.SAVE}">
</div>
</form>

View File

@ -1,71 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $adminAction == 'install'}
<span class="msg_success"><span class="icon-ok-circle"></span> {$install_template|string_format:"{$CONST.TEMPLATE_SET}"}</span>
{/if}
{if $deprecated}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.WARNING_TEMPLATE_DEPRECATED}</span>
{/if}
<section id="template_options">
<h2>{$CONST.STYLE_OPTIONS} ({$cur_template})</h2>
{if $has_config}
{if $adminAction == 'configure'}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.DONE}: {$save_time}</span>
{/if}
<form method="post" action="serendipity_admin.php">
<input name="serendipity[adminModule]" type="hidden" value="templates">
<input name="serendipity[adminAction]" type="hidden" value="configure">
{$form_token}
{$configuration}
</form>
{else}
<p>{$CONST.STYLE_OPTIONS_NONE}</p>
{/if}
</section>
<section id="template_select">
<h2>{$CONST.SELECT_TEMPLATE}</h2>
<ul class="plainList clearfix">
{foreach $templates as $template=>$info}
{if $info.info.engine == 'yes'}{continue}{/if}
{if !empty($template)}
<li><article class="clearfix">
<h3>{$info.info.name}</h3>
{if $info.fullsize_preview || $info.preview}
<div class="preview_image">
{if $info.fullsize_preview}<a href="{$info.fullsize_preview}">{/if}
{if $info.preview}<img src="{$info.preview}" alt="{$CONST.PREVIEW}" >{/if}
{if $info.fullsize_preview}</a>{/if}
</div>
{/if}
<details class="template_info">
<summary>Template info</summary> {* i18n *}
<dl class="clearfix">
<dt class="template_author">{$CONST.AUTHOR}:</dt>
<dd>{$info.info.author}</dd>
<dt class="template_date">{$CONST.LAST_UPDATED}:</dt>
<dd>{$info.info.date}</dd>
<dt class="template_admin">{$CONST.CUSTOM_ADMIN_INTERFACE}:</dt>
<dd>{$info.info.custom_admin_interface}</dd>
</dl>
</details>
<div class="template_status">
{if $template != $cur_template}
{if !$info.unmetRequirements}
<a class="set_as_template" href="?serendipity[adminModule]=templates&amp;serendipity[adminAction]=install&amp;serendipity[theme]={$template}{$info.info.customURI}">{$CONST.SET_AS_TEMPLATE}</a>
{else}
<span class="unmet_requirements block_level">{$info.unmetRequirements}></span>
{/if}
{else}
<span class="installed block_level">{$CONST.ALREADY_INSTALLED}</span>
{/if}
</div>
</article>
</li>
{/if}
{/foreach}
</ul>
</section>

View File

@ -1,116 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if ($get.action == 'ignore')}
{* TODO: don't know what to put here? *}
{elseif ($get.action == 'upgrade')}
{foreach $call_tasks AS $ctask}
{if $is_callable_task}
{$ctasks}
{/if}
{/foreach}
{if $errors}
<h2>{$CONST.DIAGNOSTIC_ERROR}</h2>
<div class="msg_error">
{foreach $errors AS $implode_err}
<p><span class="icon-attention"></span> {$implode_err}</p>
{/foreach}
</div>
{/if}
{/if}
{if (($showAbort && $get.action == 'ignore') || $get.action == 'upgrade')}
{if $get.action == 'ignore'}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.SERENDIPITY_UPGRADER_YOU_HAVE_IGNORED}</span>
{elseif $get.action == 'upgrade'}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.SERENDIPITY_UPGRADER_NOW_UPGRADED|sprintf:$s9y_version}</span>
{/if}
{if $return_here}
{$print_UPGRADER_RETURN_HERE}
{* could also be used as: {$CONST.SERENDIPITY_UPGRADER_RETURN_HERE|sprintf:"<a href='$serendipityHTTPPath'>":'</a>'} *}
{/if}
{else}
<h2>{$CONST.SERENDIPITY_UPGRADER_WELCOME}</h2>
<p>{$CONST.SERENDIPITY_UPGRADER_PURPOSE|sprintf:$s9y_version_installed}</p>
<p>{$CONST.SERENDIPITY_UPGRADER_WHY|sprintf:$s9y_version}</p>
<h3>{$CONST.FIRST_WE_TAKE_A_LOOK}</h3>
<div class="diagnose">
<span class="msg_notice"><span class="icon-info-circle"></span> {$result_diagnose}.</span>
{if $checksums}
<h4>{$CONST.INTEGRITY}</h4>
<ul>
{foreach $upgraderResultDiagnose1 AS $urd1}
<li>{$urd1}</li>
{/foreach}
</ul>
{/if}
<h4>{$CONST.PERMISSIONS}</h4>
<dl>
<dt>{$basedir}</dt>
{foreach $upgraderResultDiagnose2 AS $urd2}
<dd>{$urd2}</dd>
{/foreach}
<dt>{$basedir}{$CONST.PATH_SMARTY_COMPILE}</dt>
{foreach $upgraderResultDiagnose3 AS $urd3}
<dd>{$urd3}</dd>
{/foreach}
{if $isdir_uploadpath}
<dt>{$basedir}{$uploadHTTPPath}</dt>
{foreach $upgraderResultDiagnose4 AS $urd4}
<dd>{$urd4}</dd>
{/foreach}
{/if}
</dl>
{if $showWritableNote}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'}</span>
{/if}
{if ($errorCount > 0)}
<span class="msg_error"><span class="icon-ok-circle"></span> {$CONST.PROBLEM_DIAGNOSTIC}</span>
<a class="icon_link block_level" href="serendipity_admin.php"><span class="icon-help-circle"></span> {$CONST.RECHECK_INSTALLATION}</a>
{/if}
</div>
{if ($errorCount < 1)}
{if (sizeof($sqlfiles) > 0)}
<h3>{$database_update_types}:</h3>
<p>{$CONST.SERENDIPITY_UPGRADER_FOUND_SQL_FILES}:</p>
{if is_array($sqlfiles) && !empty($sqlfiles)}
<ul>
{foreach $sqlfiles as $sqlfile}
<li>{$sqlfile}</li>
{/foreach}
</ul>
{/if}
{/if}
<h3>{$CONST.SERENDIPITY_UPGRADER_VERSION_SPECIFIC}:</h3>
{if is_array($tasks) && !empty($tasks)}
<dl>
{foreach $tasks as $task}
<dt>{$task.version} - {$task.title}</dl>
<dd>{$task.desc|nl2br}</dd>
{/foreach}
</dl>
{/if}
{if ($taskCount == 0)}
<p>{$CONST.SERENDIPITY_UPGRADER_NO_VERSION_SPECIFIC}</p>
{/if}
{if (($taskCount > 0) || (sizeof($sqlfiles) > 0))}
<h3>{$CONST.SERENDIPITY_UPGRADER_PROCEED_QUESTION}</h3>
<a class="block_level" href="{$upgradeLoc}">{$CONST.SERENDIPITY_UPGRADER_PROCEED_DOIT}</a>{if $showAbort} <a href="{$abortLoc}">{$CONST.SERENDIPITY_UPGRADER_PROCEED_ABORT}</a>{/if}
{else}
<h3>{$CONST.SERENDIPITY_UPGRADER_NO_UPGRADES}</h3>
<a class="block_level" href="{$upgradeLoc}">{$CONST.SERENDIPITY_UPGRADER_CONSIDER_DONE}</a>
{/if}
{/if}
{/if}

View File

@ -1,91 +0,0 @@
{* HTML5: Yes *}
{* jQuery: NN *}
{if $delete_yes}
{if $no_delete_permission}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span>
{else}
{if $no_delete_permission_userlevel}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span>
{else}
{if $delete_permission}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.DELETED_USER|sprintf:"{$user|escape:"html"}":"{$realname|escape:"html"}"}</span>
{else}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span>
{/if}
{/if}
{/if}
{/if}
{if $save_new}
{if $no_save_permission}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span>
{else}
{if $no_group_selected}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.WARNING_NO_GROUPS_SELECTED}</span>
{/if}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.CREATED_USER|sprintf:"# {$user|escape:"html"}":"{$realname|escape:"html"}"}</span>
{/if}
{/if}
{if $save_edit}
{if $no_edit_permission}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span>
{else}
{if $no_edit_permission_userlevel}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span>
{else}
{if $no_group_selected}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.WARNING_NO_GROUPS_SELECTED}</span>
{/if}
<span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.MODIFIED_USER|sprintf:"{$realname|escape:"html"}"}</span>
{/if}
{/if}
{/if}
{if $delete == false}
<h2>{$CONST.USER} ({$CONST.USER_LEVEL})</h2>
<ul id="serendipity_users" class="plainList">
{foreach $users as $user}
{if $user.isEditable}
<li class="clearfix">
<span class="user_name user_{if $user.userlevel >= {$CONST.USERLEVEL_ADMIN}}admin{else}{if $user.userlevel >= {$CONST.USERLEVEL_CHIEF}}chief{else}editor{/if}{/if}"><span class="icon-user"></span> {$user.realname|escape:"html"} ({$user.userlevel})</span>
<ul class="plainList edit_actions">
<li><a class="icon_link" href="{$user.authorUrl}" title="{$CONST.PREVIEW} {$user.realname}"><span class="icon-eye"></span><span class="visuallyhidden"> {$CONST.PREVIEW}</span></a></li>
<li><a class="icon_link" href="?serendipity[adminModule]=users&amp;serendipity[adminAction]=edit&amp;serendipity[userid]={$user.authorid}#editform" title="{$CONST.EDIT} {$user.realname|escape:"html"}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
<li><a class="icon_link" href="?{$urlFormToken}&amp;serendipity[adminModule]=users&amp;serendipity[adminAction]=delete&amp;serendipity[userid]=$user.authorid" title="{$CONST.DELETE} {$user.realname|escape:"html"}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
</ul>
</li>
{/if}
{/foreach}
</ul>
{if $new}
<form action="?serendipity[adminModule]=users" method="post">
<input name="NEW" type="submit" value="{$CONST.CREATE_NEW_USER}">
</form>
{/if}
{/if}
{if $show_form}
<form{if $adminAction == 'edit'} id="editform"{/if} action="?serendipity[adminModule]=users#editform" method="post">
{$formToken}
{if $adminAction == 'edit'}{if $create_permission}<input name="serendipity[user]" type="hidden" value="{$from.authorid}">{/if}{/if}
<h3>{if $adminAction == 'edit'}{if $no_create_permission}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{else}{if $create_permission}{$CONST.EDIT}{else}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{/if}{/if}{else}{$CONST.CREATE}{/if}</h3>
{$config}
{if $adminAction == 'edit'}
<input name="SAVE_EDIT" type="submit" value="{$CONST.SAVE}">
{else}
<input name="SAVE_NEW" type="submit" value="{$CONST.CREATE_NEW_USER}">
{/if}
</form>
{else}
{if $delete}
<form action="?serendipity[adminModule]=users" method="post">
{$formToken}
<input name="serendipity[user]" type="hidden" value="{$userid}">
<fieldset class="users_delete_action">
<legend><span>{$CONST.DELETE_USER|sprintf:"{$userid}":"{$realname|escape:"html"}"}</span></legend>
<input name="DELETE_YES" type="submit" value="{$CONST.DUMP_IT}">
<input name="NO" type="submit" value="{$CONST.NOT_REALLY}">
</fieldset>
</form>
{/if}
{/if}

View File

@ -1,207 +0,0 @@
{if $post_save}
{if $new}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />
{$CONST.CATEGORY_SAVED}
</div>
{/if}
{if $edit}
{if isset($editPermission) && $editPermission == false}
<div class="serendipityAdminMsgError msg_error">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />
{$CONST.PERM_DENIED}
</div>
{else}
{if $subcat}
{$subcat}
{else}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />
{$CONST.CATEGORY_SAVED}
</div>
{/if}
{/if}
{/if}
{/if}
{if $doDelete}
{if $deleteSuccess}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />
{if $remainingCat}
{$CONST.CATEGORY_DELETED_ARTICLES_MOVED|sprintf:$remainingCat:$cid}
{else}
{$cid|string_format:"{$CONST.CATEGORY_DELETED}"}
{/if}
</div>
{else}
<div class="serendipityAdminMsgError msg_error">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />
{$CONST.INVALID_CATEGORY}
</div>
{/if}
{/if}
{if $delete}
{if $deletePermission == true}
<form method="POST" name="serendipityCategory" action="?serendipity[adminModule]=category&amp;serendipity[adminAction]=doDelete&amp;serendipity[cid]={$cid}">
{$formToken}
<h3>{$categoryName|escape:"html"}</h3>
{$CONST.CATEGORY_REMAINING}:
<select name="serendipity[cat][remaining_catid]">
<option value="0">- {$CONST.NO_CATEGORY} -</option>
{foreach $cats as $cat_data}
<option value="{$cat_data.categoryid}">{$cat_data.category_name|escape:"html"}</option>
{/foreach}
</select>
<input type="submit" name="REMOVE" value="{$CONST.GO}" class="serendipityPrettyButton input_button">
</form>
{/if}
{/if}
{if (! $post_save) && ($edit || $new)}
{if $edit}
<strong>{$category_name|escape:"html"|string_format:"{$CONST.EDIT_THIS_CAT}"}</strong>
{/if}
<form method="POST" name="serendipityCategory">
{$formToken}
<table cellpadding="5" width="100%">
<tr>
<td>{$CONST.NAME}</td>
<td><input class="input_textbox" type="text" name="serendipity[cat][name]" value="{$this_cat.category_name|default:""|escape:"html"}" /></td>
<td rowspan="5" align="center" valign="middle" width="200" style="border: 1px solid #ccc">
<img src="{$this_cat.category_icon|default:""|escape:"html"}" id="imagepreview" {if ! $this_cat.category_icon} style="display: none" {/if} />
</td>
</tr>
<tr>
<td>{$CONST.DESCRIPTION}</td>
<td><input class="input_textbox" type="text" name="serendipity[cat][description]" value="{$this_cat.category_description|default:""|escape:"html"}" /></td>
</tr>
<tr>
<td>{$CONST.IMAGE}</td>
<td>
<script type="text/javascript" language="JavaScript" src="serendipity_editor.js"></script>
<input class="input_textbox" type="text" id="img_icon" name="serendipity[cat][icon]" value="{$this_cat.category_icon|default:""|escape:"html"}" onchange="document.getElementById('imagepreview').src = this.value; document.getElementById('imagepreview').style.display = '';" />
<script type="text/javascript" language="JavaScript">
var img_icon = document.getElementById('img_icon');
var imgBtn = document.createElement('div');
imgBtn.id = "category_ml_popup";
imgBtn.innerHTML = '<input type="button" name="insImage" value="{$CONST.IMAGE}" onclick="window.open(\'serendipity_admin_image_selector.php?serendipity[htmltarget]=img_icon&amp;serendipity[filename_only]=true\', \'ImageSel\', \'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1\');" class="serendipityPrettyButton input_button" />';
img_icon.parentNode.insertBefore(imgBtn, img_icon.nextSibling);
</script>
</td>
</tr>
<tr>
<td><label for="read_authors">{$CONST.PERM_READ}</label></td>
<td>
<select size="6" id="read_authors" multiple="multiple" name="serendipity[cat][read_authors][]">
<option value="0" {if $selectAllReadAuthors}selected="selected"{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups as $group}
<option value="{$group.confkey}"
{if isset($read_groups.{$group.confkey})}
selected="selected"
{/if} >
{$group.confvalue|escape:"html"}
</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td><label for="write_authors"><{$CONST.PERM_WRITE}</label></td>
<td>
<select size="6" id="write_authors" multiple="multiple" name="serendipity[cat][write_authors][]">
<option value="0" {if $selectAllReadAuthors}selected="selected"{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups as $group}
<option value="{$group.confkey}" {if isset($read_groups.{$group.confkey})} selected="selected" {/if} > {$group.confvalue|escape:"html"}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td><label for="parent_cat">{$CONST.PARENT_CATEGORY}</label></td>
<td>
<select id="parent_cat" name="serendipity[cat][parent_cat]">
<option value="0" {if $cid == 0} selected="selected" {/if}>[ {$CONST.NO_CATEGORY} ]</option>
{foreach $categories as $cat}
{* We can't be our own parent, the universe will collapse *}
{if $cat.categoryid == $cid}{continue}{/if}
<option value="{$cat.categoryid}" {if $this_cat.parentid == $cat.categoryid} selected="selected"{/if} >
{for $i=1 to $cat.depth}&nbsp{/for} $cat.category_name
</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td><{$CONST.CATEGORY_HIDE_SUB}<br /><em>{$CONST.CATEGORY_HIDE_SUB_DESC}</em></td>
<td valign="top">
<input class="input_radio" type="radio" name="serendipity[cat][hide_sub]" value="0"
{if $this_cat.hide_sub == 0}
checked="checked"
{/if}
id="hide_sub_no" />
<label for="hide_sub_no">
{$CONST.NO}
</label>
<input class="input_radio" type="radio" name="serendipity[cat][hide_sub]" value="1" {if $this_cat.hide_sub== 1} checked="checked"{/if} id="hide_sub_yes" /> <label for="hide_sub_yes">{$CONST.YES}</label>
</td>
</tr>
</table>
<div><input type="submit" name="SAVE" value="{$save}" class="serendipityPrettyButton input_button" /></div>
</form>
{/if}
{if $view}
{if is_array($viewCats)}
{$CONST.CATEGORY_INDEX}:
{else}
<div align="center">- {$CONST.NO_CATEGORIES} -</div>
{/if}
<br /><br />
<table cellspacing="0" cellpadding="4" width="100%" border=0>
{foreach $viewCategories as $category}
<tr>
<td width="16">
<a title="{$CONST.EDIT}" href="?serendipity[adminModule]=category&amp;serendipity[adminAction]=edit&amp;serendipity[cid]={$category.categoryid}">
<img src="{serendipity_getFile file='admin/img/edit.png'}" border="0" alt="{$CONST.EDIT}" />
</a>
</td>
<td width="16">
<a title="{$CONST.DELETE}" href="?serendipity[adminModule]=category&amp;serendipity[adminAction]=delete&amp;serendipity[cid]={$category.categoryid}">
<img src="{serendipity_getFile file='admin/img/delete.png'}" border="0" alt="{$CONST.DELETE}" />
</a>
</td>
<td width="16">
{if $category.category_icon}
<img src="{serendipity_getFile file='admin/img/thumbnail.png'}" alt="" />
{else}
&nbsp;
{/if}
</td>
<td width="300" style="padding-left: {$category.depth*15+20}px">
<img src="{serendipity_getFile file='admin/img/folder.png'}" style="vertical-align: bottom;">
{$category.category_name|escape:"html"}
</td>
<td>
{$category.category_description|escape:"html"}
</td>
<td align="right">
{if $category.authorid == 0}
{$CONST.ALL_AUTHORS}
{else}
{$category.realname|escape:"html"}
{/if}
</td>
</tr>
{/foreach}
<tr>
<td colspan="6" align="right">
<a href="?serendipity[adminModule]=category&serendipity[adminAction]=new" class="serendipityPrettyButton input_button">{$CONST.CREATE_NEW_CAT}</a>
</td>
</tr>
</table>
{/if}

View File

@ -1,202 +0,0 @@
{if !empty($errormsg)}
<p class="serendipityAdminMsgNote msg_notice"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_note.png'}" alt="" />{$errormsg}</p>
{/if}
<script type="text/javascript">
var view_full = '{$CONST.VIEW_FULL}';
var view_hide = '{$CONST.HIDE}';
</script>
<script src="serendipity_editor.js"></script>
<form action="" method="GET" style="margin: 0">
{$formtoken}
<input type="hidden" name="serendipity[adminModule]" value="comments" />
<input type="hidden" name="serendipity[page]" value="{$page}" />
<table class="serendipity_admin_filters" width="100%">
<tr>
<td colspan="6" class="serendipity_admin_filters_headline"><strong>{$CONST.FILTERS}</strong> - {$CONST.FIND_COMMENTS}</td>
</tr>
<tr>
<td>{$CONST.AUTHOR}:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][author]" size="15" value="{$get.filter.author|escape}" /></td>
<td>{$CONST.EMAIL}:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][email]" size="15" value="{$get.filter.email|escape}" /></td>
<td>{$CONST.URL}:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][url]" size="15" value="{$get.filter.url|escape}" /></td>
</tr>
<tr>
<td>IP:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][ip]" size="15" value="{$get.filter.ip|escape}" /></td>
<td>{$CONST.CONTENT}:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][body]" size="15" value="{$get.filter.body|escape}" /></td>
<td>{$CONST.REFERER}:</td>
<td><input class="input_textbox" type="text" name="serendipity[filter][referer]" size="15" value="{$get.filter.referer|escape}" /></td>
</tr>
<tr>
<td>{$CONST.COMMENTS}:</td>
<td>
{* Smarty 3 does support ternary syntax e.g. {('N'==$foo)?'Yes':'No'} *}
<select name="serendipity[filter][perpage]">
{foreach $filter_vals AS $filter}
<option value="{$filter}" {($commentsPerPage == $filter) ? ' selected="selected"' : ''}>{$filter}</option>
{/foreach}
</select>
</td>
<td>{$CONST.COMMENTS_FILTER_SHOW}:</td>
<td>
<select name="serendipity[filter][show]">
<option value="all"{if $get.filter.show == 'all'} selected="selected"{/if}>{$CONST.COMMENTS_FILTER_ALL}</option>
<option value="approved"{if $get.filter.show == 'approved'} selected="selected"{/if}>{$CONST.COMMENTS_FILTER_APPROVED_ONLY}</option>
<option value="pending"{if $get.filter.show == 'pending'} selected="selected"{/if}>{$CONST.COMMENTS_FILTER_NEED_APPROVAL}</option>
<option value="confirm"{if $get.filter.show == 'confirm'} selected="selected"{/if}>{$CONST.COMMENTS_FILTER_NEED_CONFIRM}</option>
</select>
</td>
<td>{$CONST.TYPE}</td>
<td>
<select name="serendipity[filter][type]">
<option value="">{$CONST.COMMENTS_FILTER_ALL}</option>
<option value="NORMAL"{if $c_type == 'NORMAL'} selected="selected"{/if}>{$CONST.COMMENTS}</option>
<option value="TRACKBACK"{if $c_type == 'TRACKBACK'} selected="selected"{/if}>{$CONST.TRACKBACKS}</option>
<option value="PINGBACK"{if $c_type == 'PINGBACK'} selected="selected"{/if}>{$CONST.PINGBACKS}</option>
</select>
</td>
</tr>
<tr>
<td colspan="6" align="right"><input type="submit" name="submit" value=" - {$CONST.GO} - " class="serendipityPrettyButton input_button" /> {serendipity_hookPlugin hookAll=true hook="backend_comments_top" addData=$sql}</td>
</tr>
</table>
</form>
<hr noshade="noshade" /><br />
{if !is_array($sql)}
<div align="center">- {$CONST.NO_COMMENTS} -</div>
<div align="center">- Return to default comment list <a href="serendipity_admin.php?serendipity[adminModule]=comments">"here"</a>. -</div>
{else}
<form action="" method="POST" name="formMultiDelete" id="formMultiDelete">
{$formtoken}
<input type="hidden" name="serendipity[formAction]" value="multiDelete" />
<table width="100%" cellpadding="3" border="0" cellspacing="0">
<tr>
<td align="center">
<table width="100%" cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
{if ( $page != 1 && $page <= $pages )}
<a href="{$linkPrevious}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/previous.png'}" />{$CONST.PREVIOUS}</a>
{/if}
</td>
<td align="center">{$CONST.PAGE_BROWSE_COMMENTS|sprintf:$page:$pages:$totalComments}</td>
<td align="right">
{if $page != $pages}
<a href="{$linkNext}" class="serendipityIconLinkRight">{$CONST.NEXT}<img src="{serendipity_getFile file='admin/img/next.png'}" /></a>
{/if}
</td>
</tr>
</table>
</td>
</tr>
{if is_array($comments)}
{* see dashboard PoC :: block_comments_pending.tpl or block_comments.tpl as example *}
{foreach $comments AS $comment}
<tr>
<td class="{$comment.header_class}">
{if !empty($comment.header_class)}
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_note.png'}" alt="" />
{/if}
<a name="c{$comment.id}"></a>{* NOTE: a $comment.pubdate with 'c' is available *}
{($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id}, {$CONST.IN_REPLY_TO} <strong><a href="{$comment.entry_url}">{$comment.title|escape}</a></strong>{$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'}
</td>
</tr>
<tr>
<td class="serendipity_admin_list_item {$comment.class}" id="comment_{$comment.id}">
<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>
<td rowspan="3" width="20" align="center"><input class="input_checkbox" type="checkbox" name="serendipity[delete][{$comment.id}]" value="{$comment.entry_id}" onclick="highlightComment('comment_{$comment.id}', this.checked)" tabindex="{$i}" /></td>
<td width="40%"><strong>{$CONST.AUTHOR}</strong>: {$comment.author|escape|truncate:30:"&hellip;"} {$comment.action_author}</td>
<td><strong>{$CONST.EMAIL}</strong>:
{if empty($comment.email)} N/A {else}
<a href="mailto:{$comment.email|escape}" title="{$comment.email|escape}">{$comment.email|escape|truncate:30:"&hellip;"}</a>
{if $comment.subscribed == 'true'} <span class="serendipity_subscription_on">({$CONST.ACTIVE_COMMENT_SUBSCRIPTION})</span>{/if}
{/if}
{$comment.action_email}
</td>
</tr>
<tr>
<td width="40%"><strong>IP</strong>:
{if empty($comment.ip)} 0.0.0.0 {else} {$comment.ip|escape} {/if}
{$comment.action_ip}
</td>
<td><strong>{$CONST.URL}</strong>:
{if empty($comment.url)} N/A {else} <a href="{$comment.url|escape}" title="{$comment.url|escape}" target="_blank">{$comment.url|escape|truncate:30:"&hellip;"}</a> {/if}
{$comment.action_url}
</td>
</tr>
<tr>
<td width="40%">&nbsp;</td>
<td><strong>{$CONST.REFERER}</strong>:
{if empty($comment.referer)} N/A {else} <a href="{$comment.referer|escape}" title="{$comment.referer|escape}" target="_blank">{$comment.referer|escape|truncate:30:"&hellip;"}</a> {/if}
{$comment.action_referer}
</td>
<tr>
<td style="border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC" colspan="3">
<div id="{$comment.id}_summary">{$comment.summary}</div>
<div id="{$comment.id}_full" style="display: none">{$comment.fullBody}</div>
</td>
</tr>
</table>
{if ($comment.status == 'pending') || ($comment.status == 'confirm')}
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=approve&amp;serendipity[id]={$comment.id}&amp;{$urltoken}" class="serendipityIconLink" title="{$CONST.APPROVE}"><img src="{serendipity_getFile file='admin/img/accept.png'}" alt="{$CONST.APPROVE}" />{$CONST.APPROVE}</a>
{/if}
{if ($comment.status == 'approved')}
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=pending&amp;serendipity[id]={$comment.id}&amp;{$urltoken}" class="serendipityIconLink" title="{$CONST.SET_TO_MODERATED}"><img src="{serendipity_getFile file='admin/img/clock.png'}" alt="{$CONST.SET_TO_MODERATED}" />{$CONST.SET_TO_MODERATED}</a>
{/if}
{if $comment.excerpt}
<a href="#c{$comment.id}" onclick="FT_toggle({$comment.id}); return false;" title="{$CONST.VIEW}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/zoom.png'}" alt="{$CONST.TOGGLE_ALL}" /><span id="{$comment.id}_text">{$CONST.TOGGLE_ALL}</span></a>
{/if}
<a target="_blank" href="{$comment.entrylink}" title="{$CONST.VIEW}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/zoom.png'}" alt="{$CONST.VIEW}" />{$CONST.VIEW}</a>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;{$urltoken}" title="{$CONST.EDIT}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/edit.png'}" alt="{$CONST.EDIT}" />{$CONST.EDIT}</a>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=delete&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;{$urltoken}" onclick='return confirm("{($CONST.COMMENT_DELETE_CONFIRM|sprintf:$comment.id:$comment.author)|escape}")' title="{$CONST.DELETE}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/delete.png'}" alt="{$CONST.DELETE}" />{$CONST.DELETE}</a>
<a target="_blank" onclick="cf = window.open(this.href, 'CommentForm', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1'); cf.focus(); return false;" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=reply&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;serendipity[noBanner]=true&amp;serendipity[noSidebar]=true&amp;{$urltoken}" title="{$CONST.REPLY}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/user_editor.png'}" alt="{$CONST.REPLY}" />{$CONST.REPLY}</a>
{$comment.action_more}
</td>
</tr>
<tr>
<td><hr noshade="noshade" /></td>
</tr>
{/foreach}
{/if}{* array $comments end *}
<tr>
<td>
<input type="button" name="toggle" value="{$CONST.INVERT_SELECTIONS}" onclick="invertSelection()" class="serendipityPrettyButton input_button" />
<input type="submit" name="toggle" value="{$CONST.DELETE_SELECTED_COMMENTS}" onclick="return confirm('{$CONST.COMMENTS_DELETE_CONFIRM}')" tabindex="{($i+1)}" class="serendipityPrettyButton input_button" />
<input type="submit" name="serendipity[togglemoderate]" value="{$CONST.MODERATE_SELECTED_COMMENTS}" class="serendipityPrettyButton input_button" />
</td>
</tr>
</table>
<table width="100%" cellpadding="3" border="0" cellspacing="0">
<tr>
<td align="center">
<table width="100%" cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
{if ( $page != 1 && $page <= $pages )}
<a href="{$linkPrevious}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/previous.png'}" />{$CONST.PREVIOUS}</a>
{/if}
</td>
<td align="center">{$CONST.PAGE_BROWSE_COMMENTS|sprintf:$page:$pages:$totalComments}</td>
<td align="right">
{if $page != $pages}
<a href="{$linkNext}" class="serendipityIconLinkRight">{$CONST.NEXT}<img src="{serendipity_getFile file='admin/img/next.png'}" /></a>
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{/if} {* if no comments else comments end *}

View File

@ -1,31 +0,0 @@
{if $installAction == "check"}
{if $diagnosticError}
{$CONST.DIAGNOSTIC_ERROR}
<div class="serendipityAdminMsgError msg_error">-
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />
{foreach $res as $r}
{$r} <br />
{/foreach}
</div>
<br />
<br />
{else}
{if $htaccessRewrite}
{$CONST.ATTEMPT_WRITE_FILE|sprintf:"{$serendipityPath}htaccess"}
{if is_array($res)}
{foreach $res as $r}
{$r} <br />
{/foreach}
{else}
{$CONST.DONE} <br />
{/if}
{/if}
<br />
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.WRITTEN_N_SAVED}
</div>
{/if}
{else}
{$config}
{/if}

View File

@ -1,252 +0,0 @@
{if $drawList}
<div class="serendipity_admin_list">
<form action="?" method="get">
<input type="hidden" name="serendipity[action]" value="admin" />
<input type="hidden" name="serendipity[adminModule]" value="entries" />
<input type="hidden" name="serendipity[adminAction]" value="editSelect" />
<table width="100%" class="serendipity_admin_filters">
<tr>
<td class="serendipity_admin_filters_headline" colspan="6"><strong>{$CONST.FILTERS}</strong> - {$CONST.FIND_ENTRIES}</td>
</tr>
<tr>
<td valign="top" width="80">{$CONST.AUTHOR}</td>
<td valign="top">
<select name="serendipity[filter][author]">
<option value="">--</option>
{if is_array($users)}
{foreach $users AS $user}
{if isset($user.artcount) && $user.artcount < 1}{continue}{/if}
<option value="{$user.authorid}" {(isset($get.filter.author) && ($get.filter.author == $user.authorid)) ? 'selected="selected"' : ''}>{$user.realname|escape}</option>
{/foreach}
{/if}
</select>
<select name="serendipity[filter][isdraft]">
<option value="all">{$CONST.COMMENTS_FILTER_ALL}</option>
<option value="draft" {(isset($get.filter.isdraft) && ($get.filter.isdraft == 'draft') ? 'selected="selected"' : '')}>{$CONST.DRAFT}</option>
<option value="publish" {(isset($get.filter.isdraft) && ($get.filter.isdraft == 'publish') ? 'selected="selected"' : '')}>{$CONST.PUBLISH}</option>
</select>
</td>
<td valign="top" width="80">{$CONST.CATEGORY}</td>
<td valign="top">
<select name="serendipity[filter][category]">
<option value="">--</option>
{foreach $categories as $cat}
<option value="{$cat.categoryid}"{($get.filter.category == $cat.categoryid) ? ' selected="selected"' : ''}>{'&nbsp;'|str_repeat:$cat.depth} {$cat.category_name|escape}</option>
{/foreach}
</select>
</td>
<td valign="top" width="80">{$CONST.CONTENT}</td>
<td valign="top"><input class="input_textbox" size="10" type="text" name="serendipity[filter][body]" value="{(isset($get.filter.body)) ? "{$get.filter.body|escape}" : ''}" /></td>
</tr>
<tr>
<td class="serendipity_admin_filters_headline" colspan="6"><strong>{$CONST.SORT_ORDER}</strong></td>
</tr>
<tr>
<td>
{$CONST.SORT_BY}
</td>
<td>
<select name="serendipity[sort][order]">
{foreach $sort_order as $so_key => $so_val}
<option value="{$so_key}" {(isset($get.sort.order) && ($get.sort.order == $so_key) ? 'selected="selected"': '')}>{$so_val}</option>
{/foreach}
</select>
</td>
<td>{$CONST.SORT_ORDER}</td>
<td>
<select name="serendipity[sort][ordermode]">
<option value="DESC" {(isset($get.sort.ordermode) && ($get.sort.ordermode == 'DESC') ? 'selected="selected"' : '')}>{$CONST.SORT_ORDER_DESC}</option>
<option value="ASC" {(isset($get.sort.ordermode) && ($get.sort.ordermode == 'ASC') ? 'selected="selected"' : '')}>{$CONST.SORT_ORDER_ASC}</option>
</select>
</td>
<td>{$CONST.ENTRIES_PER_PAGE}</td>
<td>
<select name="serendipity[sort][perPage]">
{foreach $per_page AS $per_page_nr}
<option value="{$per_page_nr}" {((isset($get.sort.perPage) && ($get.sort.perPage == $per_page_nr)) ? 'selected="selected"' : '')}>{$per_page_nr}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td align="right" colspan="6"><input type="submit" name="go" value="{$CONST.GO}" class="serendipityPrettyButton input_button" /></td>
</tr>
</table>
</form>
{if $is_entries}
<table class="serendipity_admin_list" cellpadding="5" width="100%">
<tr>
<td>
{if $offSet > 0}
<a href="{$linkPrevious}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/previous.png'}" />{$CONST.PREVIOUS}</a>
{/if}
</td>
<td align="right">
{if $count > $perPage}
<a href="{$linkNext}" class="serendipityIconLinkRight">{$CONST.NEXT}<img src="{serendipity_getFile file='admin/img/next.png'}" /></a>
{/if}
</td>
</tr>
</table>
<script type="text/javascript" language="JavaScript" src="{serendipity_getFile file='admin/admin_scripts.js'}"></script>
<form action="?" method="post" name="formMultiDelete" id="formMultiDelete">
{$formtoken}
<input type="hidden" name="serendipity[action]" value="admin" />
<input type="hidden" name="serendipity[adminModule]" value="entries" />
<input type="hidden" name="serendipity[adminAction]" value="multidelete" />
{foreach $entries as $entry}
{if ($entry@index > $perPage)}{continue}{/if}
<div class="serendipity_admin_list_item serendipity_admin_list_item_{($entry@index % 2) ? 'even' : 'uneven'}">
<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td>
<strong>{if (!$showFutureEntries) && ($entry.timestamp >= $serverOffsetHour)}<a href="#" title="{$CONST.ENTRY_PUBLISHED_FUTURE}" onclick="alert(this.title)"><img src="{serendipity_getFile file='admin/img/clock_future.png'}" alt="*" style="border: 0px none ; vertical-align: bottom;" /></a> {else}{/if}{if $entry.ep_is_sticky} {$CONST.STICKY_POSTINGS}: {/if}{if $entry.isdraft}{$CONST.DRAFT}: {/if}<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$entry.id}" title="#{$entry.id}">{$entry.title|escape|truncate:50:"&hellip;"}</a></strong>
</td>
<td align="right">
{* Find out if the entry has been modified later than 30 minutes after creation *}
{$entry.timestamp|@formatTime:"{$CONST.DATE_FORMAT_SHORT}"} {if $entry.timestamp <= ($entry.last_modified - (60*30))}<a href="#" title="{$CONST.LAST_UPDATED}: {$entry.last_modified|@formatTime:"{$CONST.DATE_FORMAT_SHORT}"}" onclick="alert(this.title)"><img src="{serendipity_getFile file='admin/img/clock.png'}" alt="*" style="border: 0px none ; vertical-align: bottom;" /></a>{else}{/if}
</td>
</tr>
<tr>
<td>
{$CONST.POSTED_BY} {$entry.author|escape}
{if count($entry.cats)}
{$CONST.IN}
{foreach $entry.cats AS $cat}
{$cat}{if (count($entry.cats) > 1) && !$cat@last}, {/if}
{/foreach}
{/if}
</td>
<td align="right">
{if $entry.preview || (!$showFutureEntries && ($entry.timestamp >= $serverOffsetHour))}
<a href="{$entry.preview_link}" title="{$CONST.PREVIEW} #{$entry.id}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/zoom.png'}" alt="{$CONST.PREVIEW}" />{$CONST.PREVIEW}</a>
{else}
<a href="{$entry.archive_link}" title="{$CONST.VIEW} #{$entry.id}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/zoom.png'}" alt="{$CONST.VIEW}" />{$CONST.VIEW}</a>
{/if}
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$entry.id}" title="{$CONST.EDIT} #{$entry.id}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/edit.png'}" alt="{$CONST.EDIT}" />{$CONST.EDIT}</a>
<a href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=delete&amp;serendipity[id]={$entry.id}&amp;{$urltoken}" title="{$CONST.DELETE} #{$entry.id}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/delete.png'}" alt="{$CONST.DELETE}" />{$CONST.DELETE}</a>
<input class="input_checkbox" type="checkbox" name="serendipity[multiDelete][]" value="{$entry.id}" />
</td>
</tr>
</table>
</div>
{/foreach}
{/if} {* end is_entries *}
<table class="serendipity_admin_list" cellpadding="5" width="100%">
<tr>
<td>
{if $offSet > 0}
<a href="{$linkPrevious}" class="serendipityIconLink"><img src="{serendipity_getFile file='admin/img/previous.png'}" />{$CONST.PREVIOUS}</a>
{/if}
</td>
<td align="right">
{if $count > $perPage}
<a href="{$linkNext}" class="serendipityIconLinkRight">{$CONST.NEXT}<img src="{serendipity_getFile file='admin/img/next.png'}" /></a>
{/if}
</td>
</tr>
</table>
<table class="serendipity_admin_list" cellpadding="0" width="100%">
<tr>
<td align="right">
<input type="button" name="toggle" value="{$CONST.INVERT_SELECTIONS}" onclick="invertSelection()" class="serendipityPrettyButton input_button" />
<input type="submit" name="toggle" value="{$CONST.DELETE_SELECTED_ENTRIES}" class="serendipityPrettyButton input_button" />
</td>
</tr>
</table>
</form>
<div class="serendipity_admin_list_item serendipity_admin_list_item_{(($entry@index+1) % 2) ? 'even' : 'uneven'}">
<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td>
<form action="?" method="get">
<input type="hidden" name="serendipity[action]" value="admin" />
<input type="hidden" name="serendipity[adminModule]" value="entries" />
<input type="hidden" name="serendipity[adminAction]" value="editSelect" />
{$CONST.EDIT_ENTRY}: #<input class="input_textbox" type="text" size="3" name="serendipity[id]" /> <input type="submit" name="serendipity[editSubmit]" value="{$CONST.GO}" class="serendipityPrettyButton input_button" />
</form>
</td>
</tr>
</table>
</div>
</div><!-- // div.serendipity_admin_list drawList end -->
{/if}{* $drawList end *}
{if $no_entries}
<div class="serendipity_admin_list">
{* We've got nothing *}
<table class="serendipity_admin_list" cellpadding="0" width="100%">
<tr>
<td align="center" class="serendipityAdminMsgNote msg_notice">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_note.png'}" alt="" />
{$CONST.NO_ENTRIES_TO_PRINT}
</td>
</tr>
</table>
</div><!-- // div.serendipity_admin_list no entries end -->
{/if}
{if $switched_output}
{if ($get.adminAction && $dateval)}
{$CONST.DATE_INVALID}
<br />
{/if}
{if ($get.adminAction && $use_legacy)}
{if $is_draft}
<div class="serendipityAdminMsgSuccess msg_success"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />{$CONST.IFRAME_SAVE_DRAFT}</div><br />
{/if}
{if $is_iframe}
<div class="serendipityAdminMsgSuccess msg_success"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />{$CONST.IFRAME_SAVE}</div><br />
{/if}
{if $is_iframepreview}
<div class="serendipityAdminMsgSuccess msg_success"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />{$CONST.IFRAME_PREVIEW}</div><br />
{/if}
{/if}
{if ($is_doDelete || $is_doMultiDelete )}
{foreach $del_entry AS $delent}
{$delent}
<br />
{/foreach}
{/if}
{if ( $is_delete || $is_multidelete )}
{* delent and ripent look like $CONST.DELETE_SURE|sprintf:"$del_entry_id - $del_entry_title" *}
{foreach $rip_entry AS $ripent}
{$ripent}
<br />
{/foreach}
<br />
<br />
<div>
<a href="{$smarty.server.HTTP_REFERER|escape}" class="serendipityPrettyButton input_button">{$CONST.NOT_REALLY}</a>
{'&nbsp;'|str_repeat:10}
<a href="{$newLoc}" class="serendipityPrettyButton input_button">{$CONST.DUMP_IT}</a>
</div>
{/if}
{/if}

View File

@ -1,3 +0,0 @@
{$CONST.WELCOME_BACK} {$smarty.session.serendipityUser|escape}

View File

@ -1,3 +0,0 @@
<div>
<a href="{$serendipityBaseURL}rss.php?version=2.0&all=1" class="serendipityPrettyButton input_button">{$CONST.EXPORT_FEED}</a>
</div>

View File

@ -1,190 +0,0 @@
{if $delete_yes}
<div class="serendipityAdminMsgSuccess msg_success">
<img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.DELETED_GROUP|sprintf:"{$group_id|escape:"html"}":"{$group.name|escape:"html"}"}
</div>
{/if}
{if $save_new}
<div class="serendipityAdminMsgSuccess msg_success">
<img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.CREATED_GROUP|sprintf:"{$group_id|escape:"html"}":"{$group.name|escape:"html"}"}
</div>
{/if}
{if $save_edit}
<div class="serendipityAdminMsgSuccess msg_success">
<img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.MODIFIED_GROUP|sprintf:"{$name|escape:"html"}"}
</div>
{/if}
{if !$delete}
<table width="100%">
<tr>
<td><strong>{$CONST.GROUP}</strong></td>
<td width="200">&nbsp;</td>
</tr>
<tr>
<td colspan="3">
{foreach $groups as $group}
<div class="serendipity_admin_list_item serendipity_admin_list_item_{if $group@iteration is even} even {else} uneven {/if}">
<table width="100%">
<tr>
<td>{$group.name|escape:"html"}</td>
<td width="200" align="right">
<a href="?serendipity[adminModule]=groups&amp;serendipity[adminAction]=edit&amp;serendipity[group]={$group.id}" title="{$CONST.EDIT} {$group.name|escape:"html"}" class="serendipityIconLink">
<img src="{serendipity_getFile file="admin/img/edit.png"}" alt="{$CONST.EDIT} {$group.name|escape:"html"}" />
{$CONST.EDIT}
</a>
<a href="?{$deleteFormToken}&amp;serendipity[adminModule]=groups&amp;serendipity[adminAction]=delete&amp;serendipity[group]={$group.id}" title="{$CONST.DELETE} {$group.name|escape:"html"}" class="serendipityIconLink">
<img src="{serendipity_getFile file="admin/img/delete.png"}" alt="{$CONST.DELETE} {$group.name|escape:"html"}" />
{$CONST.DELETE}
</a>
</td>
</tr>
</table>
</div>
{/foreach}
</td>
</tr>
{if $start}
<tr>
<td colspan="3" align="right">
<form action="?serendipity[adminModule]=groups" method="post">
<input type="submit" name="NEW" value="{$CONST.CREATE_NEW_GROUP}" class="serendipityPrettyButton input_button" />
</form>
</td>
</tr>
{/if}
</table>
{/if}
{if $edit || $new}
<br />
<br />
<hr noshade="noshade">
<form action="?serendipity[adminModule]=groups" method="post">
{$formToken}
<div>
<h3>
{if $edit}
{$CONST.EDIT}
<input type="hidden" name="serendipity[group]" value="{$from.id}" />
{else}
{$CONST.CREATE}
{/if}
</h3>
<table>
<tr>
<td>{$CONST.NAME}</td>
<td><input class="input_textbox" type="text" name="serendipity[name]" value="{$from.name|escape:"html"}" /></td>
</tr>
<tr>
<td valign="top">{$CONST.USERCONF_GROUPS}</td>
<td>
<select name="serendipity[members][]" multiple="multiple" size="5">
{foreach $allusers as $user}
<option value="{$user.authorid}" {if isset($selected.{$user.authorid})} selected="selected"{/if} >{$user.realname|escape:"html"}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
{foreach $perms as $perm}
{if {{$perm@key}|truncate:"2":""} == "f_"}{continue}{/if}
{if !isset($section)}
{$section=$perm@key}
{/if}
{if $section != {$perm@key} && {{$perm@key}|truncate:"{$section|count_characters}":""} == $section}
{$indent="&nbsp;&nbsp;"}
{$indentB=""}
{else}
{if $section != {$perm@key}}
{$indent="<br />"}
{$indentB="<br />"}
{$section="{$perm@key}"}
{/if}
{/if}
{if !$perm.permission}
<tr>
<td>{$indent} {$perm.permission_name|escape:"html"}</td>
<td>{$indentB} {(isset($from.{$perm@key}) && $from.{$perm@key} == "true") ? $CONST.YES : $CONST.NO} </td>
</tr>
{else}
<tr>
<td>{$indent} <label for="{{$perm@key}|escape:"html"}">{$perm.permission_name|escape:"html"}</label></td>
<td>{$indentB} <input class="input_checkbox" id="{{$perm@key}|escape:"html"}" type="checkbox" name="serendipity[{{$perm@key}|escape:"html"}]" value="true" {if isset({$from.{$perm@key}}) && {$from.{$perm@key}} == "true"} checked="checked" {/if} /></td>
</tr>
{/if}
{/foreach}
{if $enablePluginACL}
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td valign="top">{$CONST.PERMISSION_FORBIDDEN_PLUGINS}</td>
<td>
<select name="serendipity[forbidden_plugins][]" multiple="multiple" size="5">
{foreach $allplugins as $plugin}
<option value="{{$plugin@key}|escape:"url"} {if $plugin.has_permission == false} selected="selected" {/if} >{$plugin.b->properties.name|escape:"html"}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td valign="top">{$CONST.PERMISSION_FORBIDDEN_HOOKS}</td>
<td>
<select name="serendipity[forbidden_hooks][]" multiple="multiple" size="5">
{foreach $allhooks as $hook}
<option value="{{$hook@key}|escape:"url"}" {$hook.has_permission == false} 'selected="selected"}>{{$hook@key}|escape:"html"}</option>
{/foreach}
</select>
</td>
</tr>
{else}
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">{$CONST.PERMISSION_FORBIDDEN_ENABLE_DESC}</td>
</tr>
{/if}
</table>
{if $edit}
<input type="submit" name="SAVE_EDIT" value="{$CONST.SAVE}" class="serendipityPrettyButton input_button" />
{$CONST.WORD_OR} -
<input type="submit" name="SAVE_NEW" value="{$CONST.CREATE_NEW_GROUP}" class="serendipityPrettyButton input_button" />
{else}
<input type="submit" name="SAVE_NEW" value="{$CONST.CREATE_NEW_GROUP}" class="serendipityPrettyButton input_button" />
{/if}
</div>
</form>
{else}
{if $delete}
<form action="?serendipity[adminModule]=groups" method="post">
<div>
{$CONST.DELETE_GROUP|sprintf:"{$group_id}":"{$group.name|escape:"html"}"}
<br /><br />
{$formToken}
<input type="hidden" name="serendipity[group]" value="{$group_id|escape:"html"}" />
<input type="submit" name="DELETE_YES" value="{$CONST.DUMP_IT}" class="serendipityPrettyButton input_button" />
<input type="submit" name="NO" value="{$CONST.NOT_REALLY}" class="serendipityPrettyButton input_button" />
</div>
</form>
{/if}
{/if}

View File

@ -1,347 +0,0 @@
{if $case_imgedit}
<div class="warning js_warning"><em>{$CONST.PREFERENCE_USE_JS_WARNING}</em></div>
{** Let the IMGEditor do its magic. It will parse its results straightly into a template variable array.
serendipity_smarty_fetch('IMGEDIT', $img->output_template);
**}
{/if}
{if $case_sync}
{if !$perm_adminImagesSync}
<div class="warning"><em>{$CONST.PERM_DENIED}</em></div>
{else}
<div class="serendipityAdminMsgNote">{$CONST.WARNING_THIS_BLAHBLAH|replace:'\\n':'<br />'}</div>
<form method="POST" action="serendipity_admin.php?serendipity[adminModule]=media&amp;serendipity[adminAction]=doSync">
<p>
<fieldset>
<legend>{$CONST.SYNC_OPTION_LEGEND}</legend>
<input type="radio" name="serendipity[deleteThumbs]" value="no" checked="checked" id="keepthumbs" />
<label for="keepthumbs">{$CONST.SYNC_OPTION_KEEPTHUMBS}</label><br />
<input type="radio" name="serendipity[deleteThumbs]" value="check" id="sizecheckthumbs" />
<label for="sizecheckthumbs">{$CONST.SYNC_OPTION_SIZECHECKTHUMBS}</label><br />
<input type="radio" name="serendipity[deleteThumbs]" value="yes" />
<label for="deletethumbs">{$CONST.SYNC_OPTION_DELETETHUMBS}</label><br />
</fieldset>
</p>
<input name="doSync" value="{$CONST.CREATE_THUMBS}" class="serendipityPrettyButton input_button" type="submit" />
<a href="serendipity_admin.php" class="serendipityPrettyButton">{$CONST.ABORT_NOW}</a>
</form>
{/if}
{/if}
{if $case_doSync}
{if !$perm_adminImagesSync}
<div class="warning"><em>{$CONST.PERM_DENIED}</em></div>
{else}
<p class="image_synch"><b>{$CONST.SYNCING}</b></p><br />
{$print_SYNC_DONE}
<p class="image_resize"><b>{$CONST.RESIZING}</b></p><br />
{$print_RESIZE_DONE}
{/if}
{/if}
{if $case_delete}
<div class="image_notify_delete">{$CONST.ABOUT_TO_DELETE_FILE|sprintf:"$file"}</div>
<form method="get" id="delete_image">
<div>
<a href="{$newLoc}" class="serendipityPrettyButton input_button">{$CONST.DUMP_IT}</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="{$abortLoc}" class="serendipityPrettyButton input_button">{$CONST.ABORT_NOW}</a>
</div>
</form>
{/if}
{if $switched_output}
<form method="get" id="delete_images">
{if ( $is_delete || $is_multidelete )}
<p><span class="msg_notice">{$CONST.ABOUT_TO_DELETE_FILES}</span></p>
{foreach $rip_image AS $ripimg}
<span class="msg_dialog_ripentry">{$ripimg}</span><br />
{/foreach}
<ul class="dialog_delrip">
<li><a class="link_abort" href="{$smarty.server.HTTP_REFERER|escape}">{$CONST.NOT_REALLY}</a></li>
<li><a class="link_confirm" href="{$newLoc}">{$CONST.DUMP_IT}</a></li>
</ul>
{/if}
</form>
{/if}
{if $case_rename}
{if $go_back}
<br />
<input type="button" onclick="history.go(-1);" value="{$CONST.BACK}" class="serendipityPrettyButton input_button" />
{else}
<script language="javascript" type="text/javascript">
location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";
</script>
<noscript>
<a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=default">{$CONST.DONE}</a>
</noscript>
{/if}
{/if}
{if $case_properties}
{** serendipity_showPropertyForm($new_media) **}
{/if}
{if $case_add}
{if $smarty.post.adminSubAction == 'properties'}
<script language="javascript" type="text/javascript">
location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";
</script>
<noscript>
<a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=default">{$CONST.DONE}</a>
</noscript>
{else}
{** showMediaLibrary($messages) **}
{$showML_add}
{/if}
{/if}
{if $case_directoryDoDelete}
{if $print_DIRECTORY_WRITE_ERROR}{$print_DIRECTORY_WRITE_ERROR}{/if}
{if $ob_serendipity_killPath}{$ob_serendipity_killPath}{/if}
{if $print_ERROR_NO_DIRECTORY}{$print_ERROR_NO_DIRECTORY}{/if}
{** serendipity_plugin_api::hook_event('backend_directory_delete', $new_dir); **}
{/if}
{if $case_directoryEdit}
{if !empty($smarty.post.save)}
{if $ob_serendipity_moveMediaDirectory}{$ob_serendipity_moveMediaDirectory}{/if}
<div>{$print_CONST.SETTINGS_SAVED_AT}</div>
{/if}
<div class="image_directory_edit"><strong>{$CONST.MANAGE_DIRECTORIES}</strong></div>
<br />
<form id="image_directory_edit_form" method="POST" action="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryEdit&amp;serendipity[dir]={$dir|escape:'html'}">
{$formtoken}
<input type="hidden" name="serendipity[oldDir]" value="{$use_dir}" />
<table cellpadding="5">
<tr>
<td width="100"><strong>{$CONST.NAME}</strong></td>
<td><input class="input_textbox" type="text" name="serendipity[newDir]" value="{$use_dir}" /></td>
</tr>
<tr>
<td><label for="read_authors">{$CONST.PERM_READ}</label></td>
<td>
<select size="6" id="read_authors" multiple="multiple" name="serendipity[read_authors][]">
<option value="0" {if $rgroups}selected="selected"{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups AS $group}
<option value="{$group.confkey}" {if isset($read_groups.{$group.confkey})}selected="selected"{/if}>{$group.confvalue|escape:'html'}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td><label for="write_authors">{$CONST.PERM_WRITE}</label></td>
<td>
<select size="6" id="write_authors" multiple="multiple" name="serendipity[write_authors][]">
<option value="0" {if $wgroups}selected="selected"{/if}>{$CONST.ALL_AUTHORS}</option>
{foreach $groups AS $group}
<option value="{$group.confkey}" {if isset($write_groups.{$group.confkey})}selected="selected"{/if}>{$group.confvalue|escape:'html'}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td>
<input class="input_checkbox" id="setchild" value="true" type="checkbox" name="serendipity[update_children]" {if !empty($smarty.post.update_children) == 'on'}checked="checked"{/if} /> <label for="setchild">{$CONST.PERM_SET_CHILD}</label>
<td>
</tr>
</table>
<br />
<br />
<div align="center">
<input name="serendipity[save]" value="{$CONST.SAVE}" class="serendipityPrettyButton input_button" type="submit" />
</div>
</form>
{/if}
{if $case_directoryDelete}
<div class="image_directory_delete"><strong>{$CONST.DELETE_DIRECTORY}</strong></div>
<div class="image_directory_delete_desc">{$CONST.DELETE_DIRECTORY_DESC}</div>
<br />
<br />
<form id="image_directory_delete_form" method="POST" action="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryDoDelete&amp;serendipity[dir]={$dir|escape:'html'}">
{$formtoken}
<table cellpadding="5">
<tr>
<td width="100"><strong>{$CONST.NAME}</strong></td>
<td>{$basename_dir}</td>
</tr>
<tr>
<td colspan="2"><input class="input_checkbox" type="checkbox" name="serendipity[nuke]" value="true" style="margin: 0"> {$CONST.FORCE_DELETE}</td>
</tr>
</table>
<br />
<br />
<div align="center">
{$CONST.CONFIRM_DELETE_DIRECTORY|sprintf:$dir|escape:'html'}<br />
<input name="SAVE" value="{$CONST.DELETE_DIRECTORY}" class="serendipityPrettyButton input_button" type="submit" />
</div>
</form>
{/if}
{if $case_directoryDoCreate}
{** serendipity_plugin_api::hook_event('backend_directory_create', $nd); **}
{if $print_DIRECTORY_CREATED}{$print_DIRECTORY_CREATED}{/if}
{if $print_DIRECTORY_WRITE_ERROR}{$print_DIRECTORY_WRITE_ERROR}{/if}
{/if}
{if $case_directoryCreate}
<div class="image_directory_create"><strong>{$CONST.CREATE_DIRECTORY}</strong></div>
<div class="image_directory_create_desc">{$CONST.CREATE_DIRECTORY_DESC}</div>
<br />
<br />
<form id="image_directory_create_form" method="POST" action="?serendipity[step]=directoryDoCreate&amp;serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryDoCreate">
{$formtoken}
<table cellpadding="5">
<tr>
<td>{$CONST.NAME}</td>
<td><input class="input_textbox" type="text" name="serendipity[name]" value="" /></td>
</tr>
<tr>
<td>{$CONST.PARENT_DIRECTORY}</td>
<td>
<select name="serendipity[parent]">
<option value="">{$CONST.BASE_DIRECTORY}</option>
{foreach $folders as $folder}
<option {if $folder.relpath == $get.only_path}selected="selected"{/if} value="{$folder.relpath}">{'&nbsp;'|str_repeat:($folder.depth*2)} {$folder.name}</option>
{/foreach}
</select>
</td>
</tr>
{** IS this **}
{serendipity_hookPlugin hookAll=true hook="backend_directory_createoptions" addData=$folders}
{** the right smarty template translation for
<?php serendipity_plugin_api::hook_event('backend_directory_createoptions', $folders); ?> **}
</table>
<div>
<input name="SAVE" value="{$CONST.CREATE_DIRECTORY}" class="serendipityPrettyButton input_button" type="submit">
</div>
</form>
{/if}
{if $case_directorySelect}
<div class="image_directory_list">{$CONST.DIRECTORIES_AVAILABLE}</div>
<br />
<table id="image_directory_listing" border="0" cellspacing="0" cellpadding="4" width="100%">
<tr>
<td colspan="4"><strong>{$CONST.BASE_DIRECTORY}</strong></td>
</tr>
{foreach $folders as $folder}
<tr>
<td width="16"><a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryEdit&amp;serendipity[dir]={$folder.relpath|escape:'html'}"><img src="{serendipity_getFile file='admin/img/edit.png'}" border="0" alt="{$CONST.EDIT}" /></a></td>
<td width="16"><a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryDelete&amp;serendipity[dir]={$folder.relpath|escape:'html'}"><img src="{serendipity_getFile file='admin/img/delete.png'}" alt="{$CONST.DELETE}" border="0"></a></td>
<td style="padding-left: {$folder.depth*10}">{$folder.name}</td>
</tr>
{/foreach}
</table>
<br />
<div><a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=directoryCreate" class="serendipityPrettyButton input_button">{$CONST.CREATE_NEW_DIRECTORY}</a></div>
{/if}
{if $case_addSelect}
{** smarty display 'admin/media_upload.tpl' **}
{/if}
{if $case_rotateCW}
{if $rotate_img_done}
<script language="javascript" type="text/javascript">
location.href="{$adminFile_redirect}";
</script>
<noscript><a href="{$adminFile_redirect}">{$CONST.DONE}</a></noscript>
{/if}
{/if}
{if $case_rotateCCW}
{if $rotate_img_done}
<script language="javascript" type="text/javascript">
location.href="{$adminFile_redirect}";
</script>
<noscript><a href="{$adminFile_redirect}">{$CONST.DONE}</a></noscript>
{/if}
{/if}
{if $case_scale}
{if $print_SCALING_IMAGE}{$print_SCALING_IMAGE}{/if}
{if $print_serendipity_scaleImg}{$print_serendipity_scaleImg}<br />{/if}
{$CONST.DONE}<br />
{** Forward user to overview (we don't want the user's back button to rename things again) **}
<script language="javascript" type="text/javascript">
location.href="?serendipity[adminModule]=images&serendipity[adminAction]=default";
</script>
<noscript><a href="?serendipity[adminModule]=images&amp;serendipity[adminAction]=default">{$CONST.DONE}</a></noscript>
{/if}
{if $case_scaleSelect}
<script type="text/javascript" language="javascript">
<!--
function rescale(dim, newval) {ldelim}
var originalWidth = {$img_width};
var originalHeight = {$img_height};
var ratio = originalHeight/originalWidth;
var trans = new Array();
trans['width'] = new Array('serendipity[height]', ratio);
trans['height'] = new Array('serendipity[width]', 1/ratio);
if (document.serendipityScaleForm.elements['auto'].checked == true) {ldelim}
document.serendipityScaleForm.elements[trans[dim][0]].value=Math.round(trans[dim][1]*newval);
{rdelim}
document.getElementsByName('serendipityScaleImg')[0].style.width =
document.serendipityScaleForm.elements['serendipity[width]'].value+'px';
document.getElementsByName('serendipityScaleImg')[0].style.height =
document.serendipityScaleForm.elements['serendipity[height]'].value+'px';
{rdelim}
//-->
</script>
{if $print_RESIZE_BLAHBLAH}{$print_RESIZE_BLAHBLAH}{/if}
{if $print_ORIGINAL_SIZE}{$print_ORIGINAL_SIZE}{/if}
{$CONST.HERE_YOU_CAN_ENTER_BLAHBLAH}
<form name="serendipityScaleForm" action="?" method="GET">
<div>
{$CONST.NEWSIZE}
{$formtoken}
<input type="hidden" name="serendipity[adminModule]" value="images" />
<input type="hidden" name="serendipity[adminAction]" value="scale" />
<input type="hidden" name="serendipity[fid]" value="{$get.fid}" />
<input class="input_textbox" type="text" size="4" name="serendipity[width]" onchange="rescale('width' , value);" value="{$img_width}" />
<input class="input_textbox" type="text" size="4" name="serendipity[height]" onchange="rescale('height', value);" value="{$img_height}" />
<br />
{$CONST.KEEP_PROPORTIONS}:
<!-- <input type='button' value='preview'>-->
<input class="input_checkbox" type="checkbox" name="auto" checked="checked" /><br />
<input type="button" name="scale" value="{$CONST.IMAGE_RESIZE}" onclick="if (confirm('{$CONST.REALLY_SCALE_IMAGE}')) document.serendipityScaleForm.submit();" class="serendipityPrettyButton input_button" />
</div>
</form>
<img src="{$file}" name="serendipityScaleImg" style="width: {$img_width}px; height: {$img_height}px;" alt="" />
{/if}
{if $case_default}
{if $showML_def}{$showML_def}{/if}
{/if}

View File

@ -1,58 +0,0 @@
{if $importForm}
{if $die}
FAILURE: Unable to require import module, possible syntax error?
{else}
{if $validateData}
{$CONST.IMPORT_STARTING}<br />
{if $result != true}
{$CONST.IMPORT_FAILED}: {$result}<br />
{else}
{$CONST.IMPORT_DONE}<br />
{/if}
{else}
{$CONST.IMPORT_PLEASE_ENTER}
<br />
<form action="" method="POST" enctype="multipart/form-data">
{$formToken}
<table cellpadding="3" cellspacing="2">
{foreach $fields as $field}
<tr>
<td>{$field.text}</td>
<td>{$field.guessedInput}</td>
</tr>
{/foreach}
{if $notes}
<tr>
<td colspan="2">
<b>{$CONST.IMPORT_NOTES}</b><br />
{$notes}
</td>
</tr>
{/if}
<tr>
<td colspan="2" align="right"><input type="submit" value="{$CONST.IMPORT_NOW}" class="serendipityPrettyButton input_button"></td>
</tr>
</table>
</form>
{/if}
{/if}
{else}
{$CONST.IMPORT_WELCOME}.<br />
{$CONST.IMPORT_WHAT_CAN}. <br />
<br />
{$CONST.IMPORT_SELECT}:<br />
<br />
<form action="" method="GET">
<input type="hidden" name="serendipity[adminModule]" value="import">
{$formToken}
<strong>{$CONST.IMPORT_WEBLOG_APP}: </strong>
<select name="serendipity[importFrom]">
{foreach $list as $v => $k}
<option value="{$v}">{$k}</option>
{/foreach}
</select>
<input type="submit" value="{$CONST.GO}" class="serendipityPrettyButton input_button">
</form>
{/if}

View File

@ -1,289 +0,0 @@
{* From configuration to install *}
{if $is_errors && is_array($errors)}
{foreach $errors AS $error}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />{$error}</div>
{/foreach}
{/if}
{if $getstepint0}
{$CONST.WELCOME_TO_INSTALLATION}.
<br />{$CONST.FIRST_WE_TAKE_A_LOOK}.
<br />{$print_ERRORS_ARE_DISPLAYED_IN}.
<br />
<br>
<div align="center">- {$CONST.PRE_INSTALLATION_REPORT|sprintf:$s9yversion} -</div><br />
<div align="center">
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="2" style="font-weight: bold">{$CONST.INTEGRITY}</td>
</tr>
{foreach $installerResultDiagnose_CHECKSUMS AS $cksum}
<tr>
<td colspan="2">{$cksum}</td>
</tr>
{/foreach}
</table>
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="2" style="font-weight: bold">{$CONST.PHP_INSTALLATION}</td>
</tr>
<tr>
<td>{$CONST.OPERATING_SYSTEM}</td>
<td>{$php_uname}</td>
</tr>
<tr>
<td>{$CONST.WEBSERVER_SAPI}</td>
<td>{$php_sapi_name}</td>
</tr>
<tr>
<td>PHP version >= 5.2.6</td>
<td width="200">{$installerResultDiagnose_VERSION}</td>
</tr>
<tr>
<td>Database extensions</td>
<td width="200">{$installerResultDiagnose_DBTYPE}</td>
</tr>
<tr>
<td>Session extension</td>
<td width="200">{$installerResultDiagnose_SESSION}</td>
</tr>
<tr>
<td>PCRE extension</td>
<td width="200">{$installerResultDiagnose_PCRE}</td>
</tr>
<tr>
<td>GDlib extension</td>
<td width="200">{$installerResultDiagnose_GD}</td>
</tr>
<tr>
<td>OpenSSL extension</td>
<td>{$installerResultDiagnose_OPENSSL}</td>
</tr>
<tr>
<td>mbstring extension</td>
<td width="200">{$installerResultDiagnose_MBSTR}</td>
</tr>
<tr>
<td>iconv extension</td>
<td width="200">{$installerResultDiagnose_ICONV}</td>
</tr>
<tr>
<td>zlib extension</td>
<td width="200">{$installerResultDiagnose_ZLIB}</td>
</tr>
<tr>
<td>Imagemagick binary </td>
<td>{$installerResultDiagnose_IM}</td>
</tr>
</table>
<br />
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="3" style="font-weight: bold">{$CONST.PHPINI_CONFIGURATION}</td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="150"><em>{$CONST.RECOMMENDED}</em></td>
<td width="150"><em>{$CONST.ACTUAL}</em></td>
</tr>
<tr>
<td>safe_mode</td>
<td width="150"><strong>OFF</strong></td>
<td width="150">{$installerResultDiagnose_SSM}</td>
</tr>
<tr>
<td>register_globals</td>
<td width="150"><strong>OFF</strong></td>
<td width="150">{$installerResultDiagnose_SRG}</td>
</tr>
<tr>
<td>magic_quotes_gpc</td>
<td width="150"><strong>OFF</strong></td>
<td width="150">{$installerResultDiagnose_SMQG}</td>
</tr>
<tr>
<td>magic_quotes_runtime</td>
<td width="150"><strong>OFF</strong></td>
<td width="150">{$installerResultDiagnose_SMQR}</td>
</tr>
<tr>
<td>session.use_trans_sid</td>
<td width="150"><strong>OFF</strong></td>
<td width="150">{$installerResultDiagnose_SSUTS}</td>
</tr>
<tr>
<td>allow_url_fopen</td>
<td width="150"><strong>ON</strong></td>
<td width="150">{$installerResultDiagnose_SAUF}</td>
</tr>
<tr>
<td>file_uploads</td>
<td width="150"><strong>ON</strong></td>
<td width="150">{$installerResultDiagnose_SFU}</td>
</tr>
<tr>
<td>post_max_size</td>
<td width="150"><strong>10M</strong></td>
<td width="150">{$installerResultDiagnose_SPMS}</td>
</tr>
<tr>
<td>upload_max_filesize</td>
<td width="150"><strong>10M</strong></td>
<td width="150">{$installerResultDiagnose_SUMF}</td>
</tr>
<tr>
<td>memory_limit</td>
<td width="150"><strong>{($CONST.PHP_INT_SIZE == 4) ? '8M' : '16M'}</strong></td>
<td width="150">{$installerResultDiagnose_SML}</td>
</tr>
</table>
<br />
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<tr>
<td colspan="2" style="font-weight: bold">{$CONST.PERMISSIONS}</td>
</tr>
<tr>
<td style="vertical-align: top">{$basedir}</td>
<td width="200">
{foreach $installerResultDiagnose_WRITABLE AS $fwrite}
{$fwrite}
{/foreach}
</td>
</tr>
<tr>
<td style="vertical-align: top">{$basedir}{$CONST.PATH_SMARTY_COMPILE}</td>
<td width="200">
{foreach $installerResultDiagnose_COMPILE AS $compile}
{$compile}
{/foreach}
</td>
</tr>
<tr>
<td style="vertical-align: top">{$basedir}archives/</td>
<td width="200">
{foreach $installerResultDiagnose_ARCHIVES AS $archives}
{$archives}
{/foreach}
</td>
</tr>
<tr>
<td style="vertical-align: top">{$basedir}plugins/</td>
<td width="200">
{foreach $installerResultDiagnose_PLUGINS AS $plugins}
{$plugins}
{/foreach}
</td>
</tr>
{if $is_dir_uploads}
<tr>
<td style="vertical-align: top">{$basedir}uploads/</td>
<td width="200">
{foreach $installerResultDiagnose_UPLOADS AS $uploads}
{$uploads}
{/foreach}
</td>
</tr>
{/if}
{if $is_imb_executable}
<tr>
<td style="vertical-align: top">Execute Imagemagick binary </td>
<td>
{foreach $installerResultDiagnose_IMB AS $im_binary}
{$im_binary}
{/foreach}
</td>
</tr>
{/if}
</table>
{if $showWritableNote}
<div class="serendipityAdminMsgNote msg_notice"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_note.png'}" alt="" />{$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'}</div>
{/if}
<div align="center">
{if $errorCount > 0}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />{$CONST.PROBLEM_DIAGNOSTIC}</div>
<h2><a href="serendipity_admin.php">{$CONST.RECHECK_INSTALLATION}</a></h2>
{else}
{$CONST.SELECT_INSTALLATION_TYPE}:
<h2><a href="?serendipity[step]=2a">{$CONST.SIMPLE_INSTALLATION}</a> - <a href="?serendipity[step]=2b">{$CONST.EXPERT_INSTALLATION}</a></h2>
{/if}
</div>
</div> <!-- // div end -->
{elseif $s9yGETstep == '2a'}
<form action="?" method="post">
<input type="hidden" name="serendipity[step]" value="{$s9yGETstep}">
<input type="hidden" name="serendipity[getstep]" value="3">
{if $ob_serendipity_printConfigTemplate}{$ob_serendipity_printConfigTemplate}{/if}
<div align="center"><input name="submit" type="submit" value="{$CONST.COMPLETE_INSTALLATION}" class="serendipityPrettyButton input_button"></div>
</form>
{elseif $s9yGETstep == '2b'}
<form action="?" method="post">
<input type="hidden" name="serendipity[step]" value="{$s9yGETstep}">
<input type="hidden" name="serendipity[getstep]" value="3">
{if $ob_serendipity_printConfigTemplate}{$ob_serendipity_printConfigTemplate}{/if}
<div align="center"><input name="submit" type="submit" value="{$CONST.COMPLETE_INSTALLATION}" class="serendipityPrettyButton input_button"></div>
</form>
{elseif $getstepint3}
{$CONST.CHECK_DATABASE_EXISTS}&hellip;
{if is_array($authors_query)}
<strong>{$CONST.THEY_DO}</strong>, {$CONST.WONT_INSTALL_DB_AGAIN}
<br />
<br />
{else}
<strong>{$CONST.THEY_DONT}</strong>
<br />
{$CONST.CREATE_DATABASE}
{if $install_DB}
<strong>{$CONST.DONE}</strong><br />
{/if}
{$CONST.CREATING_PRIMARY_AUTHOR|sprintf:"{$smarty.post.user|escape}"}&hellip;
{if $add_authors}
<strong>{$CONST.DONE}</strong><br />
{/if}
{$CONST.SETTING_DEFAULT_TEMPLATE}&hellip;
{if $set_template_vars}
<strong>{$CONST.DONE}</strong><br />
{/if}
{$CONST.INSTALLING_DEFAULT_PLUGINS}&hellip;
{if $register_default_plugins}
<strong>{$CONST.DONE}</strong><br />
{/if}
{/if}
{$CONST.ATTEMPT_WRITE_FILE|sprintf:'.htaccess'}&hellip;
{if $errors_sif === true}
<strong>{$CONST.DONE}</strong><br />
{else}
<strong>{$CONST.FAILED}</strong><br />
{foreach $errors_sif AS $error_f}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />{$error_f}</div>
{/foreach}
{/if}
{if $s9y_installed}
<div class="serendipityAdminMsgSuccess msg_success"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />{$CONST.SERENDIPITY_INSTALLED}</div>
<div align="center" style="font-size: large"><a href="{$smarty.post.serendipityHTTPPath}">{$CONST.VISIT_BLOG_HERE}</a></div>
<div align="center">{$CONST.THANK_YOU_FOR_CHOOSING}</div>
{else}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />{$CONST.ERROR_DETECTED_IN_INSTALL}</div>
{/if}
{/if}{* getstepint3 end *}

View File

@ -1,204 +0,0 @@
{* serendipity_plugins_admin.inc.php::serendipity_plugin_config() - the OUT_STACK loop *}
{if $ctype == 'seperator'}
<tr>
<td colspan="2"><hr noshade="noshade" size="1" /></td>
</tr>
{/if}
{if $ctype == 'select'}
<tr>
<td style="border-bottom: 1px solid #000000; vertical-align: top"><strong>{$cname}</strong>
{if $cdesc != ''}
<br><span style="color: #5E7A94; font-size: 8pt;">&nbsp;{$cdesc}</span>
{/if}
</td>
<td style="border-bottom: 1px solid #000000; vertical-align: middle" width="250">
<div>
<select class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]{($is_multi_select) ? '[]' : ''}" {($is_multi_select) ? 'multiple="multiple"' : ''} {($is_multi_select && ($select_size > 0)) ? "size='{$select_size}'" : ''}>
{foreach $select AS $select_value => $select_desc}
{assign var="id" value="{$config_item|escape}_{$select_value|escape}"}
<!-- case select assign id={$id} -->
<option value="{$select_value}" {(in_array($select_value, $selected_options) || in_array($select_value, $pre_selected)) ? 'selected="selected"' : ''} title="{$select_desc|escape}">
{$select_desc|escape}
</option>
{/foreach}
</select>
</div>
</td>
</tr>
{/if}
{if $ctype == 'radio'}
<tr>
<td style="border-bottom: 1px solid #000000; vertical-align: top"><strong>{$cname}</strong>
{if $cdesc != ''}
<br /><span style="color: #5E7A94; font-size: 8pt;">&nbsp;{$cdesc}</span>
{/if}
</td>
<td style="border-bottom: 1px solid #000000; vertical-align: middle;" width="250">
{foreach $radio_button AS $r}
{if $r['counter'] == 1}
<div class="clearfix">
{/if}
<input class="direction_{$lang_direction} input_radio" type="radio" id="serendipity_plugin_{$r['id']}" name="serendipity[{$postKey}][{$config_item}]" value="{$r['value']}" {(!empty($r['checked'])) ? 'checked="checked"' : ''} title="{$r['index']|escape}" />
<label for="serendipity_plugin_{$r['id']}">{$r['index']}{* escapement is already done *}</label>
{if ($r['counter'] == $per_row)}
{assign var="r" value="counter[0]"}
</div>
{/if}
{/foreach}
</td>
</tr>
{/if}
{if $ctype == 'string'}
<tr>
<td style="border-bottom: 1px solid #000000">
<strong>{$cname}</strong>
<br><span style="color: #5E7A94; font-size: 8pt;">&nbsp;{$cdesc}</span>
</td>
<td style="border-bottom: 1px solid #000000" width="250">
<div>
<input class="direction_{$lang_direction} input_textbox" type="{$input_type}" name="serendipity[{$postKey}][{$config_item}]" value="{$hvalue}" size="30" />
</div>
</td>
</tr>
{/if}
{if (($ctype == 'html') || ($ctype == 'text'))}
<tr>
<td colspan="2"><strong>{$cname}</strong>
&nbsp;<span style="color: #5E7A94; font-size: 8pt;">&nbsp;{$cdesc}</span>
</td>
</tr>
<tr>
<td colspan="2">
<div>
<textarea class="direction_{$lang_direction}" style="width: 100%" id="nuggets{$elcount}" name="serendipity[{$postKey}][{$config_item}]" rows="{$text_rows}" cols="80">{$hvalue}</textarea>
</div>
</td>
</tr>
{/if}
{if $ctype == 'content'}
<tr>
<td colspan="2">{$cbag_default}</td>
</tr>
{/if}
{if $ctype == 'custom'}
<tr>
<td colspan="2">
<input type="hidden" id="config_{$postKey}_{$config_item}" name="serendipity[{$postKey}][{$config_item}]" value="{$hvalue}" size="30" />
{$cbag_custom}
</td>
</tr>
{/if}
{if $ctype == 'hidden'}
<tr>
<td colspan="2">
<input class="direction_{$lang_direction}" type="hidden" name="serendipity[{$postKey}][{$config_item}]" value="{$cbag_value}" />
</td>
</tr>
{/if}
{if $ctype == 'media'}
{if !$mediajs_output}
<script type="text/javascript" language="JavaScript" src="serendipity_editor.js"></script>
<script type="text/javascript" language="JavaScript" src="{serendipity_getFile file='admin/image_selector.js'}"></script>
{/if}
<tr>
<td colspan="2">
<strong>{$cname}</strong>
<br /><span style="color: #5E7A94; font-size: 8pt;">{$cdesc}</span>
</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #000000">
<div id="{$config_item}_preview" style="background-image: url({$value}); width: {$preview_width}; height: {$preview_height}; background-repeat: no-repeat;">&nbsp;</div>
</td>
<td style="border-bottom: 1px solid #000000">
<input class="input_textbox" type="text" id="serendipity[{$postKey}][{$config_item}]" name="serendipity[{$postKey}][{$config_item}]" value="{$value}" onchange="change_preview('{$config_item}')"/>
<br /><a href="#" onclick="choose_media('serendipity[{$postKey}][{$config_item}]')">{$CONST.MEDIA_LIBRARY}</a>
</td>
</tr>
{/if}
{if $ctype == 'sequence'}
{if !$sequencejs_output}
<script src="{serendipity_getFile file='dragdrop.js'}" type="text/javascript"></script>
{/if}
<tr>
<td style="border-bottom: 1px solid #000000; vertical-align: top">
<strong>{$cname}</strong>
<br /><span style="color: #5E7A94; font-size: 8pt;">{$cdesc}</span>
</td>
<td style="border-bottom: 1px solid #000000; vertical-align: middle">
<input type="hidden" name="serendipity[{$postKey}][{$config_item}]" id="{$config_item}_value" value="{$value}" />
<noscript>
<!-- Replace standard submit button when using up/down submits -->
<input type="hidden" name="SAVECONF" value="Save" />
</noscript>
<ol id="{$config_item}" class="sequence_container pluginmanager_container">
{foreach $order_id as $orid}
<li id="{$orid['id']}" class="sequence_item pluginmanager_item_even">
<div id="g{$orid['id']}" class="pluginmanager_grablet sequence_grablet"><a href="#"></a></div>
{if $checkable}
<input type="checkbox" onclick="sort_{$config_item}_Sequence();" name="serendipity[{$postKey}][activate][{$config_item}][{$orid['id']}]" {(in_array($orid['id'], $store_order)) ? ' checked="checked" ' : ''} value="true" id="activate_{$orid['id']}" />
{/if}
<span>{$items[{$orid['id']}]['display']}</span>
{if isset($items[{$orid['id']}]['img'])}
<img src="{$items[{$orid['id']}]['img']}" />
{/if}
<noscript><div>
{if ($orid['sort_idx'] == 0)}
&nbsp;
{else}
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_up" type="submit" name="serendipity[{$postKey}][override][{$config_item}]" value="{$orid['oneup']}">
<img src="{serendipity_getFile file='admin/img/uparrow.png'}" alt="Move Up" />
</button>
{/if}
{if ($orid['sort_idx'] == $last)}
&nbsp;
{else}
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_down" type="submit" name="serendipity[{$postKey}][override][{$config_item}]" value="{$orid['onedown']}">
<img src="{serendipity_getFile file='admin/img/downarrow.png'}" alt="Move Down" />
</button>
{/if}
</div></noscript>
</li>
{/foreach}
</ol>
{if isset($no_sequence)}
{$no_sequence}
{/if}
{*** Smarty 3 has a new auto literal option which is enabled by default.
When the { is surrounded by whitespace it is not interpreted as smarty delimiter but literal. e.g. ' } ;'
AS tests have proofed, ending javascript delimiters " } ;" and " };" and even "};" work fine as well. So back to origin. ***}
<script type="text/javascript">
function sort_{$config_item}_Sequence() {
//var seq = DragDrop.serData('{$config_item}_group', null);
var seq = DragDrop.serData(null, '{$config_item}');
var start = seq.indexOf("(");
var end = seq.indexOf(")");
seq = seq.slice((start + 1), end);
checkable_seq = seq.split(",");
out_seq = '';
for (i in checkable_seq) {
if (document.getElementById('activate_' + checkable_seq[i]) && !document.getElementById('activate_' + checkable_seq[i]).checked) {
continue;
} else {
if (out_seq != '') {
out_seq += ',';
}
out_seq += checkable_seq[i];
}
}
var order = document.getElementById("{$config_item}_value");
order.value = out_seq;
}
function init_{$config_item}_Sequence() {
var lst = document.getElementById("{$config_item}");
DragDrop.makeListContainer(lst, '{$config_item}_group');
lst.onDragOut = function() {
sort_{$config_item}_Sequence();
};
}
addLoadEvent(init_{$config_item}_Sequence);
</script>
</td>
{/if}

View File

@ -1,13 +0,0 @@
{if $output.show_links}
<div class="{$output.links_css}">
<p class="further_links_head">{$output.links_title}</p>
<ul>
{foreach $output.links AS $link}
<li>{$link}</li>
{/foreach}
</ul>
<p class="further_links_foot" style="display: none"></p>
</div>
{/if}
<h3 class="serendipityWelcomeBack">{$output.welcome}</h3>
{$output.more}

View File

@ -1,19 +0,0 @@
{if $adminAction == "save"}
{if $not_authorized}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</div>
{elseif $empty_username}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.USERCONF_CHECK_USERNAME_ERROR}</div>
{elseif $password_check_fail}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.USERCONF_CHECK_PASSWORD_ERROR}</div>
{else}
<div class="serendipityAdminMsgSuccess msg_success"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />{$CONST.MODIFIED_USER|sprintf:"{$realname|escape:"html"}"} ?></div>
{/if}
{/if}
<form action="?serendipity[adminModule]=personal&amp;serendipity[adminAction]=save" method="post">
{$formToken}
{$config}
<div align="right">
<input class="serendipityPrettyButton input_button" type="submit" name="SAVE" value="{$CONST.SAVE}" /></div>
</form>

View File

@ -1,206 +0,0 @@
{if $plugin_to_conf}
{if is_array($save_errors)}
<div class="serendipityAdminMsgError msg_error">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />
{$CONST.ERROR}:<br />
<ul>
{foreach $save_errors as $save_error}
<li> $save_error </li>
{/foreach}
</ul>
</div>
{elseif $saveconf}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.DONE}: {$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}
</div>
{/if}
<form method="post" name="serendipityPluginConfigure">
{$formToken}
<table cellpadding="5" style="border: 1px dashed" width="90%" align="center">
<tr>
<th width="100">{$CONST.NAME}</th>
<td>{$name} (<em>{$class}</em>)</td>
</tr>
<tr>
<th style="vertical-align: top">{$CONST.DESCRIPTION}</th>
<td>
{$desc}
{if ! empty($documentation) }
<br /><a href="{$documentation|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION}</a>
{/if}
{if $changelog}
<br /><a href="plugins/{$plugin->act_pluginPath}/ChangeLog">{$CONST.PLUGIN_DOCUMENTATION_CHANGELOG}</a>
{/if}
{if $documentation_local}
<br /><a href="plugins/{$plugin->act_pluginPath}{$documentation}">{$CONST.PLUGIN_DOCUMENTATION_LOCAL}</a>
{/if}
</td>
</tr>
{if !empty($license)}
<tr>
<th>{$CONST.MEDIA_PROPERTY_COPYRIGHT}</th>
<td>{$license}</td>
</tr>
{/if}
</table>
<br />
{$config}
</form>
{elseif $adminAction == "addnew"}
{if $type == "event"}
<h2>{$CONST.EVENT_PLUGINS}</h2>
{else}
<h2>{$CONST.SIDEBAR_PLUGINS}</h2>
{/if}
<br />
{foreach $errorstack as $e_idx => $e_name}
{$CONST.ERROR}: {$e_name}<br />
{/foreach}
<table cellspacing="0" cellpadding="0" border="0" width="100%">
{foreach $pluggroups AS $pluggroup => $groupstack}
{if empty($pluggroup)}
<tr>
<td colspan="2" class="serendipity_pluginlist_header">
<form action="serendipity_admin.php" method="get">
{$formToken}
<input type="hidden" name="serendipity[adminModule]" value="plugins" />
<input type="hidden" name="serendipity[adminAction]" value="addnew" />
<input type="hidden" name="serendipity[type]" value="{$type|escape:"html"}" />
{$CONST.FILTERS}
<select name="serendipity[only_group]">
{foreach $groupnames as $available_group => $available_name}
<option value="{$available_group}" {if $only_group == $available_group} selected="selected"{/if}>{$available_name}</option>
{/foreach}
<option value="ALL" {if $only_group == ALL} selected="selected"{/if}>{$CONST.ALL_CATEGORIES}</option>
<option value="UPGRADE" {if $only_group == UPGRADE} selected="selected"{/if}>{$CONST.WORD_NEW}</option>
</select>
<input class="serendipityPrettyButton input_button" type="submit" value="{$CONST.GO}" />
</form>
</td>
</tr>
{if !empty($only_group)}{continue}{/if}
{elseif !empty($only_group) && $pluggroup != $only_group}{continue}{else}
<tr>
<td colspan="2" class="serendipity_pluginlist_section"><strong>{foreach $groupnames as $available_group => $available_name}{if $pluggroup == $available_group}{$available_name}{/if}{/foreach}</strong></td>
</tr>
{/if}
<tr>
<td><strong>Plugin</strong></td>
<td width="100" align="center"><strong>Action</strong></td>
</tr>
{foreach $groupstack as $plug}
<tr id="serendipity_plugin_{$plug.class_name}">
<td colspan="2" onmouseout="document.getElementById('serendipity_plugin_{$plug.class_name}').className='';" onmouseover="document.getElementById('serendipity_plugin_{$plug.class_name}').className='serendipity_PluginAdminHighlight';">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td><strong>{$plug.name}</strong></td>
<td width="100" align="center" valign="middle" rowspan="3">
{if isset($requirements_failures.{$plug.class_name})}
<span style="color: #cccccc">
{$CONST.UNMET_REQUIREMENTS|sprintf:"{if $requirements_failures.{$plug.class_name}.s9y}s9y $plug.requirements..serendipity,{/if} {if $requirements_failures.{$plug.class_name}.php}PHP $plug.requirements.php,{/if} {if $requirements_failures.{$plug.class_name}.smarty}Smarty $plug.requirements.smarty{/if}"}
</span>
{elseif $plug['upgradable'] == true}
<a href="?serendipity[adminModule]=plugins&amp;serendipity[pluginPath]={$plug.pluginPath}&amp;serendipity[install_plugin]={$plug.plugin_class}{if isset($plug['customURI'])}{$plug.customURI}{/if}">
<img src="{serendipity_getFile file="admin/img/upgrade_now.png"}" title="{$CONST.UPGRADE}" alt="{$CONST.UPGRADE}" border="0" />
</a>
{elseif $plug.installable == true}
<a href="?serendipity[adminModule]=plugins&amp;serendipity[pluginPath]={$plug.pluginPath}&amp;serendipity[install_plugin]={$plug.plugin_class}{if isset($plug.customURI)}{$plug.customURI}{/if}">
<img src="{if !empty($plug.pluginlocation) && $plug.pluginlocation != 'local'} {serendipity_getFile file="admin/img/install_now_{$plug.pluginlocation|lower}.png"}{else}{serendipity_getFile file="admin/img/install_now.png"}{/if}" title="{$CONST.INSTALL}" alt="{$CONST.INSTALL}" border="0" />
</a>
{else}
<span style="color: #cccccc">{$CONST.ALREADY_INSTALLED}</span>
{/if}
</td>
</tr>
<tr>
<td style="padding-left: 10px">{$plug.description}</td>
</tr>
<tr>
<td style="padding-left: 10px; font-size: x-small">({$plug.class_name})
{if ! empty($plug.author)}
{$CONST.AUTHOR}: {$plug.author}
{/if}
{if ! empty($plug.version)}
{$CONST.VERSION}: {$plug.version}
{/if}
{if ! empty($plug.website)}
<a href="{$plug.website|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION}</a>
{/if}
{if ! empty($plug.local_documentation)}
<a href="{$plug.local_documentation|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION_LOCAL}</a>
{/if}
{if ! empty($plug.changelog)}
<a href="{$plug.changelog|escape:"html"}">{$CONST.PLUGIN_DOCUMENTATION_CHANGELOG}</a>
{/if}
{if ! empty({$plug.upgrade_version}) && $plug.upgrade_version != $plug.version}
{$CONST.UPGRADE_TO_VERSION|sprintf:"{$plug.upgrade_version}"}
{/if}
{if ! empty($plug.pluginlocation) && $plug.pluginlocation != 'local'}
({$plug.pluginlocation|escape:"html"})
{/if}
</td>
</tr>
</table>
</td>
</tr>
{/foreach}
{/foreach}
<tr>
<td colspan="2" align="right">{$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:"count({$pluginstack})"}</td>
</tr>
</table>
{else}
{if $save}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</div>
{/if}
<div>{$CONST.BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS}</div>
{if $eyecandy}
<script src="{serendipity_getFile file="dragdrop.js"}" type="text/javascript"></script>
<div class="warning js_warning"><em>{$CONST.PREFERENCE_USE_JS_WARNING}</em></div>
{/if}
<br />
<h3>{$CONST.SIDEBAR_PLUGINS}</h3>
<a href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew" class="serendipityIconLink">
<img src="{serendipity_getFile file="admin/img/install.png"}" style="border: 0px none; vertical-align: middle; display: inline;" alt="" />
{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.SIDEBAR_PLUGIN}"}
</a>
{$backend_plugins_sidebar_header}
{$sidebar_plugins}
<br />
<br />
<h3>{$CONST.EVENT_PLUGINS}</h3>
<a href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew&amp;serendipity[type]=event" class="serendipityIconLink">
<img src="{serendipity_getFile file="admin/img/install.png"}" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" />
{{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN}|sprintf:"{$CONST.EVENT_PLUGIN}"}
</a>
{$backend_plugins_event_header}
{$event_plugins}
{if $memsnaps}
<h3>Memory Usage</h3>
<div>
<pre>{$memSnaps|print_r}</pre>
</div>
{/if}
{/if}

View File

@ -1,88 +0,0 @@
{* serendipity_plugins_admin.inc.php::serendipity_plugin_config() *}
<script type="text/javascript">
var const_view = '{$CONST.VIEW_FULL}';
var const_hide = '{$CONST.HIDE}';
var img_plus = '{serendipity_getFile file="img/plus.png"}';
var img_minus = '{serendipity_getFile file="img/minus.png"}';
</script>
{if $allow_admin_scripts}
<script type="text/javascript" language="JavaScript" src="{serendipity_getFile file='admin/admin_scripts.js'}"></script>
{/if}
{if $showSubmit_head}
<div style="margin: 0px auto 0px 0px; text-align: right">
<input type="submit" name="SAVECONF" value="{$CONST.SAVE}" class="serendipityPrettyButton input_button" />
</div>
{/if}
{if $showTable}
<table id="serendipity_plugin_config" border="0" cellspacing="0" cellpadding="3" width="100%">
{/if}
{if is_array($config_groups)}
<tr>
<td colspan="2">
<div align="right">
<a style="border:0; text-decoration: none" href="#" onClick="showConfigAll({sizeof($config_groups)}); return false" title="{$CONST.TOGGLE_ALL}"><img src="{serendipity_getFile file="img/plus.png"}" id="optionall" alt="+/-" border="0" />&nbsp;{$CONST.TOGGLE_ALL}</a></a><br />
</div>
</td>
</tr>
{foreach $config_groups AS $config_header => $config_groupkeys}
<tr>
<td colspan="2">
<h2>
<a style="border:0; text-decoration: none;" href="#" onClick="showConfig('el{$config_groupkeys@iteration}'); return false" title="{$CONST.TOGGLE_OPTION}"><img src="{serendipity_getFile file="img/plus.png"}" id="optionel{$config_groupkeys@iteration}" alt="+/-" border="0" />&nbsp;
{$config_header}
</a>
</h2>
</td>
</tr>
<tr>
<td colspan="2">
<table class="plugin_optiongroup" id="el{$config_groupkeys@iteration}" border="0" cellspacing="0" cellpadding="3" width="100%">
{foreach $config_groupkeys AS $config_groupkey}
{$OUT_STACK[$config_groupkey]}
{/foreach}
</table>
<script type="text/javascript" language="JavaScript">
document.getElementById('el{$config_groupkeys@iteration}').style.display = "none";
</script>
</td>
</tr>
{/foreach}
<tr><td colspan="2" style="height: 100px" id="configuration_footer">&nbsp;</td></tr>
{/if} {* foreach config_groups end *}
{foreach $OUT_STACK_REST as $out_stack_config_item}
{$out_stack_config_item}
{/foreach}
{if $showTable}
</table>
<br />
{/if}
{* $serendipity_printConfigJS *}{* outsourced to templates/default/admin/admin_scripts.js - see passed vars on top *}
{if $showSubmit_foot}
<div style="padding-left: 20px">
<input type="submit" name="SAVECONF" value="{$CONST.SAVE}" class="serendipityPrettyButton input_button" />
</div>
{/if}
{if $showExample}
<div>
{$plugin_example}
</div>
{/if}
{if $spawnNuggets}
{serendipity_hookPlugin hook="backend_wysiwyg_nuggets" eventData=$ev hookAll=true}
{if ($ev['skip_nuggets'] === false)}
<script type="text/javascript">
function Spawnnugget() {
/* blar */
{foreach $htmlnugget AS $htmlnuggetid}
Spawnnuggets('{$htmlnuggetid}');
{/foreach}
}
</script>
{/if}
{/if}

View File

@ -1,22 +0,0 @@
{* functions_plugins_admin.inc.php::function ownership() *}
{if $show_ownership}
{if $is_plugin_owner}
<select name="serendipity[ownership][{$name}]">
<option value="0">{$CONST.ALL_AUTHORS}</option>
{/if}
{foreach $users AS $user}
{if (!$is_plugin_owner && ($user['authorid'] == $authorid))}
{assign var="realname" value="{$user['realname']|escape}"}
{elseif $is_plugin_owner}
<option value="{$user['authorid']}"{($user['authorid'] == $authorid) ? ' selected="selected"' : ''}>{$user['realname']|escape}</option>
{/if}
{/foreach}
{if $is_plugin_owner}
</select>
{else}
{(empty($realname)) ? $CONST.ALL_AUTHORS : $realname}
{/if}
{/if}

View File

@ -1,93 +0,0 @@
{* functions_plugins_admin.inc.php::function_show_plugins() including output of functions_plugins_admin.inc.php::function ownership() *}
{if !$eyecandy}
<form action="?serendipity[adminModule]=plugins" method="post">
{elseif !$event_only}
{*
Smarty 3 has a new auto literal option which is enabled by default.
When the { is followed by a space it's not interpreted as smarty delimiter but literal.
*}
<script type="text/javascript">
function templatePluginMoverInit() {
{foreach $plugin_placements AS $sidebar}
{($is_first) ? 'var ' : ''}list = document.getElementById("{$sidebar}_col");
DragDrop.makeListContainer(list, 'g1');
list.onDragOver = function() { this.style["border"] = "1px solid #4d759b"; };
list.onDragOut = function() { this.style["border"] = "none"; };
{assign var="is_first" value=false}
{/foreach}
}
addLoadEvent(templatePluginMoverInit);
</script>
<form action="?serendipity[adminModule]=plugins" method="post" onsubmit="pluginMovergetSort(); return true">
<input type="hidden" name="serendipity[pluginorder]" id="order" value="" />
{else}
<script type="text/javascript">addLoadEvent(pluginMoverInitEvent);</script>
<form action="?serendipity[adminModule]=plugins" method="post" onsubmit="pluginMovergetSortEvent(); return true">
<input type="hidden" name="serendipity[pluginorder]" id="eventorder" value="" />
{/if}
{$serendipity_setFormToken}
<table class="pluginmanager" border="0" cellpadding="5" cellspacing="3" width="100%">
<tr>
{foreach $placement as $plugin_placement}
<td class="pluginmanager_side pluginmanager_{($event_only) ? 'event' : 'sidebar'}">
<div class="heading">{$plugin_placement['ptitle']}</div>
<ol id="{$plugin_placement['pid']}_col" class="pluginmanager_container">
{foreach $plugin_placement['plugin_data'] as $plugin_data}
<li class="pluginmanager_item_{cycle values="even,uneven"}" id="{$plugin_data['css_key']}">
<div id="g{$plugin_data['css_key']}" class="pluginmanager_grablet">
<a href="#" id="grab{$plugin_data['css_key']}"></a>
</div>
{if $plugin_data['is_plugin_editable']}
<input class="input_checkbox" type="checkbox" name="serendipity[plugin_to_remove][]" value="{$plugin_data['name']}" />
{/if}
{if $plugin_data['can_configure']}
<a class="pluginmanager_configure" href="?serendipity[adminModule]=plugins&amp;serendipity[plugin_to_conf]={$plugin_data['key']}"><img src="{serendipity_getFile file='admin/img/configure.png'}" style="border: 0; vertical-align: bottom;" alt="[C]" /></a>
{/if}
<span class="pluginmanager_title">
{if $plugin_data['can_configure']}
<a title="{$plugin_data['name']}" href="?serendipity[adminModule]=plugins&amp;serendipity[plugin_to_conf]={$plugin_data['key']}">{$plugin_data['title']}</a>
{else}
{$plugin_data['title']}
{/if}
</span><br />
<div class="pluginmanager_description" style="font-size: 8pt">{$plugin_data['desc']}</div>
<div class="pluginmanager_ownership">
{$plugin_data['ownership']}
</div>
{($eyecandy) ? '<noscript>' : ''}
<div class="pluginmanager_place">{$plugin_data['place']}</div>
<div class="pluginmanager_move">{$plugin_data['moveup']} {$plugin_data['movedown']}</div>
{($eyecandy) ? '</noscript>' : ''}
</li>
{/foreach}
</ol>
</td>
{/foreach}
</tr>
<tr>
<td colspan="3" align="right">{$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$total}</td>
</tr>
</table>
<br />
<div>
<input type="submit" name="REMOVE" title="{$CONST.DELETE}" value="{$CONST.REMOVE_TICKED_PLUGINS}" class="serendipityPrettyButton input_button" />
<input type="submit" name="SAVE" title="{$CONST.SAVE_CHANGES_TO_LAYOUT}" value="{$CONST.SAVE}" class="serendipityPrettyButton input_button" />
</div>
</form>

View File

@ -1,83 +0,0 @@
{if $adminAction == "install"}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />
{$install_template|string_format:"{$CONST.TEMPLATE_SET}"}
</div>
{/if}
{if $deprecated}
<div class="serendipityAdminMsgNote msg_notice">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_note.png'}" alt="" />
{$CONST.WARNING_TEMPLATE_DEPRECATED}
</div>
{/if}
<h3> {$CONST.STYLE_OPTIONS} ({$cur_template})</h3>
{if $has_config}
{if $adminAction == "configure"}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />
{$CONST.DONE}: {$save_time}
</div>
{/if}
<form method="post" action="serendipity_admin.php">
<input type="hidden" name="serendipity[adminModule]" value="templates" />
<input type="hidden" name="serendipity[adminAction]" value="configure" />
{$form_token}
{$configuration}
</form><br />
{else}
<p>{$CONST.STYLE_OPTIONS_NONE}</p>
{/if}
<br />
<h3>{$CONST.SELECT_TEMPLATE}</h3>
{foreach $templates as $template=>$info}
{if $info.info.engine == "yes"}{continue}{/if}
{if !empty($template)}
{if $template@iteration is even}
<div class="serendipity_admin_list_item serendipity_admin_list_item_even">
{else}
<div class="serendipity_admin_list_item serendipity_admin_list_item_uneven">
{/if}
<table width="100%" id="serendipity_theme_{$template}">
<tr>
<td colspan="2"><span class="serendipityTemplateSelectName"><strong>{$info.info.name}</strong></span></td>
<td valign="middle" align="center" width="70" rowspan="2">
{if $template != $cur_template}
{if !$info.unmetRequirements}
<a href="?serendipity[adminModule]=templates&amp;serendipity[adminAction]=install&amp;serendipity[theme]={$template}{$info.info.customURI}">
<img src="{serendipity_getFile file="admin/img/install_now{$info.info.customIcon}.png"}" alt="{$CONST.SET_AS_TEMPLATE}" title="{$CONST.SET_AS_TEMPLATE}" border="0" />
</a>
{else}
<span class="serendipityTemplateSelectUnmetRequirements" style="color: #cccccc">{$info.unmetRequirements}></span>
{/if}
{/if}
</td>
</tr>
<tr>
<td width="100" style="padding-left: 10px">
{if $info.fullsize_preview}
<a href="{$info.fullsize_preview}" target="_blank">
{if $info.preview}
<img src="{$info.preview}" width="100" style="border: 1px #000000 solid" />
{else}
&nbsp;
{/if}
</a>
{/if}
</td>
<td valign="top">
<span class="serendipityTemplateSelectDetails">{$CONST.AUTHOR}: {$info.info.author}</span><br />
<span class="serendipityTemplateSelectDetails">{$CONST.LAST_UPDATED}: {$info.info.date}</span><br />
<span class="serendipityTemplateSelectDetails">{$CONST.CUSTOM_ADMIN_INTERFACE}: {$info.info.custom_admin_interface}</span><br />
</td>
</tr>
</table>
</div>
{/if}
{/foreach}

View File

@ -1,140 +0,0 @@
{if ($get.action == 'ignore')}
{* Todo: Don't know what to put here? *}
{elseif ($get.action == 'upgrade')}
{foreach $call_tasks AS $ctask}
{if $is_callable_task}
{$ctasks}
{/if}
{/foreach}
{if $errors}
{$CONST.DIAGNOSTIC_ERROR}<br /><br />
<div class="serendipityAdminMsgError msg_error">- <img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />{foreach $errors AS $implode_err}{$implode_err}{if (count($errors) > 1) && !$implode_err@last}<br /> {/if}{/foreach}</div><br /><br />
{/if}
{/if}
{if (($showAbort && $get.action == 'ignore') || $get.action == 'upgrade')}
{if $get.action == 'ignore'}
{$CONST.SERENDIPITY_UPGRADER_YOU_HAVE_IGNORED}
{elseif $get.action == 'upgrade'}
<div class="serendipityAdminMsgSuccess msg_success"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_success.png'}" alt="" />{$CONST.SERENDIPITY_UPGRADER_NOW_UPGRADED|sprintf:$s9y_version}</div>
{/if}
<br />
{if $return_here}
<div align="center">{$print_UPGRADER_RETURN_HERE}</div>
{* could also be used as: <div align="center">{$CONST.SERENDIPITY_UPGRADER_RETURN_HERE|sprintf:"<a href='$serendipityHTTPPath'>":'</a>'}</div> *}
{/if}
{else}
<h2>{$CONST.SERENDIPITY_UPGRADER_WELCOME}</h2>
{$CONST.SERENDIPITY_UPGRADER_PURPOSE|sprintf:$s9y_version_installed}<br />
{$CONST.SERENDIPITY_UPGRADER_WHY|sprintf:$s9y_version}
<br />{$CONST.FIRST_WE_TAKE_A_LOOK}.
<br /><br />
<div align="center">{$result_diagnose}.<br />
<div align="center">
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
{if $checksums}
<tr>
<td colspan="2" style="font-weight: bold">{$CONST.INTEGRITY}</td>
</tr>
{** upgraderResultDiagnoseX looks like <span class="serendipityAdminMsgSuccessInstall" style="color: green/orange/red; font-weight: bold">'. $s .'</span> **}
{** if known, class name color will be added for the inline style into php file **}
<tr>
<td width="200">
{foreach $upgraderResultDiagnose1 AS $urd1}
{$urd1}
{/foreach}
</td>
</tr>
{/if}
<tr>
<td colspan="2" style="font-weight: bold">{$CONST.PERMISSIONS}</td>
</tr>
<tr>
<td>{$basedir}</td>
<td width="200">
{foreach $upgraderResultDiagnose2 AS $urd2}
{$urd2}
{/foreach}
</td>
</tr>
<tr>
<td>{$basedir}{$CONST.PATH_SMARTY_COMPILE}</td>
<td width="200">
{foreach $upgraderResultDiagnose3 AS $urd3}
{$urd3}
{/foreach}
</td>
</tr>
{if $isdir_uploadpath}
<tr>
<td>{$basedir}{$uploadHTTPPath}</td>
<td width="200">
{foreach $upgraderResultDiagnose4 AS $urd4}
{$urd4}
{/foreach}
</td>
</tr>
{/if}
</table>
</div>
{if $showWritableNote}
<div class="serendipityAdminMsgNote msg_notice"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_note.png'}" alt="" />{$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'}</div>
{/if}
{if ($errorCount > 0)}
<div align="center">
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file='admin/img/admin_msg_error.png'}" alt="" />{$CONST.PROBLEM_DIAGNOSTIC}</div>
<h2><a href="serendipity_admin.php">{$CONST.RECHECK_INSTALLATION}</a></h2>
</div>
{/if}
</div>
{if ($errorCount < 1)}
{if (sizeof($sqlfiles) > 0)}
<br />
<h3>{$database_update_types}:</h3>
{$CONST.SERENDIPITY_UPGRADER_FOUND_SQL_FILES}:<br />
{if is_array($sqlfiles) && !empty($sqlfiles)}
{foreach $sqlfiles as $sqlfile}
<div style="padding-left: 5px"><strong>{$sqlfile}</strong></div>
{/foreach}
{/if}
{/if}
<br />
<h3>{$CONST.SERENDIPITY_UPGRADER_VERSION_SPECIFIC}:</h3>
{if is_array($tasks) && !empty($tasks)}
{foreach $tasks as $task}
<div><strong>{$task.version} - {$task.title}</strong></div>
<div style="padding-left: 5px">{$task.desc|nl2br}</div><br />
{/foreach}
{/if}
{if ($taskCount == 0)}
{$CONST.SERENDIPITY_UPGRADER_NO_VERSION_SPECIFIC}
{/if}
<br /><br />
<hr noshade="noshade">
{if (($taskCount > 0) || (sizeof($sqlfiles) > 0))}
<strong>{$CONST.SERENDIPITY_UPGRADER_PROCEED_QUESTION}</strong>
<br /><br /><a href="{$upgradeLoc}" class="serendipityPrettyButton input_button">{$CONST.SERENDIPITY_UPGRADER_PROCEED_DOIT}</a> {if $showAbort}<a href="{$abortLoc}" class="serendipityPrettyButton">{$CONST.SERENDIPITY_UPGRADER_PROCEED_ABORT}</a>{/if}
{else}
<strong>{$CONST.SERENDIPITY_UPGRADER_NO_UPGRADES}</strong>
<br /><br /><a href="{$upgradeLoc}" class="serendipityPrettyButton input_button">{$CONST.SERENDIPITY_UPGRADER_CONSIDER_DONE}</a>
{/if}
{/if} {* errorCount end *}
{/if}{* showAbort else end *}

View File

@ -1,153 +0,0 @@
{if $delete_yes}
{if $no_delete_permission}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.CREATE_NOT_AUTHORIZED}</div>
{else}
{if $no_delete_permission_userlevel}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</div>
{else}
{if $delete_permission}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.DELETED_USER|sprintf:"{$user|escape:"html"}":"{$realname|escape:"html"}"}
</div>
{else}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</div>
{/if}
{/if}
{/if}
{/if}
{if $save_new}
{if $no_save_permission}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.CREATE_NOT_AUTHORIZED}</div>
{else}
{if $no_group_selected}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.WARNING_NO_GROUPS_SELECTED}</div>
{/if}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.CREATED_USER|sprintf:"# {$user|escape:"html"}":"{$realname|escape:"html"}"}
</div>
{/if}
{/if}
{if $save_edit}
{if $no_edit_permission}
<div class="serendipityAdminMsgError msg_error">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />
{$CONST.CREATE_NOT_AUTHORIZED}
</div>
{else}
{if $no_edit_permission_userlevel}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</div>
{else}
{if $no_group_selected}
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_error.png"}" alt="" />{$CONST.WARNING_NO_GROUPS_SELECTED}</div>
{/if}
<div class="serendipityAdminMsgSuccess msg_success">
<img class="img_error" src="{serendipity_getFile file="admin/img/admin_msg_success.png"}" alt="" />
{$CONST.MODIFIED_USER|sprintf:"{$realname|escape:"html"}"}
</div>
{/if}
{/if}
{/if}
{if $delete == false}
<table width="100%">
<tr>
<td><strong>{$CONST.USER}</strong></td>
<td width="100" align="center"><strong>{$CONST.USER_LEVEL}</strong></td>
<td width="300">&nbsp;</td>
</tr>
<tr>
<td colspan="3">
{foreach $users as $user}
{if $user.isEditable}
<div class="serendipity_admin_list_item serendipity_admin_list_item_{if $group@iteration is even} even {else} uneven {/if}">
<table width="100%">
<tr>
{* TODO: Add username to list once tom figures out how to fix uneven rowstyles *}
<td><img src="{if $user.userlevel >= {$CONST.USERLEVEL_ADMIN}}
{serendipity_getFile file="admin/img/user_admin.png"}
{else}
{if $user.userlevel >= {$CONST.USERLEVEL_CHIEF}}
{serendipity_getFile file="admin/img/user_chief.png"}
{else}
{serendipity_getFile file="admin/img/user_editor.png"}
{/if}
{/if}" alt="" style="border: 0px none ; vertical-align: bottom; display: inline;" />{$user.realname|escape:"html"}</td>
<td width="100" align="center">{$user.userlevel}</td>
<td width="300" align="right">
<a target="_blank" href="{$user.authorUrl}" title="{$CONST.PREVIEW} {$user.realname}" class="serendipityIconLink">
<img src="{serendipity_getFile file="admin/img/zoom.png"}" alt="{$CONST.PREVIEW}" />{$CONST.PREVIEW}</a>
<a href="?serendipity[adminModule]=users&amp;serendipity[adminAction]=edit&amp;serendipity[userid]={$user.authorid}#editform" title="{$CONST.EDIT} {$user.realname|escape:"html"}" class="serendipityIconLink"><img src="{serendipity_getFile file="admin/img/edit.png"}" alt="{$CONST.EDIT} {$user.realname|escape:"html"}" />{$CONST.EDIT}</a>
<a href="?{$urlFormToken}&amp;serendipity[adminModule]=users&amp;serendipity[adminAction]=delete&amp;serendipity[userid]=$user.authorid" title="{$CONST.DELETE} {$user.realname|escape:"html"}" class="serendipityIconLink"><img src="{serendipity_getFile file="admin/img/delete.png"}" alt="{$CONST.DELETE} {$user.realname|escape:"html"}" />{$CONST.DELETE}</a></td>
</tr>
</table>
</div>
{/if}
{/foreach}
</td>
</tr>
{if $new}
<tr>
<td colspan="3" align="right">
<form action="?serendipity[adminModule]=users" method="post">
<input type="submit" name="NEW" value="{$CONST.CREATE_NEW_USER}" class="serendipityPrettyButton input_button" />
</form>
</td>
</tr>
{/if}
</table>
{/if}
{if $show_form}
<br />
<br />
<hr noshade="noshade">
<form action="?serendipity[adminModule]=users#editform" method="post">
{$formToken}
<div>
<h3>
{if $adminAction == "edit"}
<a id="editform"></a>
{if $no_create_permission}
<strong>{$CONST.CREATE_NOT_AUTHORIZED}</strong><br />
{$CONST.EDIT}
{else}
{if $create_permission}
{$CONST.EDIT}
<input type="hidden" name="serendipity[user]" value="{$from.authorid}" />
{else}
<strong>{$CONST.CREATE_NOT_AUTHORIZED}</strong><br />
{$CONST.EDIT}
{/if}
{/if}
{else}
{$CONST.CREATE}
{/if}
</h3>
{$config}
{if $adminAction == "edit"}
<input type="submit" name="SAVE_EDIT" value="{$CONST.SAVE}" class="serendipityPrettyButton input_button" />
{else}
<input type="submit" name="SAVE_NEW" value="{$CONST.CREATE_NEW_USER}" class="serendipityPrettyButton input_button" />
{/if}
</div>
</form>
{else}
{if $delete}
<form action="?serendipity[adminModule]=users" method="post">
<div>
{$CONST.DELETE_USER|sprintf:"{$userid}":"{$realname|escape:"html"}"}
<br /><br />
{$formToken}
<input type="hidden" name="serendipity[user]" value="{$userid}" />
<input type="submit" name="DELETE_YES" value="{$CONST.DUMP_IT}" class="serendipityPrettyButton input_button" />
<input type="submit" name="NO" value="{$CONST.NOT_REALLY}" class="serendipityPrettyButton input_button" />
</div>
</form>
{/if}
{/if}

View File

@ -1,4 +1,6 @@
<?php # $Id$
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
if (IN_serendipity !== true) {
die ('Don\'t hack!');
@ -23,44 +25,30 @@ define('S9Y_U_SUCCESS', 1);
* @return string returned String
*/
function serendipity_upgraderResultDiagnose($result, $s) {
global $errorCount, $data;
global $errorCount;
if ( $result === S9Y_U_SUCCESS ) {
$data['u_success'] = true; // we dont need data here explicitely, but we keep it for possible future purposes
return '<span class="msg_success">'. $s .'</span>';
return '<span class="serendipityAdminMsgSuccessInstall" style="color: green; font-weight: bold">'. $s .'</span>';
}
if ( $result === S9Y_U_WARNING ) {
$data['u_warning'] = true;
return '<span class="msg_notice">'. $s .'</span>';
return '<span class="serendipityAdminMsgWarningInstall" style="color: orange; font-weight: bold">'. $s .'</span>';
}
if ( $result === S9Y_U_ERROR ) {
$errorCount++;
$data['u_error'] = true;
return '<span class="msg_error">'. $s .'</span>';
return '<span class="serendipityAdminMsgErrorInstall" style="color: red; font-weight: bold">'. $s .'</span>';
}
}
/* shall we add the function to smarty ?? */
/*
function serendipity_smarty_backend_upgraderResultDiagnose($params, $smarty) {
$ssb_URD = serendipity_upgraderResultDiagnose($params[0], $params[1]);
$smarty->assign($ssb_URD);
}
*/
// Setting this value to 'FALSE' is recommended only for SHARED BLOG INSTALLATIONS. This enforces all shared blogs with a common
// codebase to only allow upgrading, no bypassing and thus causing instabilities.
// This variable can also be set as $serendipity['UpgraderShowAbort'] inside serendipity_config_local.inc.php to prevent
// your setting being changed when updating serendipity in first place.
$showAbort = (isset($serendipity['UpgraderShowAbort']) ? $serendipity['UpgraderShowAbort'] : true);
$data['showAbort'] = $showAbort;
$abortLoc = $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[action]=ignore';
$upgradeLoc = $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[action]=upgrade';
$data['abortLoc'] = $abortLoc;
$data['upgradeLoc'] = $upgradeLoc;
/* Functions which needs to be run if installed version is equal or lower */
$tasks = array(array('version' => '0.5.1',
@ -94,7 +82,7 @@ $tasks = array(array('version' => '0.5.1',
'function' => 'serendipity_removeFiles',
'title' => 'Removal of obsolete files',
'arguments' => array($obsolete_files),
'desc' => '<p>The directory structure has been reworked. The following files will be moved to a folder called "backup". If you made manual changes to those files, be sure to read the file docs/CHANGED_FILES to re-implement your changes.</p><div style="font-size: x-small; margin: 15px">' . implode(', ', $obsolete_files) . '</div>'),
'desc' => 'The directory structure has been reworked. The following files will be moved to a folder called "backup". If you made manual changes to those files, be sure to read the file docs/CHANGED_FILES to re-implement your changes.<br /><div style="font-size: x-small; margin: 15px">' . implode(', ', $obsolete_files) . '</div>'),
array('version' => '0.8-alpha4',
'function' => 'serendipity_removeFiles',
@ -142,9 +130,9 @@ $tasks = array(array('version' => '0.5.1',
'function' => 'serendipity_fixPlugins',
'arguments' => array('markup_column_names'),
'title' => 'Configuration options of markup plugins',
'desc' => '<p>Because of the latest multilingual improvements in Serendipity, the database key names for certain configuration directives only found in markup plugins need to be renamed.</p>'
. '<p>This will be automatically handled by Serendipity for all internally bundled and external plugins. If you are using the external plugins "GeShi" and "Markdown", please make sure you will upgrade to their latest versions!</p>'
. '<p>We also advise that you check the plugin configuration of all your markup plugins (like emoticate, nl2br, s9ymarkup, bbcode) and see if the settings you made are all properly migrated.</p>'),
'desc' => 'Because of the latest multilingual improvements in Serendipity, the database key names for certain configuration directives only found in markup plugins need to be renamed.<br />'
. 'This will be automatically handled by Serendipity for all internally bundled and external plugins. If you are using the external plugins "GeShi" and "Markdown", please make sure you will upgrade to their latest versions!<br />'
. 'We also advise that you check the plugin configuration of all your markup plugins (like emoticate, nl2br, s9ymarkup, bbcode) and see if the settings you made are all properly migrated.'),
array('version' => '0.8-beta5',
'function' => 'serendipity_smarty_purge',
@ -209,12 +197,10 @@ if ($serendipity['GET']['action'] == 'ignore') {
}
/* Call functions */
$data['call_tasks'] = array();
foreach ($tasks as $task) {
if (!empty($task['function']) && version_compare($serendipity['versionInstalled'], $task['version'], '<') ) {
if (is_callable($task['function'])) {
$data['is_callable_task'] = true;
$data['call_tasks'][] = sprintf('Calling %s ...<br />', (is_array($task['function']) ? $task['function'][0] . '::'. $task['function'][1] : $task['function']));
echo sprintf('Calling %s ...<br />', (is_array($task['function']) ? $task['function'][0] . '::'. $task['function'][1] : $task['function']));;
if (empty($task['arguments'])) {
call_user_func($task['function']);
@ -228,7 +214,8 @@ if ($serendipity['GET']['action'] == 'ignore') {
}
if (sizeof($errors)) {
$data['errors'] = $errors;
echo DIAGNOSTIC_ERROR . '<br /><br />';
echo '<div class="serendipityAdminMsgError">- <img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . implode('<br />', $errors) . '</div><br /><br />';
}
/* I don't care what you told me, I will always nuke Smarty cache */
@ -236,9 +223,6 @@ if ($serendipity['GET']['action'] == 'ignore') {
}
$data['s9y_version'] = $serendipity['version'];
$data['s9y_version_installed'] = $serendipity['versionInstalled'];
if (($showAbort && $serendipity['GET']['action'] == 'ignore') || $serendipity['GET']['action'] == 'upgrade') {
$privateVariables = array();
if (isset($serendipity['UpgraderShowAbort'])) {
@ -257,117 +241,159 @@ if (($showAbort && $serendipity['GET']['action'] == 'ignore') || $serendipity['G
);
if ($serendipity['GET']['action'] == 'ignore') {
$data['ignore'] = true;
echo SERENDIPITY_UPGRADER_YOU_HAVE_IGNORED;
} elseif ($serendipity['GET']['action'] == 'upgrade') {
// void
printf('<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . SERENDIPITY_UPGRADER_NOW_UPGRADED .'</div>', $serendipity['version']);
}
$data['return_here'] = true;
$data['print_UPGRADER_RETURN_HERE'] = sprintf(SERENDIPITY_UPGRADER_RETURN_HERE, '<a href="'. $serendipity['serendipityHTTPPath'] .'">', '</a>');
echo '<br />';
printf('<div align="center">'. SERENDIPITY_UPGRADER_RETURN_HERE .'</div>', '<a href="'. $serendipity['serendipityHTTPPath'] .'">', '</a>');
$_SESSION['serendipityAuthedUser'] = false;
@session_destroy();
} else {
$data['upgrade'] = true;
$data['result_diagnose'] = sprintf(ERRORS_ARE_DISPLAYED_IN, serendipity_upgraderResultDiagnose(S9Y_U_ERROR, RED), serendipity_upgraderResultDiagnose(S9Y_U_WARNING, YELLOW), serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, GREEN));
echo '<h2>' . SERENDIPITY_UPGRADER_WELCOME . '</h2>';
printf(SERENDIPITY_UPGRADER_PURPOSE . '<br />', $serendipity['versionInstalled']);
printf(SERENDIPITY_UPGRADER_WHY . '.', $serendipity['version']);
echo '<br />' . FIRST_WE_TAKE_A_LOOK . '.';
?>
<br /><br />
<div align="center"><?php printf(ERRORS_ARE_DISPLAYED_IN, serendipity_upgraderResultDiagnose(S9Y_U_ERROR, RED), serendipity_upgraderResultDiagnose(S9Y_U_WARNING, YELLOW), serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, GREEN)); ?>.<br />
<?php
$errorCount = 0;
$showWritableNote = false;
$basedir = $serendipity['serendipityPath'];
$data['basedir'] = $basedir;
$data['upgraderResultDiagnose1'] = array();
if (is_readable($basedir . 'checksums.inc.php')) {
$data['checksums'] = true;
$badsums = serendipity_verifyFTPChecksums();
if ( empty($badsums) ) {
$data['upgraderResultDiagnose1'][] = serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, CHECKSUMS_PASS);
} else {
foreach ($badsums as $rfile => $sum) {
$data['upgraderResultDiagnose1'][] = serendipity_upgraderResultDiagnose(S9Y_U_WARNING, sprintf(CHECKSUM_FAILED, $rfile));
?>
<div align="center">
<table class="serendipity_admin_list_item serendipity_admin_list_item_even" width="90%" align="center">
<?php if (is_readable($basedir . 'checksums.inc.php')) {
$badsums = serendipity_verifyFTPChecksums();
?>
<tr>
<td colspan="2" style="font-weight: bold"><?php echo INTEGRITY ?></td>
</tr>
<tr>
<td width="200"><?php
if ( empty($badsums) ) {
echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, CHECKSUMS_PASS);
} else {
foreach ($badsums as $rfile => $sum) {
echo serendipity_upgraderResultDiagnose(S9Y_U_WARNING, sprintf(CHECKSUM_FAILED, $rfile)) . "<br />\n";
}
}
}
} // End if checksums
?></td>
</tr>
<?php } // End if checksums
?>
<tr>
<td colspan="2" style="font-weight: bold"><?php echo PERMISSIONS ?></td>
</tr>
<tr>
<td><?php echo $basedir ?></td>
<td width="200"><?php
if ( is_writable($basedir) ) {
echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
} else {
$showWritableNote = false;
#Figure out if we're set up a little more securely
#PATH_SMARTY_COMPILE/
#uploads/
#archives/
#.htaccess
#serendipity_config_local.inc.php
# For completeness we could test to make sure the directories
# really are directories, but that's probably overkill
foreach (array('archives/', PATH_SMARTY_COMPILE . '/', 'uploads/', '.htaccess', 'serendipity_config_local.inc.php') as $path) {
if (!is_writeable($basedir . $path)) {
echo serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
$showWritableNote = true;
break;
}
}
$data['upgraderResultDiagnose2'] = array();
if ( is_writable($basedir) ) {
$data['upgraderResultDiagnose2'][] = serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
} else {
$showWritableNote = false;
#Figure out if we're set up a little more securely
#PATH_SMARTY_COMPILE/
#uploads/
#archives/
#.htaccess
#serendipity_config_local.inc.php
# For completeness we could test to make sure the directories
# really are directories, but that's probably overkill
foreach (array('archives/', PATH_SMARTY_COMPILE . '/', 'uploads/', '.htaccess', 'serendipity_config_local.inc.php') as $path) {
if (!is_writeable($basedir . $path)) {
$data['upgraderResultDiagnose2'][] = serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
if (!$showWritableNote) {
echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
}
}
?></td>
</tr>
<tr>
<td><?php echo $basedir . PATH_SMARTY_COMPILE?></td>
<td width="200"><?php
if ( is_writable($basedir . PATH_SMARTY_COMPILE) ) {
echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
} else {
echo serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
$showWritableNote = true;
break;
}
?></td>
</tr>
<?php if (is_dir($basedir . $serendipity['uploadHTTPPath'])) { ?>
<tr>
<td><?php echo $basedir . $serendipity['uploadHTTPPath']; ?></td>
<td width="200"><?php
if (is_writable($basedir . $serendipity['uploadHTTPPath'])) {
echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
} else {
echo serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
?></td>
</tr>
<?php } ?>
</table>
</div>
<?php if ($showWritableNote === true) { ?>
<div class="serendipityAdminMsgNote"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_note.png'); ?>" alt="" /><?php echo sprintf(PROBLEM_PERMISSIONS_HOWTO, 'chmod 1777') ?></div>
<?php }
if ($errorCount > 0) { ?>
<div align="center">
<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_error.png'); ?>" alt="" />
<?php echo PROBLEM_DIAGNOSTIC ?></div>
<h2><a href="serendipity_admin.php"><?php echo RECHECK_INSTALLATION ?></a></h2>
</div>
<?php }
?>
</div>
<?php
if ($errorCount < 1) {
if (sizeof($sqlfiles) > 0) { ?>
<br />
<h3><?php printf(SERENDIPITY_UPGRADER_DATABASE_UPDATES, $serendipity['dbType']) ?>:</h3>
<?php echo SERENDIPITY_UPGRADER_FOUND_SQL_FILES ?>:<br />
<?php
foreach ($sqlfiles as $sqlfile) {
echo '<div style="padding-left: 5px"><strong>'. $sqlfile .'</strong></div>';
}
}
?>
<br />
if (!$showWritableNote) {
$data['upgraderResultDiagnose2'][] = serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
}
}
$data['upgraderResultDiagnose3'] = array();
if ( is_writable($basedir . PATH_SMARTY_COMPILE) ) {
$data['upgraderResultDiagnose3'][] = serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
} else {
$data['upgraderResultDiagnose3'][] = serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
$data['upgraderResultDiagnose4'] = array();
if (is_dir($basedir . $serendipity['uploadHTTPPath'])) {
$data['isdir_uploadpath'] = is_dir($basedir . $serendipity['uploadHTTPPath']);
if (is_writable($basedir . $serendipity['uploadHTTPPath'])) {
$data['upgraderResultDiagnose4'][] = serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
} else {
$data['upgraderResultDiagnose4'][] = serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
$showWritableNote = true;
}
}
$data['showWritableNote'] = $showWritableNote;
$data['errorCount'] = $errorCount;
if ($errorCount < 1) {
if (sizeof($sqlfiles) > 0) {
$data['database_update_types'] = sprintf(SERENDIPITY_UPGRADER_DATABASE_UPDATES, $serendipity['dbType']);
$data['sqlfiles'] = $sqlfiles;
}
<h3><?php echo SERENDIPITY_UPGRADER_VERSION_SPECIFIC ?>:</h3>
<?php
$taskCount = 0;
$data['tasks'] = array();
foreach ( $tasks as $task ) {
if (version_compare($serendipity['versionInstalled'], $task['version'], '<')) {
$data['tasks'][] = $task;
echo '<div><strong>'. $task['version'] .' - '. $task['title'] .'</strong></div>';
echo '<div style="padding-left: 5px">'. nl2br($task['desc']) .'</div><br />';
$taskCount++;
}
}
$data['taskCount'] = $taskCount;
if ($taskCount == 0) {
echo SERENDIPITY_UPGRADER_NO_VERSION_SPECIFIC;
}
?>
<br /><br />
<hr noshade="noshade">
<?php if ($taskCount > 0 || sizeof($sqlfiles) > 0) { ?>
<strong><?php echo SERENDIPITY_UPGRADER_PROCEED_QUESTION ?></strong>
<br /><br /><a href="<?php echo $upgradeLoc; ?>" class="serendipityPrettyButton input_button"><?php echo SERENDIPITY_UPGRADER_PROCEED_DOIT ?></a> <?php if ($showAbort) { ?><a href="<?php echo $abortLoc; ?>" class="serendipityPrettyButton"><?php echo SERENDIPITY_UPGRADER_PROCEED_ABORT ?></a><?php } ?>
<?php } else { ?>
<strong><?php echo SERENDIPITY_UPGRADER_NO_UPGRADES ?></strong>
<br /><br /><a href="<?php echo $upgradeLoc; ?>" class="serendipityPrettyButton input_button"><?php echo SERENDIPITY_UPGRADER_CONSIDER_DONE ?></a>
<?php }
}
}
$data['get']['action'] = $serendipity['GET']['action']; // don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
/* see on top */
#$serendipity['smarty']->registerPlugin('function', 'serendipity_upgraderResultDiagnose', 'serendipity_smarty_backend_upgraderResultDiagnose');
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/upgrader.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -12,24 +12,23 @@ if (!serendipity_checkPermission('adminUsers')) {
require_once(S9Y_INCLUDE_PATH . 'include/functions_installer.inc.php');
$data = array();
/* Delete a user */
if (isset($_POST['DELETE_YES']) && serendipity_checkFormToken()) {
$data['delete_yes'] = true;
$user = serendipity_fetchUsers($serendipity['POST']['user']);
if (($serendipity['serendipityUserlevel'] < USERLEVEL_ADMIN && $user[0]['userlevel'] >= $serendipity['serendipityUserlevel']) || !serendipity_checkPermission('adminUsersDelete')) {
$data['no_delete_permission'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . CREATE_NOT_AUTHORIZED . '</div>';
} elseif ($_POST['userlevel'] > $serendipity['serendipityUserlevel']) {
$data['no_delete_permission_userlevel'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . CREATE_NOT_AUTHORIZED_USERLEVEL . '</div>';
} else {
$group_intersect = serendipity_intersectGroup($user[0]['authorid']);
if (serendipity_checkPermission('adminUsersMaintainOthers') || (serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect)) {
$data['delete_permission'] = true;
if (serendipity_checkPermission('adminUsersMaintainOthers') ||
(serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect)) {
serendipity_deleteAuthor($user[0]['authorid']);
printf('<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . DELETED_USER . '</div>', htmlspecialchars($serendipity['POST']['user']), htmlspecialchars($user[0]['realname']));
serendipity_plugin_api::hook_event('backend_users_delete', $user[0]);
$data['user'] = $serendipity['POST']['user'];
$data['realname'] = $_POST['realname'];
} else {
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . CREATE_NOT_AUTHORIZED_USERLEVEL . '</div>';
}
}
}
@ -37,9 +36,8 @@ if (isset($_POST['DELETE_YES']) && serendipity_checkFormToken()) {
/* Save new user */
if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) {
$data['save_new'] = true;
if (($serendipity['serendipityUserlevel'] < USERLEVEL_ADMIN && $_POST['userlevel'] >= $serendipity['serendipityUserlevel']) || !serendipity_checkPermission('adminUsersCreateNew')) {
$data['no_save_permission'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . CREATE_NOT_AUTHORIZED . '</div>';
} else {
$serendipity['POST']['user'] = serendipity_addAuthor($_POST['username'], $_POST['pass'], $_POST['realname'], $_POST['email'], $_POST['userlevel'], 1);
@ -74,7 +72,7 @@ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) {
}
if (count($_POST[$item['var']]) < 1) {
$data['no_group_selected'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . WARNING_NO_GROUPS_SELECTED . '</div>';
} else {
serendipity_updateGroups($_POST[$item['var']], $serendipity['POST']['user'], false);
}
@ -92,21 +90,18 @@ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) {
}
serendipity_plugin_api::hook_event('backend_users_add', $serendipity['POST']['user']);
$data['user'] = $serendipity['POST']['user'];
$data['realname'] = $_POST['realname'];
printf('<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . CREATED_USER . '</div>', '#' . htmlspecialchars($serendipity['POST']['user']) . ', ' . htmlspecialchars($_POST['realname']));
}
}
/* Edit a user */
if (isset($_POST['SAVE_EDIT']) && serendipity_checkFormToken()) {
$data['save_edit'] = true;
$user = serendipity_fetchUsers($serendipity['POST']['user']);
$data['user'] = $user;
if (!serendipity_checkPermission('adminUsersMaintainOthers') && $user[0]['userlevel'] >= $serendipity['serendipityUserlevel']) {
$data['no_edit_permission'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . CREATE_NOT_AUTHORIZED . '</div>';
} elseif ($_POST['userlevel'] > $serendipity['serendipityUserlevel']) {
$data['no_edit_permission_userlevel'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . CREATE_NOT_AUTHORIZED_USERLEVEL . '</div>';
} else {
$valid_groups = serendipity_getGroups($serendipity['authorid'], true);
$config = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
@ -139,7 +134,7 @@ if (isset($_POST['SAVE_EDIT']) && serendipity_checkFormToken()) {
}
if (count($_POST[$item['var']]) < 1) {
$data['no_group_selected'] = true;
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . WARNING_NO_GROUPS_SELECTED . '</div>';
} else {
serendipity_updateGroups($_POST[$item['var']], $serendipity['POST']['user'], false);
}
@ -166,97 +161,153 @@ if (isset($_POST['SAVE_EDIT']) && serendipity_checkFormToken()) {
serendipity_updatePermalink($pl_data, 'author');
serendipity_plugin_api::hook_event('backend_users_edit', $pl_data);
printf('<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . MODIFIED_USER . '</div>', htmlspecialchars($_POST['realname']));
}
}
if ($serendipity['GET']['adminAction'] != 'delete') {
$data['delete'] = false;
if (serendipity_checkPermission('adminUsersMaintainOthers')) {
$users = serendipity_fetchUsers('');
} elseif (serendipity_checkPermission('adminUsersMaintainSame')) {
$users = serendipity_fetchUsers('', serendipity_getGroups($serendipity['authorid'], true));
} else {
$users = serendipity_fetchUsers($serendipity['authorid']);
}
?>
<table width="100%">
<tr>
<td><strong><?php echo USER; ?></strong></td>
<td width="100" align="center"><strong><?php echo USER_LEVEL ?></strong></td>
<td width="300">&nbsp;</td>
</tr>
<tr>
<td colspan="3">
<?php
if (serendipity_checkPermission('adminUsersMaintainOthers')) {
$users = serendipity_fetchUsers('');
} elseif (serendipity_checkPermission('adminUsersMaintainSame')) {
$users = serendipity_fetchUsers('', serendipity_getGroups($serendipity['authorid'], true));
} else {
$users = serendipity_fetchUsers($serendipity['authorid']);
}
$data['users'] = $users;
$data['urlFormToken'] = serendipity_setFormToken('url');
if (is_array($users)) {
foreach($users as $user => $userdata) {
if ($userdata['userlevel'] < $serendipity['serendipityUserlevel'] || $userdata['authorid'] == $serendipity['authorid'] || $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN ) {
$data['users'][$user]['isEditable'] = true;
$data['users'][$user]['authorUrl'] = serendipity_authorURL($userdata);
$i = 0;
if (is_array($users)) {
foreach($users as $user) {
if ($user['userlevel'] < $serendipity['serendipityUserlevel'] || $user['authorid'] == $serendipity['authorid'] || $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN ) {
if ( $user['userlevel'] >= USERLEVEL_ADMIN ) {
$img = serendipity_getTemplateFile('admin/img/user_admin.png');
} elseif ( $user['userlevel'] >= USERLEVEL_CHIEF ) {
$img = serendipity_getTemplateFile('admin/img/user_chief.png');
} else {
$img = serendipity_getTemplateFile('admin/img/user_editor.png');
}
?>
<div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo ($i++ % 2) ? 'even' : 'uneven' ?>">
<table width="100%">
<tr>
<?php /* TODO: Add username to list once tom figures out how to fix uneven rowstyles */ ?>
<td><img src="<?php echo $img ?>" alt="" style="border: 0px none ; vertical-align: bottom; display: inline;" /> <?php echo htmlspecialchars($user['realname']); ?></td>
<td width="100" align="center"><?php echo $user['userlevel']; ?></td>
<td width="300" align="right">
<a target="_blank" href="<?php echo serendipity_authorURL($user); ?>" title="<?php echo PREVIEW . ' ' . $user['realname']; ?>" class="serendipityIconLink">
<img src="<?php echo serendipity_getTemplateFile('admin/img/zoom.png'); ?>" alt="<?php echo PREVIEW; ?>" /><?php echo PREVIEW ?></a>
<a href="?serendipity[adminModule]=users&amp;serendipity[adminAction]=edit&amp;serendipity[userid]=<?php echo $user['authorid'] ?>#editform" title="<?php echo EDIT . " " . htmlspecialchars($user['realname']); ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/edit.png'); ?>" alt="<?php echo EDIT . " " . htmlspecialchars($user['realname']); ?>" /><?php echo EDIT ?></a>
<a href="?<?php echo serendipity_setFormToken('url'); ?>&amp;serendipity[adminModule]=users&amp;serendipity[adminAction]=delete&amp;serendipity[userid]=<?php echo $user['authorid'] ?>" title="<?php echo DELETE . " " . htmlspecialchars($user['realname']); ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/delete.png'); ?>" alt="<?php echo DELETE . " " . htmlspecialchars($user['realname']); ?>" /><?php echo DELETE ?></a></td>
</tr>
</table>
</div>
<?php
}
}
if ( !isset($_POST['NEW']) && serendipity_checkPermission('adminUsersCreateNew')) {
$data['new'] = true;
}
}
?>
</td>
</tr>
<?php if ( !isset($_POST['NEW']) && serendipity_checkPermission('adminUsersCreateNew')) { ?>
<tr>
<td colspan="3" align="right">
<form action="?serendipity[adminModule]=users" method="post">
<input type="submit" name="NEW" value="<?php echo CREATE_NEW_USER; ?>" class="serendipityPrettyButton input_button" />
</form>
</td>
</tr>
<?php } ?>
</table>
<?php
}
if ( ($serendipity['GET']['adminAction'] == 'edit' && serendipity_checkPermission('adminUsersDelete')) || (isset($_POST['NEW']) && serendipity_checkPermission('adminUsersCreateNew')) ) {
$data['adminAction'] = $serendipity['GET']['adminAction'];
$data['show_form'] = true;
$data['formToken'] = serendipity_setFormToken();
if ($serendipity['GET']['adminAction'] == 'edit') {
$user = serendipity_fetchUsers($serendipity['GET']['userid']);
$group_intersect = serendipity_intersectGroup($user[0]['authorid']);
echo "userid: ";
echo $serendipity['GET']['userid'];
if ($user[0]['userlevel'] >= $serendipity['serendipityUserlevel'] && $user[0]['authorid'] != $serendipity['authorid'] && !serendipity_checkPermission('adminUsersMaintainOthers')) {
$data['no_create_permission'] = true;
$from = array();
} elseif (serendipity_checkPermission('adminUsersMaintainOthers') ||
(serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect)) {
$data['create_permission'] = true;
$from = &$user[0];
unset($from['password']);
} else {
$from = array();
}
?>
<br />
<br />
<hr noshade="noshade">
<form action="?serendipity[adminModule]=users#editform" method="post">
<?php echo serendipity_setFormToken(); ?>
<div>
<h3>
<?php
if ($serendipity['GET']['adminAction'] == 'edit') {
echo '<a id="editform"></a>';
$user = serendipity_fetchUsers($serendipity['GET']['userid']);
$group_intersect = serendipity_intersectGroup($user[0]['authorid']);
if ($user[0]['userlevel'] >= $serendipity['serendipityUserlevel'] && $user[0]['authorid'] != $serendipity['authorid'] && !serendipity_checkPermission('adminUsersMaintainOthers')) {
echo '<strong>' . CREATE_NOT_AUTHORIZED . '</strong><br />';
echo EDIT;
$from = array();
} elseif (serendipity_checkPermission('adminUsersMaintainOthers') ||
(serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect)) {
echo EDIT;
$from = &$user[0];
unset($from['password']);
echo '<input type="hidden" name="serendipity[user]" value="' . (int)$from['authorid'] . '" />';
} else {
echo '<strong>' . CREATE_NOT_AUTHORIZED . '</strong><br />';
echo EDIT;
$from = array();
}
$data['from'] = $from;
} else {
echo CREATE;
$from = array();
}
?>
</h3>
$config = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
if (!empty($serendipity['GET']['userid'])) {
$from['groups'] = serendipity_getGroups($serendipity['GET']['userid']);
} else {
$from['groups'] = array();
}
<?php
$config = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
if (!empty($serendipity['GET']['userid'])) {
$from['groups'] = serendipity_getGroups($serendipity['GET']['userid']);
} else {
$from['groups'] = array();
}
ob_start();
serendipity_printConfigTemplate($config, $from, true, false, true, true);
$data['config'] = ob_get_contents();
ob_end_clean();
serendipity_printConfigTemplate($config, $from, true, false, true, true);
if ($serendipity['GET']['adminAction'] == 'edit') { ?>
<input type="submit" name="SAVE_EDIT" value="<?php echo SAVE; ?>" class="serendipityPrettyButton input_button" />
<?php } else { ?>
<input type="submit" name="SAVE_NEW" value="<?php echo CREATE_NEW_USER; ?>" class="serendipityPrettyButton input_button" />
<?php } ?>
</div>
</form>
<?php
} elseif ($serendipity['GET']['adminAction'] == 'delete' && serendipity_checkPermission('adminUsersDelete')) {
$user = serendipity_fetchUsers($serendipity['GET']['userid']);
$group_intersect = serendipity_intersectGroup($user[0]['authorid']);
if (serendipity_checkPermission('adminUsersMaintainOthers') ||
(serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect)) {
$data['delete'] = true;
$data['userid'] = (int)$serendipity['GET']['userid'];
$data['realname'] = $user[0]['realname'];
$data['formToken'] = serendipity_setFormToken();
?>
<form action="?serendipity[adminModule]=users" method="post">
<div>
<?php printf(DELETE_USER, (int)$serendipity['GET']['userid'], htmlspecialchars($user[0]['realname'])); ?>
<br /><br />
<?php echo serendipity_setFormToken(); ?>
<input type="hidden" name="serendipity[user]" value="<?php echo (int)$serendipity['GET']['userid']; ?>" />
<input type="submit" name="DELETE_YES" value="<?php echo DUMP_IT; ?>" class="serendipityPrettyButton input_button" />
<input type="submit" name="NO" value="<?php echo NOT_REALLY; ?>" class="serendipityPrettyButton input_button" />
</div>
</form>
<?php
}
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/$tpldir/users.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -49,7 +49,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') {
function serendipity_db_connect() {
global $serendipity;
$host = port = '';
$host = $port = '';
if (strlen($serendipity['dbHost'])) {
if (false !== strstr($serendipity['dbHost'], ':')) {
$tmp = explode(':', $serendipity['dbHost']);
@ -216,12 +216,12 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re
if (!$serendipity['dbSth']) {
if (!$expectError && !$serendipity['production']) {
print "<span class='msg_error'>Error in $sql</span>";
print "Error in $sql<br/>\n";
print $serendipity['dbConn']->errorInfo() . "<BR/>\n";
if (function_exists('debug_backtrace')) {
highlight_string(var_export(debug_backtrace(), 1));
}
print "<pre>$sql</pre>\n";
print "<br><code>$sql</code>\n";
}
return $type_map['false'];
}

View File

@ -234,12 +234,12 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re
if (!$serendipity['dbSth']) {
if (!$expectError && !$serendipity['production']) {
print "<span class='msg_error'>Error in $sql</span>";
print "Error in $sql<br/>\n";
print $serendipity['dbConn']->errorInfo() . "<BR/>\n";
if (function_exists('debug_backtrace')) {
highlight_string(var_export(debug_backtrace(), 1));
}
print "<pre>$sql</pre>";
print "<br><code>$sql</code>\n";
}
return $type_map['false'];
}

View File

@ -53,7 +53,7 @@ function serendipity_db_connect() {
$function = 'pg_connect';
}
$host = port = '';
$host = $port = '';
if (strlen($serendipity['dbHost'])) {
if (false !== strstr($serendipity['dbHost'], ':')) {
$tmp = explode(':', $serendipity['dbHost']);
@ -226,12 +226,12 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re
if (!$serendipity['dbLastResult']) {
if (!$expectError && !$serendipity['production']) {
print "<span class='msg_error'>Error in $sql</span>";
print "Error in $sql<br/>\n";
print pg_last_error($serendipity['dbConn']) . "<BR/>\n";
if (function_exists('debug_backtrace')) {
highlight_string(var_export(debug_backtrace(), 1));
}
print "<pre>$sql</pre>";
print "<br><code>$sql</code>\n";
}
return $type_map['false'];
}

View File

@ -936,14 +936,14 @@ function serendipity_displayTopUrlList($list, $limit, $use_links = true, $interv
foreach ($rows as $row) {
if ($use_links) {
printf(
'<span class="block_level"><a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)</span>',
'<a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)<br />',
htmlspecialchars($row['scheme']),
htmlspecialchars($row['host']),
htmlspecialchars($row['total'])
);
} else {
printf(
'<span class="block_level">%1$s (%2$s)</span>',
'%1$s (%2$s)<br />',
htmlspecialchars($row['host']),
htmlspecialchars($row['total'])
);

View File

@ -803,7 +803,6 @@ function serendipity_iframe(&$entry, $mode = null, $use_smarty = true) {
$show = false;
switch ($mode) {
case 'save':
echo '<div class="clearfix">';
echo '<div style="float: left; height: 75px"></div>';
$res = serendipity_updertEntry($entry);
@ -816,18 +815,17 @@ function serendipity_iframe(&$entry, $mode = null, $use_smarty = true) {
echo '<script type="text/javascript">parent.document.forms[\'serendipityEntry\'][\'serendipity[id]\'].value = "' . $serendipity['lastSavedEntry'] . '";</script>';
}
$entrylink = serendipity_archiveURL($res, $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp']));
echo '<div class="serendipityAdminMsgSuccess msg_success"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . ENTRY_SAVED . ' (<a href="' . $entrylink . '" target="_blank">' . VIEW . '</a>)</div>';
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . ENTRY_SAVED . ' (<a href="' . $entrylink . '" target="_blank">' . VIEW . '</a>)</div>';
}
echo '</div>';
echo '<br style="clear: both" />';
$show = true;
break;
case 'preview':
echo '<div class="clearfix">';
echo '<div id="serendipity_preview_spacer" style="float: left; height: 225px"></div>';
serendipity_printEntries(array($entry), ($entry['extended'] != '' ? 1 : 0), true);
echo '</div>';
echo '<br id="serendipity_preview_spacer2" style="clear: both" />';
$show = true;
break;
@ -881,7 +879,7 @@ function serendipity_iframe_create($mode, &$entry) {
echo '<iframe src="serendipity_admin.php?serendipity[is_iframe]=true&amp;serendipity[iframe_mode]=' . $mode . '" id="serendipity_iframe" name="serendipity_iframe" ' . $attr . ' width="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto" title="Serendipity">'
. IFRAME_WARNING
. '</iframe>';
. '</iframe><br /><br />';
}
/**
@ -1410,7 +1408,7 @@ function &serendipity_getGroups($authorid, $sequence = false) {
*
* @access public
* @param int The ID of the group to fetch the authors of
* @return array The assotiative array of author IDs and names
* @return array The assoziative array of author IDs and names
*/
function &serendipity_getGroupUsers($groupid) {
global $serendipity;
@ -2001,7 +1999,7 @@ function serendipity_reportXSRF($type = 0, $reset = true, $use_config = false) {
// Set this in your serendipity_config_local.inc.php if you want HTTP Referrer blocking:
// $serendipity['referrerXSRF'] = true;
$string = '<div class="serendipityAdminMsgError msg_error XSRF_' . $type . '"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . ERROR_XSRF . '</div>';
$string = '<div class="serendipityAdminMsgError XSRF_' . $type . '"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . ERROR_XSRF . '</div>';
if ($reset) {
// Config key "referrerXSRF" can be set to enable blocking based on HTTP Referrer. Recommended for Paranoia.
if (($use_config && isset($serendipity['referrerXSRF']) && $serendipity['referrerXSRF']) || $use_config === false) {

View File

@ -1500,7 +1500,7 @@ function serendipity_generateCategoryList($cats, $select = array(0), $type = 0,
if ($cat['parentid'] == $id) {
switch ($type) {
case 0:
$ret .= str_repeat('&nbsp;', $level * 2).'&bull;&nbsp;<span class="block_level" id="catItem_' . $cat['categoryid'] . '"' . (($cat['categoryid'] && in_array($cat['categoryid'], $select)) ? ' selected="selected"' : '') . '><a href="?serendipity[adminModule]=category&amp;serendipity[cat][catid]=' . $cat['categoryid'] . '">' . (!empty($cat['category_icon']) ? '<img style="vertical-align: middle;" src="' . $cat['category_icon'] . '" border="0" alt="' . $cat['category_name'] . '"/> ' : '') . htmlspecialchars($cat['category_name']) . (!empty($cat['category_description']) ? ' - ' . htmlspecialchars($cat['category_description']) : '') . '</a></span>';
$ret .= str_repeat('&nbsp;', $level * 2).'&bull;&nbsp;<span id="catItem_' . $cat['categoryid'] . '"' . (($cat['categoryid'] && in_array($cat['categoryid'], $select)) ? ' selected="selected"' : '') . '><a href="?serendipity[adminModule]=category&amp;serendipity[cat][catid]=' . $cat['categoryid'] . '">' . (!empty($cat['category_icon']) ? '<img style="vertical-align: middle;" src="' . $cat['category_icon'] . '" border="0" alt="' . $cat['category_name'] . '"/> ' : '') . htmlspecialchars($cat['category_name']) . (!empty($cat['category_description']) ? ' - ' . htmlspecialchars($cat['category_description']) : '') . '</a></span><br/>' . "\n";
break;
case 1:
case 2:
@ -1525,7 +1525,7 @@ function serendipity_generateCategoryList($cats, $select = array(0), $type = 0,
htmlspecialchars($cat['category_name']));
} else {
$ret .= sprintf(
'<span class="block_level">%s<a href="%s" title="%s">%s</a></span>',
'%s<a href="%s" title="%s">%s</a><br />',
str_repeat('&#160;', $level * 3),
serendipity_categoryURL($cat, 'serendipityHTTPPath'),
htmlspecialchars($cat['category_description']),

View File

@ -128,7 +128,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
}
if (!empty($serendipity['GET']['url'])) {
$entry['body'] .= "\n" . '<a class="block_level" href="' . htmlspecialchars(utf8_decode(urldecode($serendipity['GET']['url']))) . '">' . $entry['title'] . '</a>';
$entry['body'] .= "\n" . '<br /><a href="' . htmlspecialchars(utf8_decode(urldecode($serendipity['GET']['url']))) . '">' . $entry['title'] . '</a>';
}
$hidden = '';
@ -187,7 +187,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
/* HTML CODE BELOW IS FOR FALLBACK PORTABILITY ONLY - MODIFY CODE IN TEMPLATE ADMIN/ENTRIES.TPL INSTEAD! */
if (!empty($errMsg)) {
?>
<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_error.png'); ?>" alt="" /><?php echo $errMsg; ?></div>
<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="<?php echo serendipity_getTemplateFile('admin/img/admin_msg_error.png'); ?>" alt="" /><?php echo $errMsg; ?></div>
<?php } ?>
<form <?php echo $entry['entry_form']; ?> action="<?php echo $targetURL; ?>" method="post" id="serendipityEntry" style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px">
<?php echo $hidden; ?>
@ -423,15 +423,16 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="left" width="70%">
<input class="input_checkbox" id="checkbox_allow_comments" type="checkbox" name="serendipity[allow_comments]" value="true" <?php echo $allow_comments; ?> /><label for="checkbox_allow_comments"><?php echo COMMENTS_ENABLE; ?></label>
<input class="input_checkbox" id="checkbox_allow_comments" type="checkbox" name="serendipity[allow_comments]" value="true" <?php echo $allow_comments; ?> /><label for="checkbox_allow_comments"><?php echo COMMENTS_ENABLE; ?></label><br />
<input class="input_checkbox" id="checkbox_moderate_comments" type="checkbox" name="serendipity[moderate_comments]" value="true" <?php echo $moderate_comments; ?> /><label for="checkbox_moderate_comments"><?php echo COMMENTS_MODERATE; ?></label>
</td>
<td align="right" rowspan="2" valign="middle" width="30%">
<input accesskey="p" type="submit" value="- <?php echo PREVIEW; ?> -" class="serendipityPrettyButton input_button" style="width: 150px" onclick="document.forms['serendipityEntry'].elements['serendipity[preview]'].value='true';" />
<input accesskey="p" type="submit" value="- <?php echo PREVIEW; ?> -" class="serendipityPrettyButton input_button" style="width: 150px" onclick="document.forms['serendipityEntry'].elements['serendipity[preview]'].value='true';" /><br />
<input accesskey="s" type="submit" onclick="return checkSave();" value="- <?php echo SAVE; ?> -" class="serendipityPrettyButton input_button" style="width: 150px" />
</td>
</tr>
</table>
<br />
</td>
</tr>
@ -490,6 +491,7 @@ if (!$serendipity['wysiwyg']) {
<tr>
<td colspan="3">
<br />
<fieldset>
<legend><b><?php echo ADVANCED_OPTIONS; ?></b></legend>
<?php

View File

@ -28,7 +28,7 @@ function serendipity_isActiveFile($file) {
if ($core) {
return true;
}
$eventData = false;
serendipity_plugin_api::hook_event('backend_media_check', $eventData, $file);
return $eventData;
@ -315,59 +315,55 @@ function serendipity_updateImageInDatabase($updates, $id) {
function serendipity_deleteImage($id) {
global $serendipity;
$dThumb = array();
$messages = '';
$file = serendipity_fetchImageFromDatabase($id);
if (!is_array($file)) {
$messages .= sprintf(FILE_NOT_FOUND . '<br />', $id);
//return false;
} else {
$dFile = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']);
$dThumb = array(array(
'fthumb' => $file['thumbnail_name']
));
if (!serendipity_checkPermission('adminImagesDelete')) {
return;
}
if (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid']) {
// A non-admin user may not delete private files from other users.
return;
}
if (!$file['hotlink']) {
if (file_exists($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
if (@unlink($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
$messages .= sprintf(DELETE_FILE . '<br />', $dFile);
} else {
$messages .= sprintf(DELETE_FILE_FAIL . '<br />', $dFile);
}
serendipity_plugin_api::hook_event('backend_media_delete', $dThumb);
foreach($dThumb AS $thumb) {
$dfnThumb = $file['path'] . $file['name'] . (!empty($thumb['fthumb']) ? '.' . $thumb['fthumb'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']);
$dfThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dfnThumb;
if (@unlink($dfThumb)) {
$messages .= sprintf(DELETE_THUMBNAIL . '<br />', $dfnThumb);
}
}
} else {
$messages .= sprintf(FILE_NOT_FOUND . '<br />', $dFile);
}
} else {
$messages .= sprintf(DELETE_HOTLINK_FILE . '<br />', $file['name']);
}
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}images WHERE id = ". (int)$id);
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}mediaproperties WHERE mediaid = ". (int)$id);
printf(FILE_NOT_FOUND . '<br />', $id);
return false;
}
return $messages;
$dFile = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']);
$dThumb = array(array(
'fthumb' => $file['thumbnail_name']
));
if (!serendipity_checkPermission('adminImagesDelete')) {
return;
}
if (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid']) {
// A non-admin user may not delete private files from other users.
return;
}
if (!$file['hotlink']) {
if (file_exists($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
if (@unlink($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) {
printf(DELETE_FILE . '<br />', $dFile);
} else {
printf(DELETE_FILE_FAIL . '<br />', $dFile);
}
serendipity_plugin_api::hook_event('backend_media_delete', $dThumb);
foreach($dThumb AS $thumb) {
$dfnThumb = $file['path'] . $file['name'] . (!empty($thumb['fthumb']) ? '.' . $thumb['fthumb'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']);
$dfThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dfnThumb;
if (@unlink($dfThumb)) {
printf(DELETE_THUMBNAIL . '<br />', $dfnThumb);
}
}
} else {
printf(FILE_NOT_FOUND . '<br />', $dFile);
}
} else {
printf(DELETE_HOTLINK_FILE . '<br />', $file['name']);
}
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}images WHERE id = ". (int)$id);
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}mediaproperties WHERE mediaid = ". (int)$id);
}
/**
@ -388,16 +384,16 @@ function serendipity_fetchImages($group = false, $start = 0, $end = 20, $images
$basedir = $serendipity['serendipityPath'] . $serendipity['uploadPath'];
$images = array();
if ($dir = @opendir($basedir . $odir)) {
$aTempArray = array();
while (($file = @readdir($dir)) !== false) {
if ($file == '.svn' || $file == 'CVS' || $file == '.' || $file == '..') {
continue;
}
array_push($aTempArray, $file);
}
@closedir($dir);
sort($aTempArray);
foreach($aTempArray AS $f) {
$aTempArray = array();
while (($file = @readdir($dir)) !== false) {
if ($file == '.svn' || $file == 'CVS' || $file == '.' || $file == '..') {
continue;
}
array_push($aTempArray, $file);
}
@closedir($dir);
sort($aTempArray);
foreach($aTempArray AS $f) {
if (strpos($f, $serendipity['thumbSuffix']) !== false) {
// This is a s9y thumbnail, skip it.
continue;
@ -492,8 +488,8 @@ function serendipity_insertHotlinkedImageInDatabase($filename, $url, $authorid =
$sql = serendipity_db_query($query);
if (is_string($sql)) {
echo '<span class="block_level">' . $query . '</span>';
echo '<span class="block_level">' . $sql . '</span>';
echo $query . '<br />';
echo $sql . '<br />';
}
$image_id = serendipity_db_insert_id('images', 'id');
@ -580,8 +576,8 @@ function serendipity_insertImageInDatabase($filename, $directory, $authorid = 0,
$sql = serendipity_db_query($query);
if (is_string($sql)) {
echo '<span class="block_level">' . $query . '</span>';
echo '<span class="block_level">' . $sql . '</span>';
echo $query . '<br />';
echo $sql . '<br />';
}
$image_id = serendipity_db_insert_id('images', 'id');
@ -672,7 +668,7 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb
}
exec($cmd, $output, $result);
if ($result != 0) {
echo '<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
$r = false; // return failure
} else {
touch($outfile);
@ -716,7 +712,7 @@ function serendipity_scaleImg($id, $width, $height) {
$cmd = escapeshellcmd($serendipity['convert']) . ' -scale ' . serendipity_escapeshellarg($width . 'x' . $height) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile);
exec($cmd, $output, $result);
if ( $result != 0 ) {
echo '<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
}
unset($output, $result);
}
@ -763,7 +759,7 @@ function serendipity_rotateImg($id, $degrees) {
$cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile);
exec($cmd, $output, $result);
if ( $result != 0 ) {
echo '<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
}
unset($output, $result);
@ -771,7 +767,7 @@ function serendipity_rotateImg($id, $degrees) {
$cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infileThumb) . ' ' . serendipity_escapeshellarg($outfileThumb);
exec($cmd, $output, $result);
if ( $result != 0 ) {
echo '<div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />'. sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
echo '<div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />'. sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) .'</div>';
}
unset($output, $result);
@ -831,7 +827,7 @@ function serendipity_generateThumbs() {
}
echo '<li>' . $sThumb . ': ' . $returnsize[0] . 'x' . $returnsize[1] . "</li>\n";
if (!file_exists($newThumb)) {
printf('<li><div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . THUMBNAIL_FAILED_COPY . '</div></li>' . "\n", $sThumb);
printf('<li><div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . THUMBNAIL_FAILED_COPY . '</div></li>' . "\n", $sThumb);
} else {
$update = true;
}
@ -847,7 +843,7 @@ function serendipity_generateThumbs() {
printf('<li>' . THUMBNAIL_USING_OWN . '</li>' . "\n", $sThumb);
$update = true;
} else {
printf('<li><div class="serendipityAdminMsgError msg_error"><img class="img_error" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . THUMBNAIL_FAILED_COPY . '</div></li>' . "\n", $sThumb);
printf('<li><div class="serendipityAdminMsgError"><img style="width: 22px; height: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_error.png') . '" alt="" />' . THUMBNAIL_FAILED_COPY . '</div></li>' . "\n", $sThumb);
}
}
@ -1493,10 +1489,10 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
);
foreach ($aResultSet AS $sKey => $sFile) {
if ($sFile['directory']) {
if ($debug) echo "<span class='block_level'>{$sFile['relpath']} is a directory.</span>";
if ($debug) echo "{$sFile['relpath']} is a directory.<br />";
array_push($paths, $sFile);
} else {
if ($debug) echo "<span class='block_level'>{$sFile['relpath']} is a file.</span>";
if ($debug) echo "{$sFile['relpath']} is a file.<br />";
// Store the file in our array, remove any ending slashes
$aFilesOnDisk[$sFile['relpath']] = 1;
}
@ -1530,13 +1526,13 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
}
$sFileName = $sFile['path'] . $sFile['name'] . (empty($sFile['extension']) ? '' : '.' . $sFile['extension']);
if ($debug) echo "<p>File name is $sFileName, thumbnail is $sThumbNailFile</p>";
if ($debug) echo "<p>File name is $sFileName,<br />thumbnail is $sThumbNailFile</p>";
unset($aResultSet[$sKey]);
if (isset($aFilesOnDisk[$sFileName])) {
unset($aFilesOnDisk[$sFileName]);
} else {
if ($debug) echo "<span class='block_level'>Deleting Image {$sFile['id']}</span>";
if ($debug) echo "Deleting Image {$sFile['id']}<br />\n";
serendipity_deleteImage($sFile['id']);
++$nCount;
}
@ -1808,11 +1804,11 @@ function serendipity_traversePath($basedir, $dir='', $onlyDirs = true, $pattern
while (($file = @readdir($dh)) !== false) {
if ($file != '.' && $file != '..') {
$bPatternMatch = (is_null($pattern) || preg_match($pattern, $file));
$sFullPath = $odir . $file;
$bIsDir = is_dir($sFullPath);
$sFullPath = $odir . $file;
$bIsDir = is_dir($sFullPath);
if ($onlyDirs === false || $bIsDir) {
if ($bPatternMatch &&
(!$bIsDir || $aExcludeDirs == null || !isset($aExcludeDirs[$file]))) {
if ($bPatternMatch &&
(!$bIsDir || $aExcludeDirs == null || !isset($aExcludeDirs[$file]))) {
$files[] = array(
'name' => $file,
'depth' => $depth,
@ -1823,10 +1819,10 @@ function serendipity_traversePath($basedir, $dir='', $onlyDirs = true, $pattern
}
if ($bIsDir &&
($max_depth === null || $depth < $max_depth) &&
($aExcludeDirs == null || !isset($aExcludeDirs[$file]))) {
($max_depth === null || $depth < $max_depth) &&
($aExcludeDirs == null || !isset($aExcludeDirs[$file]))) {
$next_dir = serendipity_dirSlash('end', $dir) . basename($file);
$files = array_merge($files, serendipity_traversePath($basedir, $next_dir, $onlyDirs, $pattern, ($depth+1), $max_depth, $apply_ACL, $aExcludeDirs));
$files = array_merge($files, serendipity_traversePath($basedir, $next_dir, $onlyDirs, $pattern, ($depth+1), $max_depth, $apply_ACL, $aExcludeDirs));
}
}
}
@ -2065,7 +2061,7 @@ function serendipity_directoryACL(&$paths, $type = 'read') {
static $debug = false;
if ($debug) {
echo "<span class='block_level'>Applying ACL for mode '$type'.</span>";
echo "Applying ACL for mode '$type'.<br />\n";
}
if (!is_array($paths)) {
@ -2130,19 +2126,19 @@ function serendipity_directoryACL(&$paths, $type = 'read') {
if ($granted === false) {
// We are not allowed to access this element
if ($debug) {
echo "<span class='msg_error'>ACL for " . $info['relpath'] . " DENIED.</span>";
echo "ACL for " . $info['relpath'] . " DENIED.<br />\n";
}
unset($paths[$idx]);
} else {
if ($debug) {
echo "<span class='msg_success'>ACL for " . $info['relpath'] . " granted.</span>";
echo "ACL for " . $info['relpath'] . " granted.<br />\n";
}
}
}
if (count($paths) < $startCount) {
if ($debug) {
echo "<span class='msg_error'>ACL denied all.</span>";
echo "ACL denied all.<br />\n";
}
return false;
}
@ -2704,22 +2700,22 @@ function serendipity_prepareMedia(&$file, $url = '') {
$full_perm = serendipity_checkPermission('adminImagesMaintainOthers');
}
$sThumbSource = serendipity_getThumbNailPath($file['path'], $file['name'], $file['extension'], $file['thumbnail_name']);
$file['full_thumb'] = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $sThumbSource;
$file['full_thumbHTTP'] = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $sThumbSource;
$sThumbSource = serendipity_getThumbNailPath($file['path'], $file['name'], $file['extension'], $file['thumbnail_name']);
$file['full_thumb'] = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $sThumbSource;
$file['full_thumbHTTP'] = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $sThumbSource;
if ($file['hotlink']) {
$file['full_file'] = $file['path'];
$file['show_thumb'] = $file['path'];
if (!isset($file['imgsrc'])) {
$file['imgsrc'] = $file['show_thumb'];
}
$file['show_thumb'] = $file['path'];
if (!isset($file['imgsrc'])) {
$file['imgsrc'] = $file['show_thumb'];
}
} else {
$file['full_file'] = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']);
$file['show_thumb'] = $file['full_thumbHTTP'];
if (!isset($file['imgsrc'])) {
$file['imgsrc'] = $serendipity['uploadHTTPPath'] . $file['path'] . $file['name'] . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']);
}
$file['show_thumb'] = $file['full_thumbHTTP'];
if (!isset($file['imgsrc'])) {
$file['imgsrc'] = $serendipity['uploadHTTPPath'] . $file['path'] . $file['name'] . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']);
}
}
// Detect PDF thumbs
@ -2737,8 +2733,8 @@ function serendipity_prepareMedia(&$file, $url = '') {
$file['links'] = array('imagelinkurl' => $file['full_file']);
$file['dim'] = @getimagesize($file['full_thumb'], $file['thumb_header']);
$file['dim_orig'] = @getimagesize($serendipity['serendipityPath'] . $file['full_file'], $file['header']);
$file['dim'] = @getimagesize($file['full_thumb'], $file['thumb_header']);
$file['dim_orig'] = @getimagesize($serendipity['serendipityPath'] . $file['full_file'], $file['header']);
$file['is_image'] = serendipity_isImage($file);
if ($file['is_image']) {
@ -2789,10 +2785,10 @@ function serendipity_prepareMedia(&$file, $url = '') {
if (!$mimeicon) {
$mimeicon = serendipity_getTemplateFile('admin/img/mime_unknown.png');
}
$file['preview'] .= '<img src="'. $mimeicon .'" title="' . $file['path'] . $file['name'] . ' (' . $file['mime'] . ')" alt="'. $file['mime'] .'" /><span class="block_level" style="font-weight: bold; font-size: 8pt">- ' . (($file['hotlink']) ? MEDIA_HOTLINKED : $file['mime']) .' -</span>';
$file['preview'] .= '<img src="'. $mimeicon .'" title="' . $file['path'] . $file['name'] . ' (' . $file['mime'] . ')" alt="'. $file['mime'] .'" /><br /><span style="font-weight: bold; font-size: 8pt">- ' . (($file['hotlink']) ? MEDIA_HOTLINKED : $file['mime']) .' -</span>';
if ($url) {
$file['preview_url'] = $url .'&amp;serendipity[image]='. $file['id'];
$file['preview'] .= '<a class="block_level" href="' . $file['preview_url'] . '">' . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']) . '</a>';
$file['preview'] .= '<br /><a href="' . $file['preview_url'] . '">' . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']) . '</a>';
}
}
@ -2829,10 +2825,7 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin
}
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
serendipity_smarty_init();
$media = array(
'manage' => $manage,
'lineBreak' => $lineBreak,
@ -3295,29 +3288,21 @@ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_i
if ($type == 'dir') {
if (!is_dir($real_oldDir)) {
echo '<span class="msg_error">';
printf(ERROR_FILE_NOT_EXISTS, '<span class="block_level">' . $oldDir . '</span>');
echo '</span>';
printf(ERROR_FILE_NOT_EXISTS . '<br />', $oldDir);
return false;
}
if (is_dir($real_newDir)) {
echo '<span class="msg_error">';
printf(ERROR_FILE_EXISTS, '<span class="block_level">' . $newDir . '</span>');
echo '</span>';
printf(ERROR_FILE_EXISTS . '<br />', $newDir);
return false;
}
if (!rename($real_oldDir, $real_newDir)) {
echo '<span class="msg_error">';
printf(MEDIA_DIRECTORY_MOVE_ERROR, '<span class="block_level">' . $newDir . '</span>');
echo '</span>';
printf(MEDIA_DIRECTORY_MOVE_ERROR . '<br />', $newDir);
return false;
}
echo '<span class="msg_success">';
printf(MEDIA_DIRECTORY_MOVED, '<span class="block_level">' . $newDir . '</span>');
echo '</span>';
printf(MEDIA_DIRECTORY_MOVED . '<br />', $newDir);
$dirs = serendipity_db_query("SELECT id, path
FROM {$serendipity['dbPrefix']}images
@ -3397,11 +3382,11 @@ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_i
// Forward user to overview (we don't want the user's back button to rename things again)
} else {
if (!file_exists($oldfile)) {
echo '<span class="msg_error">' . ERROR_FILE_NOT_EXISTS . '</span>';
echo ERROR_FILE_NOT_EXISTS;
} elseif (file_exists($newfile)) {
echo '<span class="msg_error">' . ERROR_FILE_EXISTS . '</span>';
echo ERROR_FILE_EXISTS;
} else {
echo '<span class="msg_error">' . ERROR_SOMETHING . '</span>';
echo ERROR_SOMETHING;
}
return false;
@ -3462,7 +3447,7 @@ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_i
// Only MySQL supported, since I don't know how to use REGEXPs differently.
if ($serendipity['dbType'] != 'mysql' && $serendipity['dbType'] != 'mysqli') {
echo '<span class="block_level">' . MEDIA_DIRECTORY_MOVE_ENTRY . '</span>';
echo MEDIA_DIRECTORY_MOVE_ENTRY . '<br />';
return true;
}
@ -3500,27 +3485,27 @@ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_i
function &serendipity_getMediaPaths() {
global $serendipity;
$aExclude = array("CVS" => true, ".svn" => true);
serendipity_plugin_api::hook_event('backend_media_path_exclude_directories', $aExclude);
$paths = array();
$aExclude = array("CVS" => true, ".svn" => true);
serendipity_plugin_api::hook_event('backend_media_path_exclude_directories', $aExclude);
$paths = array();
$aResultSet = serendipity_traversePath(
$serendipity['serendipityPath'] . $serendipity['uploadPath'],
'',
false,
NULL,
1,
NULL,
FALSE,
$aExclude
);
$aResultSet = serendipity_traversePath(
$serendipity['serendipityPath'] . $serendipity['uploadPath'],
'',
false,
NULL,
1,
NULL,
FALSE,
$aExclude
);
foreach ($aResultSet AS $sKey => $sFile) {
if ($sFile['directory']) {
array_push($paths, $sFile);
}
unset($aResultSet[$sKey]);
}
foreach ($aResultSet AS $sKey => $sFile) {
if ($sFile['directory']) {
array_push($paths, $sFile);
}
unset($aResultSet[$sKey]);
}
serendipity_directoryACL($paths, 'read');
usort($paths, 'serendipity_sortPath');

View File

@ -201,7 +201,6 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
$test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
}
$test_path2 = serendipity_getRealDir(__FILE__);
if (!empty($_SERVER['ORIG_PATH_TRANSLATED']) && file_exists(dirname($_SERVER['ORIG_PATH_TRANSLATED']) . '/serendipity_admin.php')) {
return realpath(rtrim(dirname($_SERVER['ORIG_PATH_TRANSLATED']), '/')) . '/';
}
@ -289,7 +288,7 @@ function serendipity_parseTemplate($filename, $areas = null, $onlyFlags=null) {
$config = @include($filename);
if (! is_array($config)) {
printf(INCLUDE_ERROR,$filename);
printf(INCLUDE_ERROR,$filename);
}
foreach ( $config as $n => $category ) {
@ -470,8 +469,10 @@ function showConfig(id) {
if (document.getElementById) {
el = document.getElementById(id);
if (el.style.display == 'none') {
el.style.display = 'block';
document.getElementById('option' + id).src = '<?php echo serendipity_getTemplateFile('img/minus.png') ?>';
el.style.display = '';
} else {
document.getElementById('option' + id).src = '<?php echo serendipity_getTemplateFile('img/plus.png') ?>';
el.style.display = 'none';
}
}
@ -482,11 +483,15 @@ function showConfigAll(count) {
if (document.getElementById) {
for (i = 1; i <= count; i++) {
document.getElementById('el' + i).style.display = state;
document.getElementById('optionel' + i).src = (state == '' ? '<?php echo serendipity_getTemplateFile('img/minus.png') ?>' : '<?php echo serendipity_getTemplateFile('img/plus.png') ?>');
}
if (state == 'block') {
if (state == '') {
document.getElementById('optionall').src = '<?php echo serendipity_getTemplateFile('img/minus.png') ?>';
state = 'none';
} else {
state = 'block';
document.getElementById('optionall').src = '<?php echo serendipity_getTemplateFile('img/plus.png') ?>';
state = '';
}
}
}
@ -516,26 +521,45 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
if (!$noForm) {
?>
<form action="?" method="POST">
<input type="hidden" name="serendipity[adminModule]" value="installer">
<input type="hidden" name="installAction" value="check">
<?php echo serendipity_setFormToken(); ?>
<div>
<input type="hidden" name="serendipity[adminModule]" value="installer" />
<input type="hidden" name="installAction" value="check" />
<?php echo serendipity_setFormToken(); ?>
<br />
<?php }
if (sizeof($config) > 1 && $allowToggle) { ?>
<a href="#" onClick="showConfigAll(<?php echo sizeof($config); ?>)"><?php echo TOGGLE_ALL; ?></a>
<div align="right">
<a style="border:0; text-decoration: none" href="#" onClick="showConfigAll(<?php echo sizeof($config); ?>)" title="<?php echo TOGGLE_ALL; ?>"><img src="<?php echo serendipity_getTemplateFile('img/'. ($folded === true ? 'plus' : 'minus') .'.png') ?>" id="optionall" alt="+/-" border="0" />&nbsp;<?php echo TOGGLE_ALL; ?></a></a><br />
</div>
<?php
}
$el_count = 0;
foreach ($config as $category) {
$el_count++;
?>
<div class="configuration_group">
<table width="100%" cellspacing="2">
<?php
if (sizeof($config) > 1) {
?>
<h3><?php if ($allowToggle) { ?><a href="#" onClick="showConfig('el<?php echo $el_count; ?>'); return false"><?php echo $category['title']; ?></a><?php } else { ?><?php echo $category['title']; ?><?php } ?></h3>
<tr>
<th align="left" colspan="2" style="padding-left: 15px;">
<?php if ($allowToggle) { ?>
<a style="border:0; text-decoration: none;" href="#" onClick="showConfig('el<?php echo $el_count; ?>'); return false" title="<?php echo TOGGLE_OPTION; ?>"><img src="<?php echo serendipity_getTemplateFile('img/'. ($folded === true ? 'plus' : 'minus') .'.png') ?>" id="optionel<?php echo $el_count; ?>" alt="+/-" border="0" />&nbsp;<?php echo $category['title']; ?></a>
<?php } else { ?>
<?php echo $category['title']; ?>
<?php } ?>
</th>
</tr>
<?php } ?>
<fieldset id="el<?php echo $el_count; ?>">
<legend><?php echo $category['description'] ?></legend>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="3" id="el<?php echo $el_count; ?>">
<tr>
<td style="padding-left: 20px;" colspan="2">
<?php echo $category['description'] ?>
</td>
</tr>
<?php
foreach ($category['items'] as $item) {
@ -575,15 +599,23 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
$value = serendipity_query_default($item['var'], $item['default']);
}
?>
<div class="form_<?php echo $item['type']; ?>">
<label for="<?php echo $item['var']; ?>"><?php echo $item['title']; ?> <span><?php echo $item['description']; ?></span></label>
<?php echo serendipity_guessInput($item['type'], $item['var'], $value, $item['default']); ?>
</div>
<tr>
<td style="border-bottom: 1px #000000 solid" align="left" valign="top" width="75%">
<strong><?php echo $item['title']; ?></strong>
<br />
<span style="color: #5E7A94; font-size: 8pt;"><?php echo $item['description']; ?></span>
</td>
<td style="border-bottom: 1px #000000 solid; font-size: 8pt" align="left" valign="middle" width="25%">
<span style="white-space: nowrap"><?php echo serendipity_guessInput($item['type'], $item['var'], $value, $item['default']); ?></span>
</td>
</tr>
<?php
}
?>
</fieldset>
</div>
</table><br /><br />
</td>
</tr>
</table>
<?php
}
@ -597,7 +629,8 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
if (!$noForm) {
?>
<input type="submit" value="<?php echo CHECK_N_SAVE; ?>">
<input type="submit" value="<?php echo CHECK_N_SAVE; ?>" class="serendipityPrettyButton input_button" />
</div>
</form>
<?php
}
@ -1027,7 +1060,7 @@ function serendipity_httpCoreDir() {
if (!empty($_SERVER['ORIG_PATH_TRANSLATED'])) {
return dirname(realpath($_SERVER['ORIG_PATH_TRANSLATED'])) . '/';
}
return $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/';
}

View File

@ -1,4 +1,4 @@
<?php # $Id:$
<?php # $Id: functions_entries.inc.php 435 2005-08-25 12:36:39Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
@ -91,18 +91,35 @@ function show_plugins($event_only = false, $sidebars = null)
}
$eyecandy = !isset($serendipity['eyecandy']) || serendipity_db_bool($serendipity['eyecandy']);
$data['event_only'] = $event_only;
$data['eyecandy'] = $eyecandy;
if (!$eyecandy) {
$data['eyecandy'] = false;
echo ' <form action="?serendipity[adminModule]=plugins" method="post">';
} elseif (!$event_only) {
$data['event_only'] = false;
$data['is_first'] = $is_first = true;
echo '<script type="text/javascript"> function templatePluginMoverInit() { ';
$is_first = true;
foreach($sidebars AS $sidebar) {
?>
<?php echo ($is_first ? 'var ' : ''); ?> list = document.getElementById("<?php echo $sidebar; ?>_col");
DragDrop.makeListContainer(list, 'g1');
list.onDragOver = function() { this.style["border"] = "1px solid #4d759b"; };
list.onDragOut = function() { this.style["border"] = "none"; };
<?php
$is_first = false;
}
echo ' } addLoadEvent(templatePluginMoverInit);</script>';
echo ' <form action="?serendipity[adminModule]=plugins" method="post" onsubmit="pluginMovergetSort(); return true">';
echo ' <input type="hidden" name="serendipity[pluginorder]" id="order" value="" />';
} else {
echo '<script type="text/javascript">addLoadEvent(pluginMoverInitEvent);</script>';
echo ' <form action="?serendipity[adminModule]=plugins" method="post" onsubmit="pluginMovergetSortEvent(); return true">';
echo ' <input type="hidden" name="serendipity[pluginorder]" id="eventorder" value="" />';
}
$data['serendipity_setFormToken'] = serendipity_setFormToken();
// what is this for???
echo serendipity_setFormToken();
?>
<table class="pluginmanager" border="0" cellpadding="5" cellspacing="3" width="100%">
<tr>
<?php
$errors = array();
/* Block display the plugins per placement location. */
@ -111,8 +128,6 @@ function show_plugins($event_only = false, $sidebars = null)
} else {
$plugin_placements = $sidebars;
}
$data['plugin_placements'] = $plugin_placements;
$ownership = array();
$total = 0;
foreach ($plugin_placements as $plugin_placement) {
@ -121,9 +136,12 @@ function show_plugins($event_only = false, $sidebars = null)
} else {
$is_invisible = false;
}
$data['placement'][$plugin_placement]['ptitle'] = $ptitle = $opts[$plugin_placement];
$data['placement'][$plugin_placement]['pid'] = $pid = $plugin_placement;
$ptitle = $opts[$plugin_placement];
$pid = $plugin_placement;
echo '<td class="pluginmanager_side pluginmanager_' . ($event_only ? 'event' : 'sidebar') . '">';
echo '<div class="heading">' . $ptitle . '</div>';
echo '<ol id="' . $pid . '_col" class="pluginmanager_container">';
if ($is_invisible) {
$plugins = $invisible_plugins;
} else {
@ -155,7 +173,7 @@ function show_plugins($event_only = false, $sidebars = null)
$name = htmlspecialchars($bag->get('name'));
$desc = htmlspecialchars($bag->get('description'));
$desc .= '<span class="block_level">' . VERSION . ': <em>' . $bag->get('version') . '</em></span>';
$desc .= '<br />' . VERSION . ': <em>' . $bag->get('version') . '</em>';
$title = serendipity_plugin_api::get_plugin_title($plugin, '[' . $name . ']');
@ -186,36 +204,52 @@ function show_plugins($event_only = false, $sidebars = null)
} else {
$movedown = ($moveup != '' ? '&nbsp;' : '') . '<a href="?' . serendipity_setFormToken('url') . '&amp;serendipity[adminModule]=plugins&amp;submit=move+down&amp;serendipity[plugin_to_move]=' . $key . $event_only_uri . '" style="border: 0"><img src="' . serendipity_getTemplateFile('admin/img/downarrow.png') . '" height="16" width="16" alt="'. DOWN .'" border="0" /></a>';
}
?>
<li class="pluginmanager_item_<?php echo ($sort_idx % 2 ? 'even' : 'uneven'); ?>" id="<?php echo $css_key; ?>">
<div id="g<?php echo $css_key; ?>" class="pluginmanager_grablet">
<a href="#" id="grab<?php echo $css_key; ?>"></a>
</div>
<?php if ($is_plugin_editable) { ?>
<input class="input_checkbox" type="checkbox" name="serendipity[plugin_to_remove][]" value="<?php echo $plugin_data['name']; ?>" />
<?php } ?>
ob_start();
ownership($plugin_data['authorid'], $plugin_data['name'], $is_plugin_owner);
$ownership = ob_get_contents();
ob_end_clean();
<?php if ( $can_configure ) { ?>
<a class="pluginmanager_configure" href="?serendipity[adminModule]=plugins&amp;serendipity[plugin_to_conf]=<?php echo $key ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/configure.png') ?>" style="border: 0; vertical-align: bottom;" alt="[C]" /></a>
<?php } ?>
$data['placement'][$plugin_placement]['plugin_data'][$total]['sort_idx'] = $sort_idx;
$data['placement'][$plugin_placement]['plugin_data'][$total]['css_key'] = $css_key;
$data['placement'][$plugin_placement]['plugin_data'][$total]['is_plugin_editable'] = $is_plugin_editable;
$data['placement'][$plugin_placement]['plugin_data'][$total]['name'] = $plugin_data['name'];
$data['placement'][$plugin_placement]['plugin_data'][$total]['can_configure'] = $can_configure;
$data['placement'][$plugin_placement]['plugin_data'][$total]['key'] = $key;
$data['placement'][$plugin_placement]['plugin_data'][$total]['title'] = $title;
$data['placement'][$plugin_placement]['plugin_data'][$total]['desc'] = $desc;
$data['placement'][$plugin_placement]['plugin_data'][$total]['ownership'] = $ownership;
$data['placement'][$plugin_placement]['plugin_data'][$total]['place'] = $place;
$data['placement'][$plugin_placement]['plugin_data'][$total]['moveup'] = $moveup;
$data['placement'][$plugin_placement]['plugin_data'][$total]['movedown'] = $movedown;
<span class="pluginmanager_title">
<?php if ( $can_configure ) { ?>
<a title="<?php echo $plugin_data['name']; ?>" href="?serendipity[adminModule]=plugins&amp;serendipity[plugin_to_conf]=<?php echo $key ?>"><?php echo $title; ?></a>
<?php } else { ?>
<?php echo $title; ?>
<?php } ?></span><br />
<div class="pluginmanager_description" style="font-size: 8pt"><?php echo $desc; ?></div>
<div class="pluginmanager_ownership"><?php ownership($plugin_data['authorid'], $plugin_data['name'], $is_plugin_owner); ?></div>
<?php echo ($eyecandy ? '<noscript>' : ''); ?>
<div class="pluginmanager_place"><?php echo $place; ?></div>
<div class="pluginmanager_move"><?php echo $moveup ?> <?php echo $movedown ?></div>
<?php echo ($eyecandy ? '</noscript>' : ''); ?>
</li>
<?php
$sort_idx++;
}
echo '</ol></td>';
}
$data['total'] = $total;
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/admin/$tpldir/show_plugins.fnc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
?>
</tr>
<tr>
<td colspan="3" align="right"><?php printf(PLUGIN_AVAILABLE_COUNT, $total); ?></td>
</tr>
</table>
<br />
<div>
<input type="submit" name="REMOVE" title="<?php echo DELETE; ?>" value="<?php echo REMOVE_TICKED_PLUGINS; ?>" class="serendipityPrettyButton input_button" />
<input type="submit" name="SAVE" title="<?php echo SAVE_CHANGES_TO_LAYOUT; ?>" value="<?php echo SAVE; ?>" class="serendipityPrettyButton input_button" />
</div>
</form>
<?php
}
/**
@ -237,17 +271,31 @@ function ownership($authorid, $name, $is_plugin_owner = false) {
if (empty($users)) {
$users = serendipity_fetchUsers('', 'hidden');
}
$data['authorid'] = $authorid;
$data['users'] = $users;
$data['is_plugin_owner'] = $is_plugin_owner;
$data['name'] = $name;
$data['show_ownership'] = true;
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/admin/$tpldir/show_ownership.fnc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
if ($is_plugin_owner) {
?>
<select name="serendipity[ownership][<?php echo $name; ?>]">
<option value="0"><?php echo ALL_AUTHORS; ?></option>
<?php
}
foreach($users AS $user) {
if (!$is_plugin_owner && $user['authorid'] == $authorid) {
$realname = htmlspecialchars($user['realname']);
} elseif ($is_plugin_owner) {
?>
<option value="<?php echo $user['authorid']; ?>"<?php echo ($user['authorid'] == $authorid ? ' selected="selected"' : ''); ?>><?php echo htmlspecialchars($user['realname']); ?></option>
<?php
}
}
if ($is_plugin_owner) {
?>
</select>
<?php
} else {
echo (empty($realname) ? ALL_AUTHORS : $realname);
}
}
/**
@ -317,42 +365,38 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
return false;
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/admin/$tpldir/out_stack_loop.tpl";
$data = array();
if ($showSubmit && $postKey != 'plugin') {
$data['showSubmit_head'] = true;
}
?>
<div style="margin: 0px auto 0px 0px; text-align: right">
<input type="submit" name="SAVECONF" value="<?php echo SAVE; ?>" class="serendipityPrettyButton input_button" />
</div>
<?php }
if ($showTable) {
$data['showTable'] = true;
if ($showTable) {
?>
<table id="serendipity_plugin_config" border="0" cellspacing="0" cellpadding="3" width="100%">
<?php
}
$elcount = 0;
$htmlnugget = array();
$out_stack = array();
$data['config_names'] = $config_names;
foreach ($config_names as $config_item) {
$elcount++;
$cbag = new serendipity_property_bag;
$plugin->introspect_config_item($config_item, $cbag);
$data['cname'] = $cname = htmlspecialchars($cbag->get('name'));
$data['cdesc'] = $cdesc = htmlspecialchars($cbag->get('description'));
$cname = htmlspecialchars($cbag->get('name'));
$cdesc = htmlspecialchars($cbag->get('description'));
$value = $plugin->get_config($config_item, 'unset');
$lang_direction = htmlspecialchars($cbag->get('lang_direction'));
if (empty($lang_direction)) {
$lang_direction = LANG_DIRECTION;
}
$data['lang_direction'] = $lang_direction;
/* Apparently no value was set for this config item */
if ($value === 'unset') {
@ -382,30 +426,23 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$text_rows = null;
$input_type = null;
$data['is_multi_select'] = $is_multi_select = false;
$data['ctype'] = $ctype = $cbag->get('type');
$data['elcount'] = $elcount;
$data['hvalue'] = $hvalue;
$data['postKey'] = $postKey;
$data['config_item'] = $config_item;
$is_multi_select = false;
$ctype = $cbag->get('type');
ob_start();
switch ($ctype) {
case 'seperator':
$data['ctype'] = 'seperator';
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
case 'seperator':
?>
<tr>
<td colspan="2"><hr noshade="noshade" size="1" /></td>
</tr>
<?php
break;
case 'multiselect':
$data['ctype'] = 'multiselect';
$data['is_multi_select'] = $is_multi_select = true;
case 'multiselect':
$is_multi_select = true;
case 'select':
$data['ctype'] = 'select';
case 'select':
if (is_array($hvalue)) {
$selected_options = $hvalue;
} elseif ($is_multi_select) {
@ -414,32 +451,51 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$selected_options = array($hvalue => $hvalue);
}
$data['selected_options'] = $selected_options;
$data['pre_selected'] = $pre_selected = (array)$cbag->get('select_preselected');
$data['select_size'] = $select_size = $cbag->get('select_size');
$data['select'] = $select = $cbag->get('select_values');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
$pre_selected = (array)$cbag->get('select_preselected');
$select_size = $cbag->get('select_size');
$select = $cbag->get('select_values');
?>
<tr>
<td style="border-bottom: 1px solid #000000; vertical-align: top"><strong><?php echo $cname; ?></strong>
<?php
if ($cdesc != '') {
?>
<br><span style="color: #5E7A94; font-size: 8pt;">&nbsp;<?php echo $cdesc; ?></span>
<?php } ?>
</td>
<td style="border-bottom: 1px solid #000000; vertical-align: middle" width="250">
<div>
<select class="direction_<?php echo $lang_direction; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]<?php echo ($is_multi_select ? '[]' : ''); ?>" <?php echo ($is_multi_select ? 'multiple="multiple"' : ''); ?> <?php echo ($is_multi_select && $select_size > 0 ? 'size="' . $select_size . '"' : ''); ?>>
<?php
foreach($select AS $select_value => $select_desc) {
$id = htmlspecialchars($config_item . $select_value);
?>
<option value="<?php echo $select_value; ?>" <?php echo ( (in_array($select_value, $selected_options) || in_array($select_value, $pre_selected) ) ? 'selected="selected"' : ''); ?> title="<?php echo htmlspecialchars($select_desc); ?>">
<?php echo htmlspecialchars($select_desc); ?>
</option>
<?php
}
?>
</select>
</div>
</td>
</tr>
<?php
break;
case 'tristate':
$data['ctype'] = 'tristate';
case 'tristate':
$per_row = 3;
$radio['value'][] = 'default';
$radio['desc'][] = USE_DEFAULT;
case 'boolean':
$data['ctype'] = 'boolean';
case 'boolean':
$radio['value'][] = 'true';
$radio['desc'][] = YES;
$radio['value'][] = 'false';
$radio['desc'][] = NO;
case 'radio':
$data['ctype'] = 'radio';
case 'radio':
if (!count($radio) > 0) {
$radio = $cbag->get('radio');
}
@ -450,8 +506,19 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$per_row = 2;
}
}
$data['per_row'] = $per_row;
$data['radio_button'] = array();
?>
<tr>
<td style="border-bottom: 1px solid #000000; vertical-align: top"><strong><?php echo $cname; ?></strong>
<?php
if ($cdesc != '') {
?>
<br /><span style="color: #5E7A94; font-size: 8pt;">&nbsp;<?php echo $cdesc; ?></span>
<?php
}
?>
</td>
<td style="border-bottom: 1px solid #000000; vertical-align: middle;" width="250">
<?php
$counter = 0;
foreach($radio['value'] AS $radio_index => $radio_value) {
$id = htmlspecialchars($config_item . $radio_value);
@ -465,41 +532,74 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
} elseif ($radio_value == $hvalue) {
$checked = " checked";
}
$data['radio_button'][$radio_index]['id'] = $id;
$data['radio_button'][$radio_index]['checked'] = $checked;
$data['radio_button'][$radio_index]['counter'] = $counter;
$data['radio_button'][$radio_index]['value'] = $radio_value;
$data['radio_button'][$radio_index]['index'] = htmlspecialchars($radio['desc'][$radio_index]);
if ($counter == 1) {
?>
<div>
<?php
}
?>
<input class="direction_<?php echo $lang_direction; ?> input_radio" type="radio" id="serendipity_plugin_<?php echo $id; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" value="<?php echo $radio_value; ?>" <?php echo $checked ?> title="<?php echo htmlspecialchars($radio['desc'][$radio_index]); ?>" />
<label for="serendipity_plugin_<?php echo $id; ?>"><?php echo htmlspecialchars($radio['desc'][$radio_index]); ?></label>
<?php
if ($counter == $per_row) {
$counter = 0;
?>
</div>
<?php
}
}
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
?>
</td>
</tr>
<?php
break;
case 'string':
$data['ctype'] = 'string';
case 'string':
if (empty($input_type)) {
$input_type = $cbag->get('input_type');
if (empty($input_type)) {
$input_type = "text";
}
}
$data['input_type'] = $input_type;
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
?>
<tr>
<td style="border-bottom: 1px solid #000000">
<strong><?php echo $cname; ?></strong>
<br><span style="color: #5E7A94; font-size: 8pt;">&nbsp;<?php echo $cdesc; ?></span>
</td>
<td style="border-bottom: 1px solid #000000" width="250">
<div>
<input class="direction_<?php echo $lang_direction; ?> input_textbox" type="<?php echo $input_type; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" value="<?php echo $hvalue; ?>" size="30" />
</div>
</td>
</tr>
<?php
break;
case 'html': $data['ctype'] = 'html';
case 'text': $data['ctype'] = 'text';
case 'html':
case 'text':
if (empty($text_rows)) {
$text_rows = $cbag->get('rows');
if (empty($text_rows)) {
$text_rows = 20;
}
}
$data['text_rows'] = $text_rows;
?>
<tr>
<td colspan="2"><strong><?php echo $cname; ?></strong>
&nbsp;<span style="color: #5E7A94; font-size: 8pt;">&nbsp;<?php echo $cdesc; ?></span>
</td>
</tr>
<tr>
<td colspan="2">
<div>
<textarea class="direction_<?php echo $lang_direction; ?>" style="width: 100%" id="nuggets<?php echo $elcount; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" rows="<?php echo $text_rows; ?>" cols="80"><?php echo $hvalue; ?></textarea>
</div>
</td>
</tr>
<?php
if ($cbag->get('type') == 'html') {
$htmlnugget[] = $elcount;
if (!function_exists('serendipity_emit_htmlarea_code')) {
@ -507,43 +607,48 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
}
serendipity_emit_htmlarea_code('nuggets', 'nuggets', true);
}
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
break;
case 'content':
$data['ctype'] = 'content';
$data['cbag_default'] = $cbag->get('default');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
break;
case 'custom':
$data['ctype'] = 'custom';
$data['cbag_custom'] = $cbag->get('custom');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
case 'content':
?><tr><td colspan="2"><?php echo $cbag->get('default'); ?></td></tr><?php
break;
case 'hidden':
$data['ctype'] = 'hidden';
$data['cbag_value'] = $cbag->get('value');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
case 'custom':
?><tr><td colspan="2">
<input type="hidden" id="config_<?php echo $postKey; ?>_<?php echo $config_item; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" value="<?php echo $hvalue; ?>" size="30" />
<?php echo $cbag->get('custom'); ?>
</td></tr><?php
break;
case 'media':
$data['ctype'] = 'media';
case 'hidden':
?><tr><td colspan="2"><input class="direction_<?php echo $lang_direction; ?>" type="hidden" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" value="<?php echo $cbag->get('value'); ?>" /></td></tr><?php
break;
case 'media':
// Output the JavaScript, if we haven't already
$data['mediajs_output'] = $mediajs_output = $serendipity['mediajs_output'];
if (!$mediajs_output)
{
$serendipity['mediajs_output'] = true;
}
$mediajs_output = $serendipity['mediajs_output'];
if (!$mediajs_output)
{
print <<<EOS
<script type="text/javascript" language="JavaScript" src="serendipity_editor.js"></script>
<script type="text/javascript">
function change_preview(id)
{
var text_box = document.getElementById('serendipity[template][' + id + ']');
var image_box = document.getElementById(id + '_preview');
var filename = text_box.value;
image_box.style.backgroundImage = 'url(' + filename + ')';
image_box.style.backgroundRepeat = 'no-repeat';
}
function choose_media(id)
{
window.open('serendipity_admin_image_selector.php?serendipity[htmltarget]=' + id + '&serendipity[filename_only]=true', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
}
</script>
EOS;
$serendipity['mediajs_output'] = true;
}
// Print the HTML to display the popup media selector
$preview_width = $cbag->get('preview_width');
if (!$preview_width || $preview_width == "") {
@ -553,16 +658,25 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
if (!$preview_height || $preview_height == "") {
$preview_height = '100px';
}
$data['preview_width'] = $preview_width;
$data['preview_height'] = $preview_height;
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
$media_link_text = MEDIA_LIBRARY;
print <<<EOS
<tr><td colspan="2">
<strong>$cname</strong>
<br /><span style="color: #5E7A94; font-size: 8pt;">$cdesc</span>
</td> </tr>
<tr>
<td style="border-bottom: 1px solid #000000">
<div id="{$config_item}_preview" style="background-image: url($value); width:$preview_width; height: $preview_height; background-repeat: no-repeat;">&nbsp;</div>
</td>
<td style="border-bottom: 1px solid #000000">
<input class="input_textbox" type="text" id="serendipity[$postKey][$config_item]" name="serendipity[$postKey][$config_item]" value="$value" onchange="change_preview('$config_item')"/>
<br /><a href="#" onclick="choose_media('serendipity[$postKey][$config_item]')">$media_link_text</a>
</td>
</tr>
EOS;
break;
case 'sequence':
$data['ctype'] = 'sequence';
case 'sequence':
// For the drag-n-drop to work, the list must be included in
// a container (probably an <ol>) that JavaScript can access
// (easiest by ID), with <li> children that have unique IDs,
@ -570,11 +684,12 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
// I can't get it to work unless there's a class of
// pluginmanager_container on the ol, either.
// The drag-n-drop returns the list of IDs in order.
$data['sequencejs_output'] = $sequencejs_output = $serendipity['sequencejs_output'];
$sequencejs_output = $serendipity['sequencejs_output'];
if (!$sequencejs_output) {
echo '<script src="' . serendipity_getTemplateFile('dragdrop.js') . '" type="text/javascript"></script>';
$serendipity['sequencejs_output'] = true;
}
// I want this generic sequence widget to hide the ID, but
// display a name or description with an optional picture.
// (This would allow users to identify choices by thumbnail.)
@ -585,10 +700,9 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
if (!$value) {
$value = $eventData['default'];
}
$data['value'] = $value;
$data['cname'] = $cname = $cbag->get('name');
$data['cdesc'] = $cdesc = $cbag->get('description');
$data['checkable'] = $checkable = $cbag->get('checkable');
$cname = $cbag->get('name');
$cdesc = $cbag->get('description');
$checkable = $cbag->get('checkable');
/** Unordered array of values */
$items = $cbag->get('values');
@ -596,8 +710,10 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
/** Array specifying order to use values in $items */
$order = null;
if ($value) {
$data['store_order'] = $store_order = $order = explode(',', $value);
$store_order = $order = explode(',', $value);
}
$uparrow_img = serendipity_getTemplateFile('admin/img/uparrow.png');
$downarrow_img = serendipity_getTemplateFile('admin/img/downarrow.png');
// $items is the list of things to sequence. It's not in
// order, and reordering PHP arrays is problematic. So
@ -646,9 +762,31 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
}
// Start the row, add one cell for the name and description
$data['items'] = $items;
$sort_idx = 0;
$data['last'] = $last = count($order) - 1;
print <<<EOS
<tr>
<td style="border-bottom: 1px solid #000000; vertical-align: top">
<strong>$cname</strong>
<br /><span style="color: #5E7A94; font-size: 8pt;">$cdesc</span>
</td>
EOS;
// Now add one cell for the list
print <<<EOS
<td style="border-bottom: 1px solid #000000; vertical-align: middle">
EOS;
// Print the list
print <<<EOS
<input type="hidden" name="serendipity[$postKey][$config_item]" id="${config_item}_value" value="$value" />
<noscript>
<!-- Replace standard submit button when using up/down submits -->
<input type="hidden" name="SAVECONF" value="Save" />
</noscript>
<ol id="$config_item" class="sequence_container pluginmanager_container">
EOS;
$sort_idx == 0;
$last = count($order) - 1;
foreach ($order as $id) {
// Create the variables required to print this item
if ($sort_idx > 0) {
@ -656,41 +794,114 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$temp = $swapping[(int)$sort_idx];
$swapping[(int)$sort_idx] = $swapping[(int)($sort_idx - 1)];
$swapping[(int)($sort_idx - 1)] = $temp;
$data['order_id'][$sort_idx]['oneup'] = $oneup = implode(',' , $swapping);
$oneup = implode(',' , $swapping);
}
if ($sort_idx < $last) {
$swapping = $order;
$temp = $swapping[(int)$sort_idx];
$swapping[(int)$sort_idx] = $swapping[(int)($sort_idx + 1)];
$swapping[(int)($sort_idx + 1)] = $temp;
$data['order_id'][$sort_idx]['onedown'] = $onedown = implode(',' , $swapping);
$onedown = implode(',' , $swapping);
}
$data['order_id'][$sort_idx]['id'] = $id;
$data['order_id'][$sort_idx]['sort_idx'] = $sort_idx;
// Print the HTML
//
// Set the item and its ID
print ' <li id="'.$id.'" class="sequence_item pluginmanager_item_even">' . "\n";
// Make a handle with ID 'g$id'
print ' <div id="g'.$id.'" class="pluginmanager_grablet sequence_grablet"><a href="#"></a></div>' . "\n";
if ($checkable) {
print ' <input type="checkbox" onclick="sort_' . $config_item . '_Sequence();" name="serendipity[' . $postKey . ']' . '[activate][' . $config_item . '][' . $id . ']" ' . (in_array($id, $store_order) ? ' checked="checked" ' : '') . ' value="true" id="activate_' . $id . '" />' . "\n";
}
// Add the item contents
print ' <span>'.$items[$id]['display'].'</span>' . "\n";
if (isset($items[$id]['img'])) {
print ' <img src="'.$items[$id]['img'].'" />' . "\n";
}
// Luddite submit buttons (please, think of the scriptless!)
print "<noscript><div>\n";
if ($sort_idx == 0) {
// Skip the move-up submit button
print "&nbsp;\n";
} else {
print <<<EOS
<button type="submit" name="serendipity[$postKey][override][$config_item]" value="$oneup">
<img src="$uparrow_img" alt="Move Up">
</button>
EOS;
}
if ($sort_idx == $last) {
// Skip the move-down submit button
print "&nbsp;\n";
} else {
print <<<EOS
<button type="submit" name="serendipity[$postKey][override][$config_item]" value="$onedown">
<img src="$downarrow_img" alt="Move Down">
</button>
EOS;
}
print "</div></noscript>\n";
// Close the item
print ' </li>'."\n";
// Next, please
$sort_idx++;
} // foreach end
}
if (!is_array($items) or empty($order)) {
// Print the empty message
$data['no_sequence'] = sprint(NONE);
print(NONE);
}
// Print the Javascript to drag-n-drop the list
// Finish the row
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
print <<<EOS
<script type="text/javascript">
function sort_${config_item}_Sequence() {
//var seq = DragDrop.serData('${config_item}_group', null);
var seq = DragDrop.serData(null, '${config_item}');
var start = seq.indexOf("(");
var end = seq.indexOf(")");
seq = seq.slice((start + 1), end);
checkable_seq = seq.split(",");
out_seq = '';
for (i in checkable_seq) {
if (document.getElementById('activate_' + checkable_seq[i]) && !document.getElementById('activate_' + checkable_seq[i]).checked) {
continue;
} else {
if (out_seq != '') {
out_seq += ',';
}
out_seq += checkable_seq[i];
}
}
var order = document.getElementById("${config_item}_value");
order.value = out_seq;
}
function init_${config_item}_Sequence()
{
var lst = document.getElementById("${config_item}");
DragDrop.makeListContainer(lst, '${config_item}_group');
lst.onDragOut = function() {
sort_${config_item}_Sequence();
};
}
addLoadEvent(init_${config_item}_Sequence);
</script>
EOS;
// Finish the row
print <<<EOS
</td>
EOS;
break;
default:
$data['ctype'] = 'default';
default:
// Unknown configuration key. Let the plugin handle it.
$addData = func_get_args();
$eventData = array(
@ -702,61 +913,104 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
'postKey' => $postKey
);
serendipity_plugin_api::hook_event('backend_pluginconfig_' . $ctype, $eventData, $addData);
break;
}
$out_stack[$config_item] = ob_get_contents();
ob_end_clean();
}
$data['config_groups'] = $config_groups;
$data['OUT_STACK'] = $out_stack;
if (is_array($config_groups)) {
$hid = 0;
$folded = true;
?>
<tr>
<td colspan="2">
<div align="right">
<a style="border:0; text-decoration: none" href="#" onClick="showConfigAll(<?php echo sizeof($config_groups); ?>)" title="<?php echo TOGGLE_ALL; ?>"><img src="<?php echo serendipity_getTemplateFile('img/'. ($folded === true ? 'plus' : 'minus') .'.png') ?>" id="optionall" alt="+/-" border="0" />&nbsp;<?php echo TOGGLE_ALL; ?></a></a><br />
</div>
</td>
</tr>
<?php
foreach($config_groups AS $config_header => $config_groupkeys) {
$hid++;
echo '<tr>';
echo '<td colspan="2">';
echo '<h2>';
echo '<a style="border:0; text-decoration: none;" href="#" onClick="showConfig(\'el' . $hid . '\'); return false" title="' . TOGGLE_OPTION . '"><img src="' . serendipity_getTemplateFile('img/'. ($folded === true ? 'plus' : 'minus') .'.png') . '" id="optionel' . $hid . '" alt="+/-" border="0" />&nbsp;';
echo $config_header;
echo '</a>';
echo '</h2>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2">';
echo '<table class="plugin_optiongroup" id="el' . $hid . '" border="0" cellspacing="0" cellpadding="3" width="100%">';
foreach($config_groupkeys AS $config_groupkey) {
echo $out_stack[$config_groupkey];
echo "\n";
unset($out_stack[$config_groupkey]);
}
echo '</table>';
echo '<script type="text/javascript" language="JavaScript">';
echo 'document.getElementById("el' . $hid . '").style.display = "none";' . "\n";
echo '</script>';
echo '</td>';
echo '</tr>';
}
echo '<tr><td colspan="2" style="height: 100px" id="configuration_footer">&nbsp;</td></tr>';
}
echo implode("\n", $out_stack);
if ($showTable) {
?>
</table>
<br />
<?php
}
serendipity_printConfigJS();
if ($showSubmit) {
?>
<div style="padding-left: 20px">
<input type="submit" name="SAVECONF" value="<?php echo SAVE; ?>" class="serendipityPrettyButton input_button" />
</div>
<?php
}
if ($showExample && method_exists($plugin, 'example') ) {
?>
<div>
<?php echo $plugin->example() ?>
</div>
<?php
}
if ($spawnNuggets && isset($serendipity['wysiwyg']) && $serendipity['wysiwyg'] && count($htmlnugget) > 0) {
$ev = array('nuggets' => $htmlnugget, 'skip_nuggets' => false);
serendipity_plugin_api::hook_event('backend_wysiwyg_nuggets', $ev);
if ($ev['skip_nuggets'] === false) {
?>
<script type="text/javascript">
function Spawnnugget() {
/* blar */
<?php foreach($htmlnugget AS $htmlnuggetid) { ?>
Spawnnuggets('<?php echo $htmlnuggetid; ?>');
<?php } ?>
}
</script>
<?php
}
}
$data['OUT_STACK_REST'] = $out_stack;
// is left here without any use for archiv issues only - we now use external js file outsourced to templates/default/admin/admin_scripts.js
// see passed vars in serendipity_plugin_config.fnc.tpl - can get erased, as not being used any more if keeping Smartification.
ob_start();
serendipity_printConfigJS();
$config_js = ob_get_contents();
$data['serendipity_printConfigJS'] = $config_js;
ob_end_clean();
// this is new - allowing easier access to script handling like toogle
$data['allow_admin_scripts'] = true;
if ($showSubmit) {
$data['showSubmit_foot'] = true;
}
if ($showExample && method_exists($plugin, 'example') ) {
$data['showExample'] = true;
ob_start();
echo $plugin->example();
$data['plugin_example'] = ob_get_contents();
ob_end_clean();
}
if ($spawnNuggets && isset($serendipity['wysiwyg']) && $serendipity['wysiwyg'] && count($htmlnugget) > 0) {
$data['spawnNuggets'] = true;
$ev = array('nuggets' => $htmlnugget, 'skip_nuggets' => false);
serendipity_plugin_api::hook_event('backend_wysiwyg_nuggets', $ev);
$data['ev'] = $ev;
}
$serendipity['smarty']->assign($data);
$tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl';
$tfile = dirname(__FILE__) . "/admin/$tpldir/serendipity_plugin_config.fnc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
return true;
}

View File

@ -70,7 +70,7 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f
$entry['body'] .= ' ' . $entry['extended'];
$ext = '';
} elseif ($entry['exflag']) {
$ext = '<a class="block_level" href="' . $entry['feed_entryLink'] . '#extended">' . sprintf(VIEW_EXTENDED_ENTRY, htmlspecialchars($entry['title'])) . '</a>';
$ext = '<br /><a href="' . $entry['feed_entryLink'] . '#extended">' . sprintf(VIEW_EXTENDED_ENTRY, htmlspecialchars($entry['title'])) . '</a>';
} else {
$ext = '';
}

View File

@ -872,13 +872,14 @@ function serendipity_smarty_init($vars = array()) {
// Set a session variable if Smarty fails:
$prev_smarty = $_SESSION['no_smarty'];
$_SESSION['no_smarty'] = true;
if (LANG_CHARSET != 'UTF-8') {
@define('SMARTY_RESOURCE_CHAR_SET', LANG_CHARSET);
}
// Default Smarty Engine will be used
@define('SMARTY_DIR', S9Y_PEAR_PATH . 'Smarty/libs/');
if (!class_exists('Smarty')) {
include SMARTY_DIR . 'Smarty.class.php';
}

View File

@ -673,7 +673,7 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$old_references = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}references WHERE (type = '' OR type IS NULL) AND entry_id = " . (int)$id, false, 'assoc');
if ($debug && is_string($old_references)) {
echo '<span class="block_level">' . $old_references . "</span>";
echo $old_references . "<br />\n";
}
if (is_array($old_references) && count($old_references) > 0) {
@ -684,15 +684,15 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$saved_urls[$old_reference['link']] = true;
}
}
if ($debug) echo "Got references in dry run: <pre>" . print_r($current_references, true) . "</pre>\n";
if ($debug) echo "Got references in dry run: <pre>" . print_r($current_references, true) . "</pre><br />\n";
} else {
// A dry-run was called previously and restorable references are found. Restore them now.
$del = serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE (type = '' OR type IS NULL) AND entry_id = " . (int)$id);
if ($debug && is_string($del)) {
echo '<span class="block_level">' . $del . "</span>";
echo $del . "<br />\n";
}
if ($debug) echo "<span class='block_level'>Deleted references.</span>";
if ($debug) echo "Deleted references.<br />\n";
if (is_array($old_references) && count($old_references) > 0) {
$current_references = array();
@ -702,12 +702,12 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$q = serendipity_db_insert('references', $old_reference, 'show');
$cr = serendipity_db_query($q);
if ($debug && is_string($cr)) {
echo '<span class="block_level">' . $cr . "</span>";
echo $cr . "<br />\n";
}
}
}
if ($debug) echo "Got references in final run: <pre>" . print_r($current_references, true) . "</pre>\n";
if ($debug) echo "Got references in final run: <pre>" . print_r($current_references, true) . "</pre><br />\n";
}
if (!preg_match_all('@<a[^>]+?href\s*=\s*["\']?([^\'" >]+?)[ \'"][^>]*>(.+?)</a>@i', $text, $matches)) {
@ -729,13 +729,13 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$checked_locations = array();
serendipity_plugin_api::hook_event('backend_trackbacks', $locations);
for ($i = 0, $j = count($locations); $i < $j; ++$i) {
if ($debug) echo "<span class='block_level'>Checking {$locations[$i]}...</span>";
if ($debug) echo "Checking {$locations[$i]}...<br />\n";
if ($locations[$i][0] == '/') {
$locations[$i] = 'http' . (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $locations[$i];
}
if (isset($checked_locations[$locations[$i]])) {
if ($debug) echo "<span class='block_level'>Already checked.</span>";
if ($debug) echo "Already checked.<br />\n";
continue;
}
@ -756,7 +756,7 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$row = serendipity_db_query($query, true, 'num');
if ($debug && is_string($row)) {
echo '<span class="block_level">' . $row . "</span>";
echo $row . "<br />\n";
}
$names[$i] = strip_tags($names[$i]);
@ -766,31 +766,31 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
}
if ($row[0] > 0 && isset($saved_references[$locations[$i] . $names[$i]])) {
if ($debug) echo "<span class='block_level'>Found references for $id, skipping rest</span>";
if ($debug) echo "Found references for $id, skipping rest<br />\n";
continue;
}
if (!isset($serendipity['noautodiscovery']) || !$serendipity['noautodiscovery']) {
if (!$dry_run) {
if (!isset($saved_urls[$locations[$i]])){
if ($debug) echo "<span class='block_level'>Enabling autodiscovery.</span>";
if ($debug) echo "Enabling autodiscovery.<br />\n";
serendipity_reference_autodiscover($locations[$i], $url, $author, $title, serendipity_trackback_excerpt($text));
}
elseif ($debug) echo "<span class='block_level'>This reference was already used before in $id and therefore will not be trackbacked again.</span>";
elseif ($debug) echo "This reference was already used before in $id and therefore will not be trackbacked again.<br/>\n";
} elseif ($debug) {
echo "<span class='block_level'>Dry run: Skipping autodiscovery</span>";
echo "Dry run: Skipping autodiscovery<br />\n";
}
$checked_locations[$locations[$i]] = true; // Store trackbacked link so that no further trackbacks will be sent to the same link
} elseif ($debug) {
echo "<span class='block_level'>Skipping full autodiscovery</span>";
echo "Skipping full autodiscovery<br />\n";
}
}
$del = serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id=" . (int)$id . " AND (type = '' OR type IS NULL)");
if ($debug && is_string($del)) {
echo '<span class="block_level">' . $del . "</span>";
echo $del . "<br />\n";
}
if ($debug) echo "<span class='block_level'>Deleted references again.</span>";
if ($debug) echo "Deleted references again.<br />\n";
if (!is_array($old_references)) {
$old_references = array();
@ -811,7 +811,7 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$query .= (int)$current_references[$locations[$i] . $names[$i]]['id'] . ", " . (int)$id . ", '" . $i_link . "', '" . $i_location . "')";
$ins = serendipity_db_query($query);
if ($debug && is_string($ins)) {
echo '<span class="block_level">' . $ins . "</span>";
echo $ins . "<br />\n";
}
$duplicate_check[$locations[$i] . $names[$i]] = true;
} else {
@ -819,7 +819,7 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$query .= (int)$id . ", '" . $i_link . "', '" . $i_location . "')";
$ins = serendipity_db_query($query);
if ($debug && is_string($ins)) {
echo '<span class="block_level">' . $ins . "</span>";
echo $ins . "<br />\n";
}
$old_references[] = array(
@ -832,13 +832,13 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
}
if ($debug) {
echo "Current lookup for {$locations[$i]}{$names[$i]} is <pre>" . print_r($current_references[$locations[$i] . $names[$i]], true) . "</pre>\n";
echo '<span class="block_level">' . $query . "</span>";
echo "Current lookup for {$locations[$i]}{$names[$i]} is <pre>" . print_r($current_references[$locations[$i] . $names[$i]], true) . "</pre><br />\n";
echo $query . "<br />\n";
}
}
if ($debug) {
echo "Old/Saved locations: <pre>" . print_r($old_references, true) . "</pre>\n";
echo "Old/Saved locations: <pre>" . print_r($old_references, true) . "</pre><br />\n";
}
// Add citations
@ -850,7 +850,7 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
$cite = serendipity_db_query($query);
if ($debug && is_string($cite)) {
echo '<span class="block_level">' . $cite . "</span>";
echo $cite . "<br />\n";
}
}
}

View File

@ -171,7 +171,7 @@ class serendipity_plugin_api
$plugin->install();
} else {
$serendipity['debug']['pluginload'][] = "Loading plugin failed painfully. File not found?";
echo '<span class="msg_error">' . ERROR . ': ' . $key . ' (' . $pluginPath . ')</span>';
echo ERROR . ': ' . $key . ' (' . $pluginPath . ')<br />';
}
return $key;

View File

@ -1716,12 +1716,12 @@ class serendipity_categories_plugin extends serendipity_plugin {
}
if (!$smarty && $is_form) {
$html .= '<div class="category_submit"><input type="submit" name="serendipity[isMultiCat]" value="' . GO . '" /></div>';
$html .= '<div class="category_submit"><br /><input type="submit" name="serendipity[isMultiCat]" value="' . GO . '" /></div>';
}
if (!$smarty) {
$html .= sprintf(
'<div class="category_link_all"><a href="%s" title="%s">%s</a></div>',
'<div class="category_link_all"><br /><a href="%s" title="%s">%s</a></div>',
$serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?frontpage',
ALL_CATEGORIES,

View File

@ -1,4 +1,4 @@
<?php // (experimental) serendipity_smarty_class.inc.php 2012-06-13 16:09 Ian
<?php // (experimental) serendipity_smarty_class.inc.php 2012-01-03 14:11 Ian
// define secure_dir and trusted_dirs for Serendipity_Smarty_Security_Policy class.
@define('S9Y_TEMPLATE_FALLBACK', $serendipity['serendipityPath'] . $serendipity['templatePath'] . 'default');
@ -148,7 +148,7 @@ class Serendipity_Smarty extends Smarty
$this->setConfigDir(array(S9Y_TEMPLATE_USERDEFAULT));
if ( ( !is_dir($this->getCompileDir()) || !is_writable($this->getCompileDir()) ) && IN_installer !== true) {
if (!is_dir($this->getCompileDir()) || !is_writable($this->getCompileDir())) {
if(ini_get('display_errors') == 0 || ini_get('display_errors') == 'off') printf(DIRECTORY_WRITE_ERROR, $this->getCompileDir());
trigger_error(sprintf(DIRECTORY_WRITE_ERROR, $this->getCompileDir()), E_USER_ERROR);
}
@ -311,8 +311,6 @@ class Serendipity_Smarty extends Smarty
// set smarty error reporting. General error_reporting is set in serendipity/serendipity_config.inc.php
$this->error_reporting = E_ALL & ~E_NOTICE ^ E_STRICT;
// we use our own error_handler and get in conflicts with smarty?
#$this->muteExpectedErrors();
}
/*

View File

@ -129,7 +129,7 @@ class serendipity_smarty_emulator {
} elseif (function_exists($funcname)) {
return call_user_func($funcname, $params, $this);
} else {
return "<span class='msg_error'>ERROR: " . htmlspecialchars($funcname) . " NOT FOUND.</span>";
return "ERROR: " . htmlspecialchars($funcname) . " NOT FOUND.<br />\n";
}
}

View File

@ -424,7 +424,6 @@
'default' => false,
'permission' => 'blogConfiguration'),
array('var' => 'searchsort',
'title' => QUICKSEARCH_SORT,
'description' => '',

View File

@ -1,32 +1,32 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
<p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Změněna výchozí verze CreativeCommons na 3.0, při aktualizaci bude zachováno nastavení ze starší verze pluginu.</li>
<li>BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.</li>
<li>Titulek při najetí na obrázek je nyní podporovaný i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>původní verze</li>
</ul>
</ul>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
<p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Změněna výchozí verze CreativeCommons na 3.0, při aktualizaci bude zachováno nastavení ze starší verze pluginu.</li>
<li>BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.</li>
<li>Titulek při najetí na obrázek je nyní podporovaný i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>původní verze</li>
</ul>
</ul>
</body>
</html>

View File

@ -1,32 +1,32 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
<p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Změněna výchozí verze CreativeCommons na 3.0, při aktualizaci bude zachováno nastavení ze starší verze pluginu.</li>
<li>BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.</li>
<li>Titulek při najetí na obrázek je nyní podporovaný i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>původní verze</li>
</ul>
</ul>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
<p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Změněna výchozí verze CreativeCommons na 3.0, při aktualizaci bude zachováno nastavení ze starší verze pluginu.</li>
<li>BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.</li>
<li>Titulek při najetí na obrázek je nyní podporovaný i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>původní verze</li>
</ul>
</ul>
</body>
</html>

View File

@ -1,32 +1,32 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu p<>elo<6C>il do <20>e<EFBFBD>tiny Vladim<69>r Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od t<> doby mohl b<>t plugin pozm<7A>n<EFBFBD>n nebo mohly b<>t roz<6F><7A><EFBFBD>en<65> jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktu<EFBFBD>ln<EFBFBD> anglick<63> ChangeLog</a>.
<p>
<h2>Historie verz<72> (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Zm<EFBFBD>n<EFBFBD>na v<>choz<6F> verze CreativeCommons na 3.0, p<>i aktualizaci bude zachov<6F>no nastaven<65> ze star<61><72> verze pluginu.</li>
<li>BY, jedniv<69> verze, ve kter<65> plat<61>, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japon<EFBFBD>t<EFBFBD> u<>ivatel<65> dost<73>vali <20>patn<74> odkaz na Licenci Creative Common.</li>
<li>Titulek p<>i najet<65> na obr<62>zek je nyn<79> podporovan<61> i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>p<EFBFBD>vodn<EFBFBD> verze</li>
</ul>
</ul>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu p<>elo<6C>il do <20>e<EFBFBD>tiny Vladim<69>r Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od t<> doby mohl b<>t plugin pozm<7A>n<EFBFBD>n nebo mohly b<>t roz<6F><7A><EFBFBD>en<65> jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktu<EFBFBD>ln<EFBFBD> anglick<63> ChangeLog</a>.
<p>
<h2>Historie verz<72> (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Zm<EFBFBD>n<EFBFBD>na v<>choz<6F> verze CreativeCommons na 3.0, p<>i aktualizaci bude zachov<6F>no nastaven<65> ze star<61><72> verze pluginu.</li>
<li>BY, jedniv<69> verze, ve kter<65> plat<61>, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japon<EFBFBD>t<EFBFBD> u<>ivatel<65> dost<73>vali <20>patn<74> odkaz na Licenci Creative Common.</li>
<li>Titulek p<>i najet<65> na obr<62>zek je nyn<79> podporovan<61> i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>p<EFBFBD>vodn<EFBFBD> verze</li>
</ul>
</ul>
</body>
</html>

View File

@ -1,32 +1,32 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu p<>elo<6C>il do <20>e<EFBFBD>tiny Vladim<69>r Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od t<> doby mohl b<>t plugin pozm<7A>n<EFBFBD>n nebo mohly b<>t roz<6F><7A><EFBFBD>en<65> jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktu<EFBFBD>ln<EFBFBD> anglick<63> ChangeLog</a>.
<p>
<h2>Historie verz<72> (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Zm<EFBFBD>n<EFBFBD>na v<>choz<6F> verze CreativeCommons na 3.0, p<>i aktualizaci bude zachov<6F>no nastaven<65> ze star<61><72> verze pluginu.</li>
<li>BY, jedniv<69> verze, ve kter<65> plat<61>, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japon<EFBFBD>t<EFBFBD> u<>ivatel<65> dost<73>vali <20>patn<74> odkaz na Licenci Creative Common.</li>
<li>Titulek p<>i najet<65> na obr<62>zek je nyn<79> podporovan<61> i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>p<EFBFBD>vodn<EFBFBD> verze</li>
</ul>
</ul>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Dokumentace: Licence Creative Commons</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1>
<p>Dokumentaci k tomuto pluginu p<>elo<6C>il do <20>e<EFBFBD>tiny Vladim<69>r Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od t<> doby mohl b<>t plugin pozm<7A>n<EFBFBD>n nebo mohly b<>t roz<6F><7A><EFBFBD>en<65> jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktu<EFBFBD>ln<EFBFBD> anglick<63> ChangeLog</a>.
<p>
<h2>Historie verz<72> (ChangeLog)</h2>
<ul>
<li>Verze 1.4, autor [brockhaus]</li>
<ul>
<li>Zm<EFBFBD>n<EFBFBD>na v<>choz<6F> verze CreativeCommons na 3.0, p<>i aktualizaci bude zachov<6F>no nastaven<65> ze star<61><72> verze pluginu.</li>
<li>BY, jedniv<69> verze, ve kter<65> plat<61>, je verze 3.0; Verze 2.5 to nepodporuje.</li>
<li>Japon<EFBFBD>t<EFBFBD> u<>ivatel<65> dost<73>vali <20>patn<74> odkaz na Licenci Creative Common.</li>
<li>Titulek p<>i najet<65> na obr<62>zek je nyn<79> podporovan<61> i v Mozille (atribut title)</li>
</ul>
<li>Verze 1.3, autor [Evan Nemerson]</li>
<ul>
<li>p<EFBFBD>vodn<EFBFBD> verze</li>
</ul>
</ul>
</body>
</html>

View File

@ -1,48 +1,48 @@
<?php # lang_cs.inc.php 1381.2 2009-02-23 17:29:23 VladaAjgl $
/**
* @version 1381.2
* @author Vladimír Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/23
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.');
<?php # lang_cs.inc.php 1381.2 2009-02-23 17:29:23 VladaAjgl $
/**
* @version 1381.2
* @author Vladimír Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/23
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.');

View File

@ -1,48 +1,48 @@
<?php # lang_cz.inc.php 1381.2 2009-02-23 17:29:23 VladaAjgl $
/**
* @version 1381.2
* @author Vladimír Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/23
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.');
<?php # lang_cz.inc.php 1381.2 2009-02-23 17:29:23 VladaAjgl $
/**
* @version 1381.2
* @author Vladimír Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/23
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.');

View File

@ -1,46 +1,46 @@
<?php # lang_cs.inc.php 1381.1 2009-02-14 15:43:34 VladaAjgl $
/**
* @version 1381.1
* @author Vladim<69>r Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz<6F><7A><EFBFBD>en<65> vlastnosti p<><70>sp<73>vk<76>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov<6F>n<EFBFBD>, neve<76>ejn<6A> p<><70>sp<73>vky, st<73>l<EFBFBD> (p<>ilepen<65>) p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna<6E> tento p<><70>sp<73>vek jako st<73>l<EFBFBD> (p<>ilepen<65>)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P<><50>sp<73>vky mohou b<>t p<>e<EFBFBD>teny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K<>mkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76>?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p<>i ka<6B>d<EFBFBD>m ulo<6C>en<65> p<><70>sp<73>vku bude vytvo<76>ena cachovan<61> verze. To znamen<65>, <20>e p<>i ka<6B>d<EFBFBD>m na<6E>ten<65> str<74>nky nebude p<><70>sp<73>vek sestavov<6F>n od za<7A><61>tku znovu, ale vezme se p<>edgenerovan<61> (cachovan<61>) verze. Cachov<6F>n<EFBFBD> zv<7A><76><EFBFBD> v<>kon blogu, ale m<><6D>e omezit funkci ostatn<74>ch plugin<69>.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na<4E><61>t<EFBFBD>n<EFBFBD> dal<61><6C> d<>vky p<><70>sp<73>vk<76>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na<4E><61>t<EFBFBD>n<EFBFBD> p<><70>sp<73>vk<76> %d a<> %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv<74><76>en<65> cachovan<61> verze pro p<><70>sp<73>vek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P<><50>sp<73>vek cachov<6F>n.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76> hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vku ZRU<52>ENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov<6F>ho po<70>tu %d p<><70>sp<73>vk<76>)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr<6B>t v p<>ehledu <20>l<EFBFBD>nk<6E> / na hlavn<76> str<74>nce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou<6F><75>t omezen<65> pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kter<65> skupiny u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou<6F><75>t omezen<65> pro u<>ivatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kte<74><65> u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr<6B>t obsah v RSS kan<61>lu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p<><70>sp<73>vku se nebude zobrazovat v RSS kan<61>lu/kan<61>lech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn<74> pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P<><50>davn<76> vlastn<74> pole mohou b<>t pou<6F>ita ve Va<56><61> vlastn<74> <20>ablon<6F> v m<>stech, kde chcete zobrazovat data z t<>chto pol<6F>. Pro tuto funkci mus<75>te editovat <20>ablonu "entries.tpl" a v n<> um<75>stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m<><6D>ete zadat seznam pol<6F>, kter<65> chcete pou<6F><75>t u sv<73>ch p<><70>sp<73>vk<76>, odd<64>len<65>ch <20><>rkou. Pro jm<6A>na pol<6F> nepou<6F><75>vejte speci<63>ln<6C> znaky ani diakritiku. P<><50>klad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn<70>ch voliteln<6C>ch pol<6F> m<><6D>e b<>t zm<7A>n<EFBFBD>n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka<6B> pou<6F>it<69> vybran<61>ch zna<6E>kovac<61>ch plugin<69> pro tento p<><70>sp<73>vek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz<6F><7A><EFBFBD>en<65> datab<61>zov<6F> hled<65>n<EFBFBD>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou<6F>ito, budou vytvo<76>eny p<><70>davn<76> SQL dotazy, kter<65> umo<6D>n<EFBFBD> pou<6F><75>t i p<>ilepen<65>, skryt<79> a z hlavn<76> str<74>nky odstran<61>n<EFBFBD> p<><70>sp<73>vky. Pokud tyto nejsou pou<6F><75>van<61>, doporu<72>uje se volbu zak<61>zat, co<63> m<><6D>e zv<7A><76>it v<>kon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita<74>n<EFBFBD> obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter<65> prvky a v jak<61>m po<70>ad<61> m<> tento modul zobrazovat v procesu <20>prav p<><70>sp<73>vku.');
<?php # lang_cs.inc.php 1381.1 2009-02-14 15:43:34 VladaAjgl $
/**
* @version 1381.1
* @author Vladim<69>r Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz<6F><7A><EFBFBD>en<65> vlastnosti p<><70>sp<73>vk<76>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov<6F>n<EFBFBD>, neve<76>ejn<6A> p<><70>sp<73>vky, st<73>l<EFBFBD> (p<>ilepen<65>) p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna<6E> tento p<><70>sp<73>vek jako st<73>l<EFBFBD> (p<>ilepen<65>)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P<><50>sp<73>vky mohou b<>t p<>e<EFBFBD>teny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K<>mkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76>?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p<>i ka<6B>d<EFBFBD>m ulo<6C>en<65> p<><70>sp<73>vku bude vytvo<76>ena cachovan<61> verze. To znamen<65>, <20>e p<>i ka<6B>d<EFBFBD>m na<6E>ten<65> str<74>nky nebude p<><70>sp<73>vek sestavov<6F>n od za<7A><61>tku znovu, ale vezme se p<>edgenerovan<61> (cachovan<61>) verze. Cachov<6F>n<EFBFBD> zv<7A><76><EFBFBD> v<>kon blogu, ale m<><6D>e omezit funkci ostatn<74>ch plugin<69>.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na<4E><61>t<EFBFBD>n<EFBFBD> dal<61><6C> d<>vky p<><70>sp<73>vk<76>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na<4E><61>t<EFBFBD>n<EFBFBD> p<><70>sp<73>vk<76> %d a<> %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv<74><76>en<65> cachovan<61> verze pro p<><70>sp<73>vek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P<><50>sp<73>vek cachov<6F>n.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76> hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vku ZRU<52>ENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov<6F>ho po<70>tu %d p<><70>sp<73>vk<76>)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr<6B>t v p<>ehledu <20>l<EFBFBD>nk<6E> / na hlavn<76> str<74>nce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou<6F><75>t omezen<65> pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kter<65> skupiny u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou<6F><75>t omezen<65> pro u<>ivatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kte<74><65> u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr<6B>t obsah v RSS kan<61>lu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p<><70>sp<73>vku se nebude zobrazovat v RSS kan<61>lu/kan<61>lech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn<74> pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P<><50>davn<76> vlastn<74> pole mohou b<>t pou<6F>ita ve Va<56><61> vlastn<74> <20>ablon<6F> v m<>stech, kde chcete zobrazovat data z t<>chto pol<6F>. Pro tuto funkci mus<75>te editovat <20>ablonu "entries.tpl" a v n<> um<75>stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m<><6D>ete zadat seznam pol<6F>, kter<65> chcete pou<6F><75>t u sv<73>ch p<><70>sp<73>vk<76>, odd<64>len<65>ch <20><>rkou. Pro jm<6A>na pol<6F> nepou<6F><75>vejte speci<63>ln<6C> znaky ani diakritiku. P<><50>klad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn<70>ch voliteln<6C>ch pol<6F> m<><6D>e b<>t zm<7A>n<EFBFBD>n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka<6B> pou<6F>it<69> vybran<61>ch zna<6E>kovac<61>ch plugin<69> pro tento p<><70>sp<73>vek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz<6F><7A><EFBFBD>en<65> datab<61>zov<6F> hled<65>n<EFBFBD>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou<6F>ito, budou vytvo<76>eny p<><70>davn<76> SQL dotazy, kter<65> umo<6D>n<EFBFBD> pou<6F><75>t i p<>ilepen<65>, skryt<79> a z hlavn<76> str<74>nky odstran<61>n<EFBFBD> p<><70>sp<73>vky. Pokud tyto nejsou pou<6F><75>van<61>, doporu<72>uje se volbu zak<61>zat, co<63> m<><6D>e zv<7A><76>it v<>kon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita<74>n<EFBFBD> obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter<65> prvky a v jak<61>m po<70>ad<61> m<> tento modul zobrazovat v procesu <20>prav p<><70>sp<73>vku.');

View File

@ -1,46 +1,46 @@
<?php # lang_cz.inc.php 1381.1 2009-02-14 15:43:34 VladaAjgl $
/**
* @version 1381.1
* @author Vladim<69>r Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz<6F><7A><EFBFBD>en<65> vlastnosti p<><70>sp<73>vk<76>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov<6F>n<EFBFBD>, neve<76>ejn<6A> p<><70>sp<73>vky, st<73>l<EFBFBD> (p<>ilepen<65>) p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna<6E> tento p<><70>sp<73>vek jako st<73>l<EFBFBD> (p<>ilepen<65>)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P<><50>sp<73>vky mohou b<>t p<>e<EFBFBD>teny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K<>mkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76>?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p<>i ka<6B>d<EFBFBD>m ulo<6C>en<65> p<><70>sp<73>vku bude vytvo<76>ena cachovan<61> verze. To znamen<65>, <20>e p<>i ka<6B>d<EFBFBD>m na<6E>ten<65> str<74>nky nebude p<><70>sp<73>vek sestavov<6F>n od za<7A><61>tku znovu, ale vezme se p<>edgenerovan<61> (cachovan<61>) verze. Cachov<6F>n<EFBFBD> zv<7A><76><EFBFBD> v<>kon blogu, ale m<><6D>e omezit funkci ostatn<74>ch plugin<69>.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na<4E><61>t<EFBFBD>n<EFBFBD> dal<61><6C> d<>vky p<><70>sp<73>vk<76>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na<4E><61>t<EFBFBD>n<EFBFBD> p<><70>sp<73>vk<76> %d a<> %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv<74><76>en<65> cachovan<61> verze pro p<><70>sp<73>vek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P<><50>sp<73>vek cachov<6F>n.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76> hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vku ZRU<52>ENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov<6F>ho po<70>tu %d p<><70>sp<73>vk<76>)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr<6B>t v p<>ehledu <20>l<EFBFBD>nk<6E> / na hlavn<76> str<74>nce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou<6F><75>t omezen<65> pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kter<65> skupiny u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou<6F><75>t omezen<65> pro u<>ivatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kte<74><65> u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr<6B>t obsah v RSS kan<61>lu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p<><70>sp<73>vku se nebude zobrazovat v RSS kan<61>lu/kan<61>lech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn<74> pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P<><50>davn<76> vlastn<74> pole mohou b<>t pou<6F>ita ve Va<56><61> vlastn<74> <20>ablon<6F> v m<>stech, kde chcete zobrazovat data z t<>chto pol<6F>. Pro tuto funkci mus<75>te editovat <20>ablonu "entries.tpl" a v n<> um<75>stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m<><6D>ete zadat seznam pol<6F>, kter<65> chcete pou<6F><75>t u sv<73>ch p<><70>sp<73>vk<76>, odd<64>len<65>ch <20><>rkou. Pro jm<6A>na pol<6F> nepou<6F><75>vejte speci<63>ln<6C> znaky ani diakritiku. P<><50>klad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn<70>ch voliteln<6C>ch pol<6F> m<><6D>e b<>t zm<7A>n<EFBFBD>n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka<6B> pou<6F>it<69> vybran<61>ch zna<6E>kovac<61>ch plugin<69> pro tento p<><70>sp<73>vek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz<6F><7A><EFBFBD>en<65> datab<61>zov<6F> hled<65>n<EFBFBD>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou<6F>ito, budou vytvo<76>eny p<><70>davn<76> SQL dotazy, kter<65> umo<6D>n<EFBFBD> pou<6F><75>t i p<>ilepen<65>, skryt<79> a z hlavn<76> str<74>nky odstran<61>n<EFBFBD> p<><70>sp<73>vky. Pokud tyto nejsou pou<6F><75>van<61>, doporu<72>uje se volbu zak<61>zat, co<63> m<><6D>e zv<7A><76>it v<>kon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita<74>n<EFBFBD> obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter<65> prvky a v jak<61>m po<70>ad<61> m<> tento modul zobrazovat v procesu <20>prav p<><70>sp<73>vku.');
<?php # lang_cz.inc.php 1381.1 2009-02-14 15:43:34 VladaAjgl $
/**
* @version 1381.1
* @author Vladim<69>r Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/14
*/
@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz<6F><7A><EFBFBD>en<65> vlastnosti p<><70>sp<73>vk<76>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov<6F>n<EFBFBD>, neve<76>ejn<6A> p<><70>sp<73>vky, st<73>l<EFBFBD> (p<>ilepen<65>) p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna<6E> tento p<><70>sp<73>vek jako st<73>l<EFBFBD> (p<>ilepen<65>)');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P<><50>sp<73>vky mohou b<>t p<>e<EFBFBD>teny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K<>mkoliv');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76>?');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p<>i ka<6B>d<EFBFBD>m ulo<6C>en<65> p<><70>sp<73>vku bude vytvo<76>ena cachovan<61> verze. To znamen<65>, <20>e p<>i ka<6B>d<EFBFBD>m na<6E>ten<65> str<74>nky nebude p<><70>sp<73>vek sestavov<6F>n od za<7A><61>tku znovu, ale vezme se p<>edgenerovan<61> (cachovan<61>) verze. Cachov<6F>n<EFBFBD> zv<7A><76><EFBFBD> v<>kon blogu, ale m<><6D>e omezit funkci ostatn<74>ch plugin<69>.');
@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p<><70>sp<73>vky');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na<4E><61>t<EFBFBD>n<EFBFBD> dal<61><6C> d<>vky p<><70>sp<73>vk<76>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na<4E><61>t<EFBFBD>n<EFBFBD> p<><70>sp<73>vk<76> %d a<> %d');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv<74><76>en<65> cachovan<61> verze pro p<><70>sp<73>vek #%d, <em>%s</em>...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P<><50>sp<73>vek cachov<6F>n.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vk<76> hotovo.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov<6F>n<EFBFBD> p<><70>sp<73>vku ZRU<52>ENO.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov<6F>ho po<70>tu %d p<><70>sp<73>vk<76>)...');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr<6B>t v p<>ehledu <20>l<EFBFBD>nk<6E> / na hlavn<76> str<74>nce');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou<6F><75>t omezen<65> pro skupiny');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kter<65> skupiny u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou<6F><75>t omezen<65> pro u<>ivatele');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m<><6D>ete zadat, kte<74><65> u<>ivatel<65> sm<73> <20><>st <20>l<EFBFBD>nek. Tato volba m<> velk<6C> vliv na rychlost vytv<74><76>en<65> str<74>nky s p<>ehledem <20>l<EFBFBD>nk<6E>. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu<79>ijete.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr<6B>t obsah v RSS kan<61>lu');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p<><70>sp<73>vku se nebude zobrazovat v RSS kan<61>lu/kan<61>lech.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn<74> pole');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P<><50>davn<76> vlastn<74> pole mohou b<>t pou<6F>ita ve Va<56><61> vlastn<74> <20>ablon<6F> v m<>stech, kde chcete zobrazovat data z t<>chto pol<6F>. Pro tuto funkci mus<75>te editovat <20>ablonu "entries.tpl" a v n<> um<75>stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m<><6D>ete zadat seznam pol<6F>, kter<65> chcete pou<6F><75>t u sv<73>ch p<><70>sp<73>vk<76>, odd<64>len<65>ch <20><>rkou. Pro jm<6A>na pol<6F> nepou<6F><75>vejte speci<63>ln<6C> znaky ani diakritiku. P<><50>klad: "MojePole1, CiziPole2, UplneCiziPole3". ');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn<70>ch voliteln<6C>ch pol<6F> m<><6D>e b<>t zm<7A>n<EFBFBD>n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka<6B> pou<6F>it<69> vybran<61>ch zna<6E>kovac<61>ch plugin<69> pro tento p<><70>sp<73>vek:');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz<6F><7A><EFBFBD>en<65> datab<61>zov<6F> hled<65>n<EFBFBD>');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou<6F>ito, budou vytvo<76>eny p<><70>davn<76> SQL dotazy, kter<65> umo<6D>n<EFBFBD> pou<6F><75>t i p<>ilepen<65>, skryt<79> a z hlavn<76> str<74>nky odstran<61>n<EFBFBD> p<><70>sp<73>vky. Pokud tyto nejsou pou<6F><75>van<61>, doporu<72>uje se volbu zak<61>zat, co<63> m<><6D>e zv<7A><76>it v<>kon.');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita<74>n<EFBFBD> obrazovka');
@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter<65> prvky a v jak<61>m po<70>ad<61> m<> tento modul zobrazovat v procesu <20>prav p<><70>sp<73>vku.');

View File

@ -1,36 +1,36 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dokumentace: Plugin Karma</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Karma'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 5.7.2011. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
</p>
<h2>Popis pluginu</h2>
<p>Plugin 'Karma' má dvě funkce:
<ol>
<li>Umožňuje návštěvníkům hodnotit kvalitu příspěvků</li>
<li>Umožňuje sledovat návštěvy na blogu</li>
</ol>
</p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>verze 2.0 [gregman]</li>
<ul>
<li>Přidána možnost změnit hlasovací zařízení na animované obrázky.</li>
</ul>
<li>verze 1.4 [brockhaus]</li>
<ul>
<li>Nová volba pro vypnutí sledování návštěv přihlášených uživatelů.</li>
</ul>
<li>verze 1.3 [garvinhickins]</li>
<ul>
<li>první verze</li>
</ul>
</ul>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dokumentace: Plugin Karma</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Karma'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 5.7.2011. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
</p>
<h2>Popis pluginu</h2>
<p>Plugin 'Karma' má dvě funkce:
<ol>
<li>Umožňuje návštěvníkům hodnotit kvalitu příspěvků</li>
<li>Umožňuje sledovat návštěvy na blogu</li>
</ol>
</p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>verze 2.0 [gregman]</li>
<ul>
<li>Přidána možnost změnit hlasovací zařízení na animované obrázky.</li>
</ul>
<li>verze 1.4 [brockhaus]</li>
<ul>
<li>Nová volba pro vypnutí sledování návštěv přihlášených uživatelů.</li>
</ul>
<li>verze 1.3 [garvinhickins]</li>
<ul>
<li>první verze</li>
</ul>
</ul>
</body>
</html>

View File

@ -1,36 +1,36 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dokumentace: Plugin Karma</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Karma'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 5.7.2011. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
</p>
<h2>Popis pluginu</h2>
<p>Plugin 'Karma' má dvě funkce:
<ol>
<li>Umožňuje návštěvníkům hodnotit kvalitu příspěvků</li>
<li>Umožňuje sledovat návštěvy na blogu</li>
</ol>
</p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>verze 2.0 [gregman]</li>
<ul>
<li>Přidána možnost změnit hlasovací zařízení na animované obrázky.</li>
</ul>
<li>verze 1.4 [brockhaus]</li>
<ul>
<li>Nová volba pro vypnutí sledování návštěv přihlášených uživatelů.</li>
</ul>
<li>verze 1.3 [garvinhickins]</li>
<ul>
<li>první verze</li>
</ul>
</ul>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dokumentace: Plugin Karma</title>
</head>
<body>
<h1>Dokumentace k pluginu 'Karma'</h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 5.7.2011. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>.
</p>
<h2>Popis pluginu</h2>
<p>Plugin 'Karma' má dvě funkce:
<ol>
<li>Umožňuje návštěvníkům hodnotit kvalitu příspěvků</li>
<li>Umožňuje sledovat návštěvy na blogu</li>
</ol>
</p>
<h2>Historie verzí (ChangeLog)</h2>
<ul>
<li>verze 2.0 [gregman]</li>
<ul>
<li>Přidána možnost změnit hlasovací zařízení na animované obrázky.</li>
</ul>
<li>verze 1.4 [brockhaus]</li>
<ul>
<li>Nová volba pro vypnutí sledování návštěv přihlášených uživatelů.</li>
</ul>
<li>verze 1.3 [garvinhickins]</li>
<ul>
<li>první verze</li>
</ul>
</ul>
</body>
</html>

View File

@ -1,127 +1,136 @@
<?php # lang_cs.inc.php 1475.3 2011-03-09 20:05:20 VladaAjgl $
/**
* @version 1475.3
* @author Vladimír Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/15
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/03/08
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2011/03/09
*/
@define('PLUGIN_KARMA_NAME', 'Karma');
@define('PLUGIN_KARMA_BLAHBLAH', 'Čtenáři hodnotí kvalitu Vašich příspěvků');
@define('PLUGIN_KARMA_VOTETEXT', 'Karma tohoto článku: ');
@define('PLUGIN_KARMA_VOTETEXT_NAME', 'Zpráva požadavku o hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_NAME_BLAHBLAH', 'Text použitý při zobrazení pruhu pro hlasování. (Přednastaveno: \'' . PLUGIN_KARMA_VOTETEXT . '\')');
@define('PLUGIN_KARMA_RATE', 'Ohodnoť tento článek: %s');
@define('PLUGIN_KARMA_VOTEPOINT_5', 'Dost dobrý!');
@define('PLUGIN_KARMA_VOTEPOINT_5_NAME', 'Popis pro nejlepší hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_5_BLAHBLAH', 'Slovní varianta pro nejlepší možné hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_5 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_4', 'Dobrý');
@define('PLUGIN_KARMA_VOTEPOINT_4_NAME', 'Popis pro dobré hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_4_BLAHBLAH', 'Slovní varianta pro dobré hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_4 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_3', 'Průmer');
@define('PLUGIN_KARMA_VOTEPOINT_3_NAME', 'Popis pro neutrální hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_3_BLAHBLAH', 'Slovní varianta pro neutrální hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_3 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_2', 'Nezajímavý');
@define('PLUGIN_KARMA_VOTEPOINT_2_NAME', 'Popis pro slabé hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_2_BLAHBLAH', 'Slovní varianta pro slabé hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_2 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_1', 'Mizerný');
@define('PLUGIN_KARMA_VOTEPOINT_1_NAME', 'Popis pro nejhorší hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_1_BLAHBLAH', 'Slovní varianta pro nejhorší hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_1 . '\')');
@define('PLUGIN_KARMA_VOTETEXT_5', '+2');
@define('PLUGIN_KARMA_VOTETEXT_5_NAME', 'Hodnota nejlepšího hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_5_BLAHBLAH', 'Text, který se zobrazí jako hodnota nejlepšího hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_5 . ')');
@define('PLUGIN_KARMA_VOTETEXT_4', '+1');
@define('PLUGIN_KARMA_VOTETEXT_4_NAME', 'Hodnota dobrého hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_4_BLAHBLAH', 'Text, který se zobrazí jako hodnota dobrého hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_4 . ')');
@define('PLUGIN_KARMA_VOTETEXT_3', '0');
@define('PLUGIN_KARMA_VOTETEXT_3_NAME', 'Hodnota neutrálního hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_3_BLAHBLAH', 'Text, který se zobrazí jako hodnota neutrálního hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_3 . ')');
@define('PLUGIN_KARMA_VOTETEXT_2', '-1');
@define('PLUGIN_KARMA_VOTETEXT_2_NAME', 'Hodnota slabého hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_2_BLAHBLAH', 'Text, který se zobrazí jako hodnota slabého hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_2 . ')');
@define('PLUGIN_KARMA_VOTETEXT_1', '-2');
@define('PLUGIN_KARMA_VOTETEXT_1_NAME', 'Hodnota nejhoršího hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_1_BLAHBLAH', 'Text, který se zobrazí jako hodnota nejhoršího hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_1 . ')');
@define('PLUGIN_KARMA_VOTED', 'Vyše hodnocení "%s" bylo zaznamenáno.');
@define('PLUGIN_KARMA_VOTES', '%3$s hlas(ů)');
@define('PLUGIN_KARMA_INVALID', 'Vaše hlasování je neplatné.');
@define('PLUGIN_KARMA_ALREADYVOTED', 'Již jste hlasoval.');
@define('PLUGIN_KARMA_NOCOOKIE', 'Váš prohlížeč musí podporovat cookies. jinak nemůžete hlasovat.');
@define('PLUGIN_KARMA_CLOSED', 'Hodnocení článku novější než %s dní!');
@define('PLUGIN_KARMA_ENTRYTIME', 'Čas pro hodnocení po zveřejnění příspěvku.');
@define('PLUGIN_KARMA_ENTRYTIME_BLAHBLAH', 'Jak dlouho (v minutách) po zveřejnění příspěvku je povoleno neomezené hodnocení příspěvku? Standardně: 1400 (jeden den)');
@define('PLUGIN_KARMA_VOTINGTIME', 'Čas pro hodnocení');
@define('PLUGIN_KARMA_VOTINGTIME_BLAHBLAH', 'Jak dlouho (v minutách) je třeba čekat mezi dvěmi hodnoceními. Standardně: 5');
@define('PLUGIN_KARMA_TIMEOUT', 'Ochrana proti zahlcením serveru: Jiný čtenář právě hlasoval. Počkejte před Vaším hlasování %s minut, prosím.');
@define('PLUGIN_KARMA_CURRENT', 'Současná karma: %2$s, %3$s hlas(ů)');
@define('PLUGIN_KARMA_CURRENT_NAME', 'Zpráva současného hodnocení');
@define('PLUGIN_KARMA_CURRENT_NAME_BLAHBLAH', 'Text použitý pro zobrazení současného hodnocení (%2$s je číselné hodnocení; %3$s je počet hlasů) (Přednastaveno: ' . PLUGIN_KARMA_CURRENT . ')');
@define('PLUGIN_KARMA_EXTENDEDONLY', 'Pouze kompletní článek');
@define('PLUGIN_KARMA_EXTENDEDONLY_BLAHBLAH', 'Zobrazovat karma-hodnocení pouze při zobrazení celého článku = při zobrazení rozšířené textové části.');
@define('PLUGIN_KARMA_MAXKARMA', 'Období pro karmu');
@define('PLUGIN_KARMA_MAXKARMA_BLAHBLAH', 'Povolit hlsování karmy pro článek, který je mladší než X dní (Standardně: 7)');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VOTES', 'Minimální počet hlasů pro zobrazení');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VOTES_BLAHBLAH', 'Zobrazí hodnocení pouze pokud počet hlasů přesahuje zde zadanou hodnotu. Pokud chcete zobrazovat hodnocení vždy, zadejte 0.');
@define('PLUGIN_KARMA_LOGGING', 'Logovat hlasy?');
@define('PLUGIN_KARMA_LOGGING_BLAHBLAH', 'Mají být informace o karma-hlasování logovány?');
@define('PLUGIN_KARMA_ACTIVE', 'Povolit karmu?');
@define('PLUGIN_KARMA_ACTIVE_BLAHBLAH', 'Je karma-hlasování zapnuto?');
//--JAM:@define('PLUGIN_KARMA_ALIGNMENT', 'Voting Bar Alignment');
//--JAM:@define('PLUGIN_KARMA_ALIGNMENT_BLAHBLAH', 'Alignment of voting bar in the entry footer. Templates can override this setting with !important (Default: right)');
//--JAM: @define('PLUGIN_KARMA_ALIGNMENT_DETECT', 'from style');
@define('PLUGIN_KARMA_VISITS', 'Povolit sledování návštěv?');
@define('PLUGIN_KARMA_VISITS_BLAHBLAH', 'Má být každé klinkutí na zobrazení rozšířené textové části počítáno a zaznamenáváno?');
@define('PLUGIN_KARMA_VISITSCOUNT', ' %4$s zobrazení');
@define('PLUGIN_KARMA_STATISTICS_VISITS_TOP', 'Nečtenější příspěvky');
@define('PLUGIN_KARMA_STATISTICS_VISITS_BOTTOM', 'Nejméně čtené příspěvky');
@define('PLUGIN_KARMA_STATISTICS_VOTES_TOP', 'Příspěvky s nejvíce karma-hlasy');
@define('PLUGIN_KARMA_STATISTICS_VOTES_BOTTOM', 'Příspěvky s nejméně karma-hlasy');
@define('PLUGIN_KARMA_STATISTICS_POINTS_TOP', 'Příspěvky s nejlepší karmou');
@define('PLUGIN_KARMA_STATISTICS_POINTS_BOTTOM', 'Příspěvky s nejhorší karmou');
@define('PLUGIN_KARMA_STATISTICS_VISITS_NO', 'přečtení');
@define('PLUGIN_KARMA_STATISTICS_VOTES_NO', 'hlasů');
@define('PLUGIN_KARMA_STATISTICS_POINTS_NO', 'bodů');
@define('PLUGIN_KARMA_STARRATING', 'Povolit individuální honocení příspěvku?');
@define('PLUGIN_KARMA_VISITS_LOGGEDIN_USERS', 'Sledovat návštěvy přihlášených uživatelů?');
@define('PLUGIN_KARMA_VISITS_LOGGEDIN_USERS_BLAHBLAH', 'Pokud je tato volba povolena, návštěvy uživatelů, kteří jsou přihlášeni, jsou také zaznamenávány. (Takovými užiateli jste například vy při zadávání nových přípěvků a jejich odlaďování)');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VISITS', 'Minimální počet návštěv pro zobrazení');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VISITS_BLAHBLAH', 'Počet návštěv bude zobrazován pouze pokud jejich počet překročí zde uvedenou hodnotu. Chcete-li počítadlo zobrazovat vždy, zadejte 0.');
@define('PLUGIN_KARMA_WORDRATING', 'Zobrazovat hodnocení ve slovní formě?');
@define('PLUGIN_KARMA_WORDRATING_BLAHBLAH', 'Chcete hodnocení zobrazit jako slova nebo jako čísla? (Přednastaveno: NE; použít číselné hodnocení)');
@define('PLUGIN_KARMA_IMAGE_WITH_MESSAGE', 'Zobrazovat hodnotící zprávu?');
@define('PLUGIN_KARMA_IMAGE_WITH_MESSAGE_BLAHBLAH', 'Zobrazit textový požadavek na hlasování před grafickými pruhy? (nemá na pruhy žádný efekt) (Přednastaveno: ano)');
@define('PLUGIN_KARMA_IMAGE_WITH_CURR', 'Zobrazit textovou zprávu spolu se současným hodnocením?');
@define('PLUGIN_KARMA_IMAGE_WITH_CURR_BLAHBLAH', 'Zobrazovat textové informace za grafickými pruhy? (nemá na pruhy žádný efekt) (Přednastaveno: ano)');
@define('PLUGIN_KARMA_IMAGE_WITH_VISITS', 'Zobrazovat text návštěv?');
@define('PLUGIN_KARMA_IMAGE_WITH_VISITS_BLAHBLAH', 'Vložit počet návštěv i jako text? (za pruhy, nemá na pruhy žádný efekt) (Přednastaveno: ano)');
@define('PLUGIN_KARMA_PREVIEW_BG', 'Pozadí pro tabulku náhledu, níže');
@define('PLUGIN_KARMA_PREVIEW_BG_BLAHBLAH', 'Platná je jakákoliv hodnota CSS stylů; bude použita jako atribut \'background\' pro tabulku s náhledem, a to POUZE na administrativní stránce. Nemá žádný efekt na pruhy s hodnocením.');
@define('PLUGIN_KARMA_IMAGE', 'Typ hlasovacích pruhů');
@define('PLUGIN_KARMA_IMAGE_DESC', 'Vyberte soubor s obrázkem (např. diamonds.png) pro hlasování s obrázky. Vyberte \'' . PLUGIN_KARMA_STATISTICS_POINTS_NO . '\' pro hlasování pomocí textu.');
@define('PLUGIN_KARMA_NO_IMAGES', 'V adresáří img/ v pluginu nejsou žádné obrázky!');
@define('PLUGIN_KARMA_IMAGE_RATING', '%1.2f z 5');
@define('PLUGIN_KARMA_IMAGE_INT_RATING', '%d z 5');
@define('PLUGIN_KARMA_IMAGE_NONE_RATING', 'žádný');
@define('PLUGIN_KARMA_TAB_OPTIONS', 'Volby');
@define('PLUGIN_KARMA_TAB_APPEARANCE', 'Vzhled');
@define('PLUGIN_KARMA_TAB_TEXT', 'Text');
@define('PLUGIN_KARMA_DISPLAY_LOG', 'Správa Karmy');
@define('PLUGIN_KARMA_REMOVED_POINTS', '%s bodů odstraněno z příspěvku %s');
@define('PLUGIN_KARMA_APPROVED_POINTS', '%s bodů pro příspěvek %s potvrzeno');
@define('PLUGIN_KARMA_POINTS_ERROR', 'Chyba při aktualizaci bodů pro příspěvek %s!');
@define('PLUGIN_KARMA_REMOVE_ERROR', 'Chyba při odstraňování hlasu pro příspěvek %s! (Počet bodů byl nicméně aktualizován.)');
@define('PLUGIN_KARMA_UPDATE_ERROR', 'Zatím žádné hlasy pro příspěvek %s!');
@define('PLUGIN_KARMA_INVALID_INPUT', 'Nesprávné zadání!');
@define('PLUGIN_KARMA_DELETE_VOTES', 'Vymazat vybrané hlasy');
@define('PLUGIN_KARMA_APPROVE_VOTES', 'Potvrdit vybrané hlasy');
// Next lines were translated on 2011/03/09
@define('PLUGIN_KARMA_ACTIVE_REGISTERED', 'Hlasovat mohou pouze přihlášení uživatelé');
<?php # lang_cs.inc.php 1475.0 2012-02-17 22:39:24 VladaAjgl $
/**
* @version 1475.0
/**
* @author Vladimír Ajgl <vlada@ajgl.cz>
* EN-Revision: Revision of lang_en.inc.php
* @author Vladimir Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/02/15
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2009/03/08
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2011/03/09
* @author Vladimír Ajgl <vlada@ajgl.cz>
* @revisionDate 2012/02/17
*/
@define('PLUGIN_KARMA_NAME', 'Karma');
@define('PLUGIN_KARMA_BLAHBLAH', 'Čtenáři hodnotí kvalitu Vašich příspěvků');
@define('PLUGIN_KARMA_VOTETEXT', 'Karma tohoto článku: ');
@define('PLUGIN_KARMA_VOTETEXT_NAME', 'Zpráva požadavku o hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_NAME_BLAHBLAH', 'Text použitý při zobrazení pruhu pro hlasování. (Přednastaveno: \'' . PLUGIN_KARMA_VOTETEXT . '\')');
@define('PLUGIN_KARMA_RATE', 'Ohodnoť tento článek: %s');
@define('PLUGIN_KARMA_VOTEPOINT_5', 'Dost dobrý!');
@define('PLUGIN_KARMA_VOTEPOINT_5_NAME', 'Popis pro nejlepší hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_5_BLAHBLAH', 'Slovní varianta pro nejlepší možné hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_5 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_4', 'Dobrý');
@define('PLUGIN_KARMA_VOTEPOINT_4_NAME', 'Popis pro dobré hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_4_BLAHBLAH', 'Slovní varianta pro dobré hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_4 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_3', 'Průmer');
@define('PLUGIN_KARMA_VOTEPOINT_3_NAME', 'Popis pro neutrální hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_3_BLAHBLAH', 'Slovní varianta pro neutrální hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_3 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_2', 'Nezajímavý');
@define('PLUGIN_KARMA_VOTEPOINT_2_NAME', 'Popis pro slabé hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_2_BLAHBLAH', 'Slovní varianta pro slabé hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_2 . '\')');
@define('PLUGIN_KARMA_VOTEPOINT_1', 'Mizerný');
@define('PLUGIN_KARMA_VOTEPOINT_1_NAME', 'Popis pro nejhorší hodnocení');
@define('PLUGIN_KARMA_VOTEPOINT_1_BLAHBLAH', 'Slovní varianta pro nejhorší hodnocení. (Přednastaveno: \'' . PLUGIN_KARMA_VOTEPOINT_1 . '\')');
@define('PLUGIN_KARMA_VOTETEXT_5', '+2');
@define('PLUGIN_KARMA_VOTETEXT_5_NAME', 'Hodnota nejlepšího hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_5_BLAHBLAH', 'Text, který se zobrazí jako hodnota nejlepšího hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_5 . ')');
@define('PLUGIN_KARMA_VOTETEXT_4', '+1');
@define('PLUGIN_KARMA_VOTETEXT_4_NAME', 'Hodnota dobrého hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_4_BLAHBLAH', 'Text, který se zobrazí jako hodnota dobrého hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_4 . ')');
@define('PLUGIN_KARMA_VOTETEXT_3', '0');
@define('PLUGIN_KARMA_VOTETEXT_3_NAME', 'Hodnota neutrálního hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_3_BLAHBLAH', 'Text, který se zobrazí jako hodnota neutrálního hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_3 . ')');
@define('PLUGIN_KARMA_VOTETEXT_2', '-1');
@define('PLUGIN_KARMA_VOTETEXT_2_NAME', 'Hodnota slabého hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_2_BLAHBLAH', 'Text, který se zobrazí jako hodnota slabého hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_2 . ')');
@define('PLUGIN_KARMA_VOTETEXT_1', '-2');
@define('PLUGIN_KARMA_VOTETEXT_1_NAME', 'Hodnota nejhoršího hodnocení');
@define('PLUGIN_KARMA_VOTETEXT_1_BLAHBLAH', 'Text, který se zobrazí jako hodnota nejhoršího hodnocení v hodnotícím pruhu. (Přednastaveno: ' . PLUGIN_KARMA_VOTETEXT_1 . ')');
@define('PLUGIN_KARMA_VOTED', 'Vyše hodnocení "%s" bylo zaznamenáno.');
@define('PLUGIN_KARMA_VOTES', '%3$s hlas(ů)');
@define('PLUGIN_KARMA_INVALID', 'Vaše hlasování je neplatné.');
@define('PLUGIN_KARMA_ALREADYVOTED', 'Již jste hlasoval.');
@define('PLUGIN_KARMA_NOCOOKIE', 'Váš prohlížeč musí podporovat cookies. jinak nemůžete hlasovat.');
@define('PLUGIN_KARMA_CLOSED', 'Hodnocení článku novější než %s dní!');
@define('PLUGIN_KARMA_ENTRYTIME', 'Čas pro hodnocení po zveřejnění příspěvku.');
@define('PLUGIN_KARMA_ENTRYTIME_BLAHBLAH', 'Jak dlouho (v minutách) po zveřejnění příspěvku je povoleno neomezené hodnocení příspěvku? Standardně: 1400 (jeden den)');
@define('PLUGIN_KARMA_VOTINGTIME', 'Čas pro hodnocení');
@define('PLUGIN_KARMA_VOTINGTIME_BLAHBLAH', 'Jak dlouho (v minutách) je třeba čekat mezi dvěmi hodnoceními. Standardně: 5');
@define('PLUGIN_KARMA_TIMEOUT', 'Ochrana proti zahlcením serveru: Jiný čtenář právě hlasoval. Počkejte před Vaším hlasování %s minut, prosím.');
@define('PLUGIN_KARMA_CURRENT', 'Současná karma: %2$s, %3$s hlas(ů)');
@define('PLUGIN_KARMA_CURRENT_NAME', 'Zpráva současného hodnocení');
@define('PLUGIN_KARMA_CURRENT_NAME_BLAHBLAH', 'Text použitý pro zobrazení současného hodnocení (%2$s je číselné hodnocení; %3$s je počet hlasů) (Přednastaveno: ' . PLUGIN_KARMA_CURRENT . ')');
@define('PLUGIN_KARMA_EXTENDEDONLY', 'Pouze kompletní článek');
@define('PLUGIN_KARMA_EXTENDEDONLY_BLAHBLAH', 'Zobrazovat karma-hodnocení pouze při zobrazení celého článku = při zobrazení rozšířené textové části.');
@define('PLUGIN_KARMA_MAXKARMA', 'Období pro karmu');
@define('PLUGIN_KARMA_MAXKARMA_BLAHBLAH', 'Povolit hlsování karmy pro článek, který je mladší než X dní (Standardně: 7)');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VOTES', 'Minimální počet hlasů pro zobrazení');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VOTES_BLAHBLAH', 'Zobrazí hodnocení pouze pokud počet hlasů přesahuje zde zadanou hodnotu. Pokud chcete zobrazovat hodnocení vždy, zadejte 0.');
@define('PLUGIN_KARMA_LOGGING', 'Logovat hlasy?');
@define('PLUGIN_KARMA_LOGGING_BLAHBLAH', 'Mají být informace o karma-hlasování logovány?');
@define('PLUGIN_KARMA_ACTIVE', 'Povolit karmu?');
@define('PLUGIN_KARMA_ACTIVE_BLAHBLAH', 'Je karma-hlasování zapnuto?');
//--JAM:@define('PLUGIN_KARMA_ALIGNMENT', 'Voting Bar Alignment');
//--JAM:@define('PLUGIN_KARMA_ALIGNMENT_BLAHBLAH', 'Alignment of voting bar in the entry footer. Templates can override this setting with !important (Default: right)');
//--JAM: @define('PLUGIN_KARMA_ALIGNMENT_DETECT', 'from style');
@define('PLUGIN_KARMA_VISITS', 'Povolit sledování návštěv?');
@define('PLUGIN_KARMA_VISITS_BLAHBLAH', 'Má být každé klinkutí na zobrazení rozšířené textové části počítáno a zaznamenáváno?');
@define('PLUGIN_KARMA_VISITSCOUNT', ' %4$s zobrazení');
@define('PLUGIN_KARMA_STATISTICS_VISITS_TOP', 'Nečtenější příspěvky');
@define('PLUGIN_KARMA_STATISTICS_VISITS_BOTTOM', 'Nejméně čtené příspěvky');
@define('PLUGIN_KARMA_STATISTICS_VOTES_TOP', 'Příspěvky s nejvíce karma-hlasy');
@define('PLUGIN_KARMA_STATISTICS_VOTES_BOTTOM', 'Příspěvky s nejméně karma-hlasy');
@define('PLUGIN_KARMA_STATISTICS_POINTS_TOP', 'Příspěvky s nejlepší karmou');
@define('PLUGIN_KARMA_STATISTICS_POINTS_BOTTOM', 'Příspěvky s nejhorší karmou');
@define('PLUGIN_KARMA_STATISTICS_VISITS_NO', 'přečtení');
@define('PLUGIN_KARMA_STATISTICS_VOTES_NO', 'hlasů');
@define('PLUGIN_KARMA_STATISTICS_POINTS_NO', 'bodů');
@define('PLUGIN_KARMA_STARRATING', 'Povolit individuální honocení příspěvku?');
@define('PLUGIN_KARMA_VISITS_LOGGEDIN_USERS', 'Sledovat návštěvy přihlášených uživatelů?');
@define('PLUGIN_KARMA_VISITS_LOGGEDIN_USERS_BLAHBLAH', 'Pokud je tato volba povolena, návštěvy uživatelů, kteří jsou přihlášeni, jsou také zaznamenávány. (Takovými užiateli jste například vy při zadávání nových přípěvků a jejich odlaďování)');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VISITS', 'Minimální počet návštěv pro zobrazení');
@define('PLUGIN_KARMA_MIN_DISPLAYABLE_VISITS_BLAHBLAH', 'Počet návštěv bude zobrazován pouze pokud jejich počet překročí zde uvedenou hodnotu. Chcete-li počítadlo zobrazovat vždy, zadejte 0.');
@define('PLUGIN_KARMA_WORDRATING', 'Zobrazovat hodnocení ve slovní formě?');
@define('PLUGIN_KARMA_WORDRATING_BLAHBLAH', 'Chcete hodnocení zobrazit jako slova nebo jako čísla? (Přednastaveno: NE; použít číselné hodnocení)');
@define('PLUGIN_KARMA_IMAGE_WITH_MESSAGE', 'Zobrazovat hodnotící zprávu?');
@define('PLUGIN_KARMA_IMAGE_WITH_MESSAGE_BLAHBLAH', 'Zobrazit textový požadavek na hlasování před grafickými pruhy? (nemá na pruhy žádný efekt) (Přednastaveno: ano)');
@define('PLUGIN_KARMA_IMAGE_WITH_CURR', 'Zobrazit textovou zprávu spolu se současným hodnocením?');
@define('PLUGIN_KARMA_IMAGE_WITH_CURR_BLAHBLAH', 'Zobrazovat textové informace za grafickými pruhy? (nemá na pruhy žádný efekt) (Přednastaveno: ano)');
@define('PLUGIN_KARMA_IMAGE_WITH_VISITS', 'Zobrazovat text návštěv?');
@define('PLUGIN_KARMA_IMAGE_WITH_VISITS_BLAHBLAH', 'Vložit počet návštěv i jako text? (za pruhy, nemá na pruhy žádný efekt) (Přednastaveno: ano)');
@define('PLUGIN_KARMA_PREVIEW_BG', 'Pozadí pro tabulku náhledu, níže');
@define('PLUGIN_KARMA_PREVIEW_BG_BLAHBLAH', 'Platná je jakákoliv hodnota CSS stylů; bude použita jako atribut \'background\' pro tabulku s náhledem, a to POUZE na administrativní stránce. Nemá žádný efekt na pruhy s hodnocením.');
@define('PLUGIN_KARMA_IMAGE', 'Typ hlasovacích pruhů');
@define('PLUGIN_KARMA_IMAGE_DESC', 'Vyberte soubor s obrázkem (např. diamonds.png) pro hlasování s obrázky. Vyberte \'' . PLUGIN_KARMA_STATISTICS_POINTS_NO . '\' pro hlasování pomocí textu.');
@define('PLUGIN_KARMA_NO_IMAGES', 'V adresáří img/ v pluginu nejsou žádné obrázky!');
@define('PLUGIN_KARMA_IMAGE_RATING', '%1.2f z 5');
@define('PLUGIN_KARMA_IMAGE_INT_RATING', '%d z 5');
@define('PLUGIN_KARMA_IMAGE_NONE_RATING', 'žádný');
@define('PLUGIN_KARMA_TAB_OPTIONS', 'Volby');
@define('PLUGIN_KARMA_TAB_APPEARANCE', 'Vzhled');
@define('PLUGIN_KARMA_TAB_TEXT', 'Text');
@define('PLUGIN_KARMA_DISPLAY_LOG', 'Správa Karmy');
@define('PLUGIN_KARMA_REMOVED_POINTS', '%s bodů odstraněno z příspěvku %s');
@define('PLUGIN_KARMA_APPROVED_POINTS', '%s bodů pro příspěvek %s potvrzeno');
@define('PLUGIN_KARMA_POINTS_ERROR', 'Chyba při aktualizaci bodů pro příspěvek %s!');
@define('PLUGIN_KARMA_REMOVE_ERROR', 'Chyba při odstraňování hlasu pro příspěvek %s! (Počet bodů byl nicméně aktualizován.)');
@define('PLUGIN_KARMA_UPDATE_ERROR', 'Zatím žádné hlasy pro příspěvek %s!');
@define('PLUGIN_KARMA_INVALID_INPUT', 'Nesprávné zadání!');
@define('PLUGIN_KARMA_DELETE_VOTES', 'Vymazat vybrané hlasy');
@define('PLUGIN_KARMA_APPROVE_VOTES', 'Potvrdit vybrané hlasy');
// Next lines were translated on 2011/03/09
@define('PLUGIN_KARMA_ACTIVE_REGISTERED', 'Hlasovat mohou pouze přihlášení uživatelé');
// Next lines were translated on 2012/02/17
@define('PLUGIN_KARMA_AJAX', 'Nastavení AJAXu');
@define('PLUGIN_KARMA_AJAX_BLAHBLAH', 'Má se hlasování provádět pomocí asynchronního javascriptu? Pokud je nastavené "Ano", bude se hlasování odesílat na server na pozadí stránky a výsledek bude aktualizován bez znovunačtení stránky blogu.');
@define('PLUGIN_KARMA_ALIGNMENT', 'Zarovnání pluginu');
@define('PLUGIN_KARMA_ALIGNMENT_BLAHBLAH', 'Má být plugin zarovnán doleva, na střed nebo doprava');

Some files were not shown because too many files have changed in this diff Show More