Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Comment time not working
If you go to this page
notice that it’s stuck on “Said a few seconds ago” for all of the comments instead of saying how long ago they were posted. My comment form looks like this
<code><div class=“comment”>
<div class=“author”>
<txp:comment_permlink><?php
$ccount++;
if($ccount < 10){
echo “0$ccount”;
} else {
echo $ccount;
}
?></txp:comment_permlink> <span><em><txp:comment_name /></em> Said <txp:comment_time /></span>
</div>
<p><txp:message /></p>
</div>
</code>
Last edited by davej (2005-11-01 23:40:46)
Offline
#2 2005-11-01 22:34:40
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Comment time not working
See admin > preferences > Comments date format.
Alex
Offline
Re: Comment time not working
Take another read through my question.
I am happy with Comment date format, it’s just that it always reads “a few seconds ago”, even after a couple of hours.
Offline
#4 2005-11-02 02:53:44
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Comment time not working
davej, you have to wrap PHP in the Textpattern PHP tag. Also, I think you may not be able to nest your tags that way. Compare these two, and see what happens.
Nested:
bc..<div class=“comment”>
<div class=“author”> <txp:comment_permlink><txp:php>$ccount++; echo ($ccount < 10) ? “0$ccount” : $ccount;</txp:php></txp:comment_permlink> <span><em><txp:comment_name /></em> Said <txp:comment_time /></span> </div>
<p><txp:message /></p>
</div>
Not nested:
bc..<div class=“comment”>
<div class=“author”> <txp:comment_permlink>#</txp:comment_permlink> <txp:php>$ccount++; echo ($ccount < 10) ? “0$ccount” : $ccount;</txp:php> <span><em><txp:comment_name /></em> Said <txp:comment_time /></span> </div>
<p><txp:message /></p>
</div>
Last edited by Mary (2005-11-02 02:54:08)
Offline
#5 2005-12-08 23:25:58
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Comment time not working
Having the same problem at http://www.aquestionablefaith.com/
The comment stick on “a few seconds ago” UNTIL the next day or so, and then they jump to 15+ hours ago… not sure where the actual limit is, but I know after 2-3 hours, they’re still marked as “a few seconds ago”…
My comments form is pretty simple:
<code>
<txp:message />
<div id=“comment-footer”>
<txp:comment_name /> | <txp:comment_time />
</div>
</code>
any ideas?
Offline
#6 2005-12-09 16:30:18
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Comment time not working
is this a known bug?
Offline
#7 2005-12-10 17:59:38
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Comment time not working
davej: I figured out my problem… my Time Zone field in the Admin settings was off by one hour… I tested by by displaying the actual date and time of comments and noticed it was one hour off. I fixed it, and now the “hours/days since” display seems to be working perfect. Hope that helps…
-stirman
Offline
Re: Comment time not working
I would like to have the comment day and the time separated by a pipe (|) symbol instead of a comma. How can I make this work?
Diagnosis:
Version Textpattern: 4.0.3 (r1188)
PHP-Version: 4.4.1
Hosting: all-inkl.com
Offline
Pages: 1