]> git.quilime.com - plog.git/commitdiff
added comments comments
authorGabriel Dunne <gdunne@quilime.com>
Fri, 11 Nov 2011 12:33:48 +0000 (18:03 +0530)
committerGabriel Dunne <gdunne@quilime.com>
Fri, 11 Nov 2011 12:33:48 +0000 (18:03 +0530)
comments/categori1/cat_2/hello_comments/1320927226.json [deleted file]
css/comments.css
lib/model.php
templates/comments.html.tpl

diff --git a/comments/categori1/cat_2/hello_comments/1320927226.json b/comments/categori1/cat_2/hello_comments/1320927226.json
deleted file mode 100644 (file)
index 4278222..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{"name":"","www":"","timestamp":"1320927226","comment":"this is a test comment"}
\ No newline at end of file
index 6fac0a8b2d88569dde1069ff05435991f3670ead..f45764c3fd90c3cdb8cecae61877c20e7f7cd760 100644 (file)
@@ -1,4 +1,4 @@
-/* comments.css */
+/* comments */
 
 .comments {
     margin-top:50px;
        color:#900;
 }
 .comments .comment {
-       color:#aaa;
+
     margin:20px 0;
 }
 .comments .comment .name {
-       font-style:italic;
-    color:#ccc;
+    font-style:italic;
+    color:#aaa;
 }
 .comments .comment_form {
     margin-top:40px;
index c8910bfd9df0ad4ba8da773d7b8d02d345f3ac55..e30822dee152ee21766dc4efe855cef08af7f471 100644 (file)
@@ -81,10 +81,8 @@ class Model
        }
 
        function process_post_request( &$entry ) {
-
                if ($entry['comments']) 
                        $entry['comments']->process_post_request();
-                       
        }
 
        function has_config()
index a1655988c118a00258aad08fd6d24b1026a2490e..f4459d19ba85a44eb9c0f7bfb6bbb53e6e465596 100644 (file)
@@ -7,8 +7,8 @@
                
                <? foreach($entry['comments']->comments as $comment) : ?>
                <div class="comment">
-                       <?=$comment['comment'];?>
-                       <div class="name">posted by <?=$comment['name'];?> at <?=date("g:i a,  M d Y", $comment['timestamp'])?></div>
+                       <?=Markdown($comment['comment']);?>
+                       <div class="name"><?=$comment['name'];?>, <?=approximate_time(date('U') - $comment['timestamp'])?> ago</div>
                </div>
                <? endforeach; ?>
 
@@ -17,8 +17,8 @@
        <div class="comment_form">
 
     <form action="" method="post">
-    <input type="text" name="name" /> <label for="name">name</label>  <br />
-    <input type="text" name="www" /> <label for="www">www (optional)</label>  <br />
+    <input type="text" name="name" /><label for="name">name</label>  <br />
+    <input type="text" name="www" /><label for="www">www (optional)</label>  <br />
     <textarea name="comment"></textarea>
     <br />