function drawarchives()
{
?>
+ <div id="cattags">
+ <h3>Etichete</h3>
+ <?php wp_tag_cloud('number=42&smallest=0.6&largest=1.4&unit=em&format=flat'); ?>
+ </div>
<div id="date">
<h3>Categorii</h3>
<ul class="categories">
<?php
require("archives-draw.php");
require("main-draw.php");
+require("recent-draw.php");
function draw_index()
{
?>
wp_list_bookmarks('show_images=0&title_before=<h3>&title_after=</h3>&show_description=1&link_after=<br />&category=12&categorize=0&title_li=');
break;
case "archives":
- drawmain();
drawarchives();
break;
case "home":
drawmain();
break;
+ case "recent":
+ drawrecent();
+ break;
default:
echo "Wait, what?";
}
--- /dev/null
+<?php
+function drawrecent()
+{
+?>
+ <h3>Comentarii</h3>
+
+ <?php $comments = get_comments('status=approve&number=15&type=comment'); ?>
+ <ul id="recentComments">
+ <?php foreach ($comments as $comment) : ?>
+ <li id="shortComment" >
+ <a href="<?php echo get_comment_link($comment->comment_ID,'');?>"><?php echo $comment->comment_author; ?></a>:
+ <?php echo wp_html_excerpt($comment->comment_content, 72); ?>...
+ </li>
+ <?php endforeach;?>
+ </ul>
+
+ <h3>Articole</h3>
+
+ <?php query_posts('cat=&showposts=11'); ?>
+ <ul id="recentPosts">
+
+ <?php while (have_posts()) : the_post(); ?>
+
+ <li>
+ <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
+ <div class="postDate"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_date('F j, Y') ?></abbr></div>
+ </li>
+
+ <?php endwhile; ?>
+
+ <p></p>
+ </ul>
+
+<?php
+}
+?>
--- /dev/null
+<?php
+/*
+ * Template name: recent
+ */
+?>
+<?php require("header.php"); ?>
+<?php require("draw.php");
+ draw("recent");
+?>
#subtitle {color: #301; font-size:0.9em;font-weight:bold;}
#container {width:768px; margin:2em auto;}
+#shortComment {color: #888;}
#header #description {margin-top:-1.4em;}
#header li {display:inline; margin:0 0.5em 0 0;}
#content {margin-top:4em; text-align:justify; text-justify:newspaper;}