Dashboard and option tweaks

git-svn-id: http://svn.automattic.com/wordpress/trunk@2192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-02-01 09:52:36 +00:00
parent 66aa2aad8a
commit b5a43a4b77
4 changed files with 48 additions and 5 deletions

View File

@ -84,6 +84,23 @@ if (0 < $numcats) $numcats = number_format($numcats);
<p>There are currently <?php echo $numposts ?> <a href="edit.php" title="posts">posts</a> and <?php echo $numcomms ?> <a href="edit-comments.php" title="Comments">comments</a>, contained within <?php echo $numcats ?> <a href="categories.php" title="categories">categories</a>.</p>
</div>
<?php
$rss = @fetch_rss('http://feedster.com/links.php?url='. trailingslashit(get_option('home')) .'&type=rss&limit=6');
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<div>
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://feedster.com/links.php?url=<?php echo trailingslashit(get_option('home')); ?>"><?php _e('More'); ?> &raquo;</a></cite></h3>
<ul>
<?php
$rss->items = array_slice($rss->items, 0, 6);
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 } ?>
</div>
<h2><?php _e('Dashboard'); ?></h2>
@ -94,15 +111,36 @@ if ( $rss ) {
?>
<h3>WordPress Development Blog</h3>
<?php
$rss->items = array_slice($rss->items, 0, 4);
$rss->items = array_slice($rss->items, 0, 3);
foreach ($rss->items as $item ) {
?>
<h4><a href='<?php echo $item['link']; ?>'><?php echo wp_specialchars($item['title']); ?></a> &#8212; <?php echo human_time_diff( strtotime($item['pubdate'], time() ) ); ?> <?php _e('ago'); ?></h4>
<h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> &#8212; <?php echo human_time_diff( strtotime($item['pubdate'], time() ) ); ?> <?php _e('ago'); ?></h4>
<p><?php echo $item['description']; ?></p>
<?php
}
}
?>
<?php
$rss = @fetch_rss('http://planet.wordpress.org/feed/');
//var_dump($rss);
if ( $rss ) {
?>
<h3><?php _e('Other WordPress News'); ?> <a href="http://planet.wordpress.org/"><?php _e('more'); ?> &raquo;</a></h3>
<ul>
<?php
$rss->items = array_slice($rss->items, 0, 20);
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>
<?php
}
?>
<br clear="all" />
</div>
<?php

View File

@ -72,7 +72,7 @@ CREATE TABLE $wpdb->options (
option_name varchar(64) NOT NULL default '',
option_can_override enum('Y','N') NOT NULL default 'Y',
option_type int(11) NOT NULL default '1',
option_value text NOT NULL,
option_value longtext NOT NULL,
option_width int(11) NOT NULL default '20',
option_height int(11) NOT NULL default '8',
option_description tinytext NOT NULL,

View File

@ -505,7 +505,12 @@ textarea, input, select {
#zeitgeist h3 {
border-bottom: 1px solid #ccc;
font-size: 16px;
margin: 1em 0;
margin: 1em 0 0;
}
#zeitgeist h3 cite {
font-size: 12px;
font-style: normal;
}
#zeitgeist li, #zeitgeist p {

View File

@ -598,7 +598,7 @@ function init () {
}
if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
define('MAGPIE_FETCH_TIME_OUT', 5); // 5 second timeout
define('MAGPIE_FETCH_TIME_OUT', 2); // 2 second timeout
}
// use gzip encoding to fetch rss files if supported?