Version 1.1-alpha1()
------------------------------------------------------------------------
+ * Added links to view an entry in reasonable places (comments / entry
+ overview) (garvinhicking)
+
* Added on-the-fly synchronizing of the Serendipity media database
with the file system (Marty, garvinhicking)
* Added config option for specifying number of entries in the RSS
feed (garvinhicking)
-
+
* Added option whether to issue the "SET NAMES" mysql command
(garvinhicking)
<tr>
<td><?php echo COMMENTS; ?>:</td>
<td><select name="serendipity[filter][perpage]">
- <?php
+ <?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>
'entry_id' => $rs['entry_id']
);
+ $entrylink = serendipity_archiveURL($comment['entry_id'], 'comments', 'serendipityHTTPPath', true) . '#c' . $comment['id'];
if (strlen($comment['fullBody']) > strlen($comment['summary']) ) {
$comment['summary'] .= ' ...';
$comment['excerpt'] = true;
$comment['fullBody'] = $comment['summary'] = nl2br(htmlspecialchars($comment['fullBody']));
}
-
+
serendipity_plugin_api::hook_event('backend_view_comment', $comment);
$class = 'serendipity_admin_list_item_' . (($i % 2 == 0 ) ? 'even' : 'uneven');
$header_class = ($comment['status'] == 'pending' ? 'serendipityAdminMsgNote' : '');
<?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 VIEW; ?>" /><span id="<?php echo $comment['id'] ?>_text"><?php echo VIEW ?></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 EDIT; ?>" /><?php echo VIEW ?></a>
<a href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=edit&serendipity[id]=<?php echo $comment['id'] ?>&serendipity[entry_id]=<?php echo $comment['entry_id'] ?>&<?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&serendipity[adminModule]=comments&serendipity[adminAction]=delete&serendipity[id]=<?php echo $comment['id'] ?>&serendipity[entry_id]=<?php echo $comment['entry_id'] ?>&<?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>
<?php echo $comment['action_more']; ?>
<?php
// Print the entries
$rows = 0;
- foreach ( $entries as $entry ) {
+ foreach ($entries as $entry) {
$rows++;
// Find out if the entry has been modified later than 30 minutes after creation
if ($entry['timestamp'] <= ($entry['last_modified'] - 60*30)) {
}
echo implode(', ', $cats);
}
+ $entry['link'] = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp']));
?>
</td>
<td align="right">
+ <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>
<a href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&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="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=delete&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>
</td>
// Save the entry, or just display a preview
$use_legacy = true;
serendipity_plugin_api::hook_event('backend_entry_iframe', $use_legacy);
-
+
if ($use_legacy) {
if ($serendipity['POST']['preview'] != 'true') {
/* We don't need an iframe to save a draft */
if (!is_numeric($entry['timestamp'])) {
$entry['timestamp'] = time();
}
-
+
if (!isset($entry['trackbacks']) || !$entry['trackbacks']) {
$entry['trackbacks'] = 0;
}
-
+
if (!isset($entry['comments']) || !$entry['comments']) {
$entry['comments'] = 0;
}
-
+
if (!isset($entry['realname']) || !$entry['realname']) {
if (!empty($serendipity['realname'])) {
$entry['realname'] = $serendipity['realname'];
$entry['realname'] = $serendipity['serendipityUser'];
}
}
-
+
$categories = (array)$entry['categories'];
$entry['categories'] = array();
foreach ($categories as $catid) {
}
$entry['categories'][] = serendipity_fetchCategoryInfo($catid);
}
-
+
if (count($entry['categories']) < 1) {
unset($entry['categories']);
}
-
+
if (isset($entry['id'])) {
$serendipity['GET']['id'] = $entry['id'];
} else {
$serendipity['GET']['id'] = 1;
}
-
+
if ($serendipity['use_iframe']) {
echo '<div class="serendipityAdminMsgSuccess">' . IFRAME_PREVIEW . '</div><br />';
serendipity_iframe_create('preview', $entry);
// it needs to be stored with the new ID.
echo '<script type="text/javascript">parent.document.forms[\'serendipityEntry\'][\'serendipity[id]\'].value = "' . $serendipity['lastSavedEntry'] . '";</script>';
}
- echo '<div class="serendipityAdminMsgSuccess">' . ENTRY_SAVED . '</div>';
+ $entrylink = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp']));
+ echo '<div class="serendipityAdminMsgSuccess">' . ENTRY_SAVED . ' (<a href="' . $entrylink . '" target="_blank">' . VIEW . '</a>)</div>';
}
echo '<br style="clear: both" />';
$cond['joins'] .= " LEFT JOIN {$serendipity['dbPrefix']}category c
ON ec.categoryid = c.categoryid";
}
-
+
switch($type) {
case 'directory':
- $sql_artifact_column = 'i.path IS NULL OR
+ $sql_artifact_column = 'i.path IS NULL OR
acl_acc.groupid IS NULL';
$sql_artifact = 'AND acl_acc.artifact_index = i.path';
break;