1
0

comments.inc.php - truncate author, email and url like referrer on admin comments page; add new class for pending comments header, BP admin now shows yellow background with red border for pending comments header matching Grischa's previous contribution of a red border for comment content below the header.

This commit is contained in:
Don Chambers
2007-09-18 16:06:04 +00:00
parent cce490abb3
commit 4b2575819e
3 changed files with 18 additions and 11 deletions

View File

@@ -398,11 +398,11 @@ foreach ($sql as $rs) {
if ($comment['status'] == 'pending') { if ($comment['status'] == 'pending') {
$class .= ' serendipity_admin_comment_pending'; $class .= ' serendipity_admin_comment_pending';
} }
$header_class = ($comment['status'] == 'pending' ? 'serendipityAdminMsgNote' : ''); $header_class = ($comment['status'] == 'pending' ? 'serendipityAdminMsgNote serendipity_admin_comment_pending_header' : '');
?> ?>
<tr> <tr>
<td class="<?php echo $header_class; ?>"> <td class="<?php echo $header_class; ?>">
<?php if ($header_class=='serendipityAdminMsgNote') { ?> <?php if ($header_class=='serendipityAdminMsgNote serendipity_admin_comment_pending_header') { ?>
<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="" /> <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 }?> <?php }?>
<a name="c<?php echo $comment['id'] ?>"></a> <a name="c<?php echo $comment['id'] ?>"></a>
@@ -414,14 +414,14 @@ foreach ($sql as $rs) {
<table width="100%" cellspacing="0" cellpadding="3" border="0"> <table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr> <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 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($comment['author']) . $comment['action_author']; ?></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>: <td><strong><?php echo EMAIL ?></strong>:
<?php <?php
if ( empty($comment['email']) ) { if ( empty($comment['email']) ) {
echo 'N/A'; echo 'N/A';
} else { } else {
?> ?>
<a href="mailto:<?php echo htmlspecialchars($comment['email']) ?>"><?php echo htmlspecialchars($comment['email']) ?></a> <a href="mailto:<?php echo htmlspecialchars($comment['email']) ?>" title="<?php echo htmlspecialchars($comment['email']) ?>"><?php echo htmlspecialchars(serendipity_truncateString($comment['email'],30)) ?></a>
<?php } ?> <?php } ?>
<?php echo $comment['action_email']; ?> <?php echo $comment['action_email']; ?>
</td> </td>
@@ -443,7 +443,7 @@ foreach ($sql as $rs) {
echo 'N/A'; echo 'N/A';
} else { } else {
?> ?>
<a href="<?php echo htmlspecialchars($comment['url']) ?>" target="_blank"><?php echo htmlspecialchars($comment['url']) ?></a> <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 } ?>
<?php echo $comment['action_url']; ?> <?php echo $comment['action_url']; ?>
</td> </td>
@@ -456,7 +456,7 @@ foreach ($sql as $rs) {
echo 'N/A'; echo 'N/A';
} else { } else {
?> ?>
<a href="<?php echo htmlspecialchars($comment['referer']) ?>" title="<?php echo htmlspecialchars($comment['referer']) ?>"><?php echo htmlspecialchars(serendipity_truncateString($comment['referer'],30)) ?></a> <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 } ?>
<?php echo $comment['action_referer']; ?> <?php echo $comment['action_referer']; ?>
</td> </td>

View File

@@ -379,6 +379,12 @@ ul.serendipitySideBarMenuMain .serendipitySideBarMenuFoot {
border: 2px solid #FF0000; border: 2px solid #FF0000;
} }
.serendipity_admin_comment_pending_header{
background: #FFFF9D;
border: 2px solid #FF0000;
border-bottom: 0;
}
/* new input classes available in s9y v1.2 */ /* new input classes available in s9y v1.2 */
.input_checkbox, .input_radio, .input_file, .input_textbox, .input_button, label, select, textarea{ .input_checkbox, .input_radio, .input_file, .input_textbox, .input_button, label, select, textarea{
font: 100% Verdana, Arial, Helvetica, sans-serif; font: 100% Verdana, Arial, Helvetica, sans-serif;
@@ -546,8 +552,3 @@ span.serendipityTemplateSelectName {
line-height: 30px; line-height: 30px;
padding: 0; padding: 0;
} }
/* Pending comments in the admins comment list */
.serendipity_admin_comment_pending {
border: 2px solid #FF0000;
}

View File

@@ -382,6 +382,12 @@ ul.serendipitySideBarMenuMain .serendipitySideBarMenuFoot {
border: 2px solid #FF0000; border: 2px solid #FF0000;
} }
.serendipity_admin_comment_pending_header{
background: #FFFF9D;
border: 2px solid #FF0000;
border-bottom: 0;
}
/* new input classes available in s9y v1.2 */ /* new input classes available in s9y v1.2 */
.input_checkbox, .input_radio, .input_file, .input_textbox, .input_button, label, select, textarea{ .input_checkbox, .input_radio, .input_file, .input_textbox, .input_button, label, select, textarea{
font: 100% Verdana, Arial, Helvetica, sans-serif; font: 100% Verdana, Arial, Helvetica, sans-serif;