Clean up plugins and dashboard

git-svn-id: https://develop.svn.wordpress.org/trunk@2759 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-08-07 10:45:06 +00:00
parent 304419a5d7
commit 87a2dccccf
3 changed files with 63 additions and 50 deletions

View File

@ -8,8 +8,56 @@ $today = current_time('mysql', 1);
?>
<div class="wrap">
<h2><?php _e('Dashboard'); ?></h2>
<div id="zeitgeist">
<h2><?php _e('Latest Activity'); ?></h2>
<?php
$rss = @fetch_rss('http://feeds.technorati.com/cosmos/rss/?url='. trailingslashit(get_option('home')) .'&partner=wordpress');
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<div id="incominglinks">
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/cosmos/search.html?url=<?php echo trailingslashit(get_option('home')); ?>&amp;partner=wordpress"><?php _e('More'); ?> &raquo;</a></cite></h3>
<ul>
<?php
$rss->items = array_slice($rss->items, 0, 10);
foreach ($rss->items as $item ) {
?>
<li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wp_specialchars($item['title']); ?></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
<?php
if ( $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5") ) :
?>
<div>
<h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">&raquo;</a></h3>
<?php
if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) :
?>
<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> &raquo;</a></strong></p>
<?php endif; ?>
</div>
<ul>
<?php
if ( $comments ) {
foreach ($comments as $comment) {
echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>');
edit_comment_link(__("Edit"), ' <small>(', ')</small>');
echo '</li>';
}
}
?>
</ul>
<?php endif; ?>
<?php
if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) :
?>
@ -46,31 +94,6 @@ foreach ($scheduled as $post) {
</div>
<?php endif; ?>
<?php
if ( $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5") ) :
?>
<div>
<h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">&raquo;</a></h3>
<?php
if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) :
?>
<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> &raquo;</a></strong></p>
<?php endif; ?>
</div>
<?php endif; ?>
<ul>
<?php
foreach ($comments as $comment) {
echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>');
edit_comment_link(__("Edit"), ' <small>(', ')</small>');
echo '</li>';
}
?>
</ul>
<div>
<h3><?php _e('Blog Stats'); ?></h3>
<?php
@ -86,27 +109,9 @@ if (0 < $numcats) $numcats = number_format($numcats);
<p><?php printf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>, contained within %5$s <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p>
</div>
<?php
$rss = @fetch_rss('http://feeds.technorati.com/cosmos/rss/?url='. trailingslashit(get_option('home')) .'&partner=wordpress');
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<div id="incominglinks">
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/cosmos/search.html?url=<?php echo trailingslashit(get_option('home')); ?>&amp;partner=wordpress"><?php _e('More'); ?> &raquo;</a></cite></h3>
<ul>
<?php
$rss->items = array_slice($rss->items, 0, 10);
foreach ($rss->items as $item ) {
?>
<li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wp_specialchars($item['title']); ?></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
<?php do_action('activity_box_end'); ?>
</div>
<h2><?php _e('Dashboard'); ?></h2>
<p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p>
<?php
$rss = @fetch_rss('http://wordpress.org/development/feed/');

View File

@ -60,7 +60,7 @@ foreach ($check_plugins as $check_plugin) {
<div class="wrap">
<h2><?php _e('Plugin Management'); ?></h2>
<p><?php _e('Plugins are files you usually download separately from WordPress that add functionality. To install a plugin you generally just need to put the plugin file into your <code>wp-content/plugins</code> directory. Once a plugin is installed, you may activate it or deactivate it here. If something goes wrong with a plugin and you can&#8217;t use WordPress, delete that plugin from the <code>wp-content/plugins</code> directory and it will be automatically deactivated.'); ?></p>
<p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p>
<?php
if ( get_settings('active_plugins') )
@ -76,7 +76,6 @@ if (empty($plugins)) {
<tr>
<th><?php _e('Plugin'); ?></th>
<th><?php _e('Version'); ?></th>
<th><?php _e('Author'); ?></th>
<th><?php _e('Description'); ?></th>
<th><?php _e('Action'); ?></th>
</tr>
@ -96,11 +95,10 @@ if (empty($plugins)) {
if ($style != '') $style = 'class="' . $style . '"';
echo "
<tr $style>
<td class=\"name\">{$plugin_data['Title']}</td>
<td class=\"vers\">{$plugin_data['Version']}</td>
<td class=\"auth\">{$plugin_data['Author']}</td>
<td class=\"desc\">{$plugin_data['Description']}</td>
<td class=\"togl\">$action</td>
<td class='name'>{$plugin_data['Title']}</td>
<td class='vers'>{$plugin_data['Version']}</td>
<td class='desc'>{$plugin_data['Description']} <cite>By {$plugin_data['Author']}.</cite></td>
<td class='togl'>$action</td>
</tr>";
}
?>
@ -110,6 +108,8 @@ if (empty($plugins)) {
}
?>
<p><?php _e('If something goes wrong with a plugin and you can&#8217;t use WordPress, delete or rename that file in the <code>wp-content/plugins</code> directory and it will be automatically deactivated.'); ?></p>
<h2><?php _e('Get More Plugins'); ?></h2>
<p><?php _e('You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>. To install a plugin you generally just need to upload the plugin file into your <code>wp-content/plugins</code> directory. Once a plugin is uploaded, you may activate it here.'); ?></p>

View File

@ -290,6 +290,10 @@ textarea, input, select {
clear: both;
}
table .vers, table .name {
text-align: center;
}
#adminmenu {
background: #6da6d1;
border-top: 3px solid #448abd;
@ -573,6 +577,10 @@ textarea, input, select {
border-bottom: none;
}
#zeitgeist h2 {
margin-top: .4em;
}
#zeitgeist h3 {
border-bottom: 1px solid #ccc;
font-size: 16px;