blog: comment threads
This commit is contained in:
parent
4ec0aade1d
commit
74f0e2ab10
|
@ -5,8 +5,9 @@
|
|||
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
|
||||
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||
</head>
|
||||
<?php $bodyclass="";
|
||||
if (!x($page,'aside') && !x($page,'right_aside')) $bodyclass.=" singular";
|
||||
<?php
|
||||
$bodyclass="";
|
||||
if (!x($page,'aside') && !x($page,'right_aside')) $bodyclass.=" singular";
|
||||
?>
|
||||
<body class="<?php echo $bodyclass;?>">
|
||||
<div id="page">
|
||||
|
@ -29,7 +30,7 @@ if (!x($page,'aside') && !x($page,'right_aside')) $bodyclass.=" singular";
|
|||
</div>
|
||||
</div>
|
||||
<?php if (x($page,'aside') || x($page,'right_aside')) { ?>
|
||||
<div id="secondary" class="widget-area <?php if (in_array($a->module, array('profile','photos'))) echo 'overlap'; ?>" role="complementary">
|
||||
<div id="secondary" class="widget-area <?php if (in_array($a->module, array('profile','photos','display'))) echo 'overlap'; ?>" role="complementary">
|
||||
<?php if(x($page,'aside')) echo $page['aside']; ?>
|
||||
<?php if(x($page,'right_aside')) echo $page['right_aside']; ?>
|
||||
</div>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<dl class="toolbox right">
|
||||
<dd style="{{if $visitor=none}}display: none;{{endif}}"><img id="profile-rotator" src="$baseurl/view/theme/blog/images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /></dd>
|
||||
<dd><input type="submit" id="profile-jot-submit" name="submit" value="$share" class="button" /></dd>
|
||||
<dd><a href="#" onclick="preview_post(); return false;" id="jot-preview-link" class="button">$preview</a></dd>
|
||||
{{ if $preview }}<dd><a href="#" onclick="preview_post(); return false;" id="jot-preview-link" class="button">$preview</a></dd>{{ endif }}
|
||||
</dl>
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ a.button:hover {
|
|||
background: #eee;
|
||||
}
|
||||
|
||||
footer { margin-top: 20px; } /*?*/
|
||||
|
||||
/* header */
|
||||
input#search {
|
||||
background: url("images/search.png") no-repeat scroll 5px 6px transparent;
|
||||
|
|
|
@ -11,4 +11,8 @@ $a->theme_info = array(
|
|||
|
||||
function blog_init(&$a) {
|
||||
|
||||
}
|
||||
|
||||
function blogtemplate($item) {
|
||||
return $item['template'];
|
||||
}
|
31
view/theme/blog/threaded_conversation.tpl
Normal file
31
view/theme/blog/threaded_conversation.tpl
Normal file
|
@ -0,0 +1,31 @@
|
|||
$live_update
|
||||
|
||||
{{ for $threads as $thread }}
|
||||
{{ inc $thread.template with $item=$thread }}{{ endinc }}
|
||||
{{ endfor }}
|
||||
|
||||
<div id="conversation-end"></div>
|
||||
|
||||
{{ if $dropping }}
|
||||
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems();">
|
||||
<div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
|
||||
<div id="item-delete-selected-desc" >$dropping</div>
|
||||
</div>
|
||||
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
|
||||
<div id="item-delete-selected-end"></div>
|
||||
{{ endif }}
|
||||
|
||||
<script>
|
||||
// jquery color plugin from https://raw.github.com/gist/1891361/17747b50ad87f7a59a14b4e0f38d8f3fb6a18b27/gistfile1.js
|
||||
(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={transparent:[255,255,255]}})(jQuery);
|
||||
var colWhite = {backgroundColor:'#FFFFFF'};
|
||||
var colShiny = {backgroundColor:'#FCE94F'};
|
||||
</script>
|
||||
|
||||
{{ if $mode == display }}
|
||||
<script>
|
||||
var id = window.location.pathname.split("/").pop();
|
||||
$(window).scrollTop($('#item-'+id).position().top);
|
||||
$('#item-'+id).animate(colWhite, 1000).animate(colShiny).animate(colWhite, 2000);
|
||||
</script>
|
||||
{{ endif }}
|
|
@ -1,4 +1,4 @@
|
|||
<article class="post-8 post type-post status-publish format-standard hentry category-uncategorized tag-html tag-wordpress" id="$item.id">
|
||||
<article class="post-8 post type-post status-publish format-standard hentry category-uncategorized tag-html tag-wordpress" id="item-$item.id">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><a rel="bookmark" title="Permalink" href="$item.plink.href">$item.title</a></h1>
|
||||
|
||||
|
@ -56,9 +56,69 @@
|
|||
<span class="sep"> | </span>
|
||||
{{ endif }}
|
||||
|
||||
<span class="comments-link"><a title="Comment" href="$item.plink.href">
|
||||
$item.total_comments_num $item.total_comments_text</a>
|
||||
<span class="comments-link"><a title="Comment" href="$item.plink.href">$item.total_comments_num $item.total_comments_text</a>
|
||||
</span>
|
||||
|
||||
</footer><!-- #entry-meta -->
|
||||
</article>
|
||||
</footer><!-- #entry-meta -->
|
||||
</article>
|
||||
|
||||
<div id="comments">
|
||||
<h2 id="comments-title">
|
||||
$item.total_comments_num $item.total_comments_text on “<span>$item.title</span>”
|
||||
</h2>
|
||||
<ol class="commentlist">
|
||||
|
||||
{{ for $item.children as $child }}
|
||||
{{ inc wall_thread_comment.tpl with $item=$child }}{{ endinc }}
|
||||
{{ endfor }}
|
||||
|
||||
|
||||
</ol>
|
||||
<div id="respond">
|
||||
<h3 id="reply-title">
|
||||
Leave a Reply
|
||||
<small>
|
||||
<a rel="nofollow" id="cancel-comment-reply-link" href="/?p=8#respond" style="display:none;">Cancel reply</a>
|
||||
</small>
|
||||
</h3>
|
||||
<form action="http://wp-themes.com/wp/wp-comments-post.php" method="post" id="commentform">
|
||||
<p class="comment-notes">
|
||||
Your email address will not be published. Required fields are marked
|
||||
<span class="required">*</span>
|
||||
</p>
|
||||
<p class="comment-form-author">
|
||||
<label for="author">
|
||||
Name
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
<input id="author" name="author" type="text" value="" size="30" aria-required="true">
|
||||
</p>
|
||||
<p class="comment-form-email">
|
||||
<label for="email">
|
||||
Email
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
<input id="email" name="email" type="text" value="" size="30" aria-required="true">
|
||||
</p>
|
||||
<p class="comment-form-url">
|
||||
<label for="url">Website</label>
|
||||
<input id="url" name="url" type="text" value="" size="30">
|
||||
</p>
|
||||
<p class="comment-form-comment">
|
||||
<label for="comment">Comment</label>
|
||||
<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>
|
||||
</p>
|
||||
<p class="form-allowed-tags">
|
||||
You may use these
|
||||
<abbr title="HyperText Markup Language">HTML</abbr>
|
||||
tags and attributes:
|
||||
<code><a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> </code>
|
||||
</p>
|
||||
<p class="form-submit">
|
||||
<input name="submit" type="submit" id="submit" value="Post Comment">
|
||||
<input type="hidden" name="comment_post_ID" value="8" id="comment_post_ID">
|
||||
<input type="hidden" name="comment_parent" id="comment_parent" value="0">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<!-- #respond -->
|
||||
</div>
|
||||
|
|
28
view/theme/blog/wall_thread_comment.tpl
Normal file
28
view/theme/blog/wall_thread_comment.tpl
Normal file
|
@ -0,0 +1,28 @@
|
|||
<li class="comment even thread-even depth-1" id="li-comment-2">
|
||||
<article id="comment-2" class="comment">
|
||||
<footer class="comment-meta">
|
||||
<div class="comment-author vcard">
|
||||
<img alt="" src="http://0.gravatar.com/avatar/?d=identicon&s=68" class="avatar avatar-68 photo avatar-default" height="68" width="68">
|
||||
<span class="fn">
|
||||
<a href="http://joseph.randomnetworks.com/" rel="external nofollow" class="url">Joseph Scott</a>
|
||||
</span>
|
||||
on
|
||||
<a href="http://wp-themes.com/?p=8&cpage=1#comment-2">
|
||||
<time datetime="2008-06-21T00:07:24+00:00">21 June, 2008 at 12:07 am</time>
|
||||
</a>
|
||||
<span class="says">said:</span>
|
||||
</div>
|
||||
<!-- .comment-author .vcard -->
|
||||
</footer>
|
||||
<div class="comment-content">
|
||||
<p>I never could remember more than the first few lines of that nursery rhyme.</p>
|
||||
</div>
|
||||
<div class="reply">
|
||||
</div>
|
||||
<!-- .reply -->
|
||||
</article>
|
||||
<!-- #comment-## -->
|
||||
{{ for $item.children as $child }}
|
||||
{{ inc wall_thread_comment.tpl with $item=$child }}{{ endinc }}
|
||||
{{ endfor }}
|
||||
</li>
|
Loading…
Reference in a new issue