add recent stuff page
authorLucian Mogoșanu <lucian.mogosanu@gmail.com>
Sat, 3 Mar 2012 22:53:04 +0000 (00:53 +0200)
committerLucian Mogoșanu <lucian.mogosanu@gmail.com>
Sat, 3 Mar 2012 22:53:04 +0000 (00:53 +0200)
archives-draw.php
draw.php
recent-draw.php [new file with mode: 0644]
recent.php [new file with mode: 0644]
style.css

index 0aacd1b..db4301c 100644 (file)
@@ -2,6 +2,10 @@
 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">
index 87512f6..7fd6fd8 100644 (file)
--- a/draw.php
+++ b/draw.php
@@ -1,6 +1,7 @@
 <?php
 require("archives-draw.php");
 require("main-draw.php");
+require("recent-draw.php");
 function draw_index()
 {
 ?>
@@ -69,12 +70,14 @@ function draw($what)
 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?";
                }
diff --git a/recent-draw.php b/recent-draw.php
new file mode 100644 (file)
index 0000000..9c5f016
--- /dev/null
@@ -0,0 +1,36 @@
+<?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
+}
+?>
diff --git a/recent.php b/recent.php
new file mode 100644 (file)
index 0000000..5f0aed4
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+/*
+ * Template name: recent
+ */
+?>
+<?php require("header.php"); ?>
+<?php require("draw.php");
+       draw("recent");
+?>
index 021c108..2ddc9c1 100644 (file)
--- a/style.css
+++ b/style.css
@@ -44,6 +44,7 @@ h1,h2,h3,h4,h5,h6 {clear:both;}
 
 #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;}