Help - Search - Members - Calendar
Full Version: How Do You Number Your Comments?
Movable Type Community Forum > Additional Resources > Tips and Tricks
mashby
I've searched the forums as well as Google and I can't seem to find an answer to this question, so I thought I'd throw it out to the collective brain trust of the MT forums. smile.gif

How do sites such as Asterisk and others number their comments?

It seems like such a small thing, but I'd like to add that feature to my weblog and I can't seem to find any place that describes how to do it.

Thanks in advance!
byte AliBaba@KOR
CODE
<MTIfNonZero tag="MTEntryCommentCount">
<?php $ct_count=0; ?>
<MTComments>
No. <?php  echo ++$ct_count; ?>
<$MTCommentBody$>
...
</MTComments>


I dont know exactly what method that site used.
But in my case, I used php script.

Do you know php?
That site also use php.

Maybe your server supports php.
Then you have to change the setting, File extension for archive files in Preference menu to php.
mashby
byte AliBaba,

Thank you for the quick reply! My site is running PHP as well, but I modified the .htaccess file so that I can use a .html extension and still use PHP. smile.gif

With the script that you placed in your post, are you using any plugins for this to work? I'm not familar with the "MTIfNonZero" tag. Otherwise, I think I follow everything else in the script.

Thanks again!
TweezerMan
You shouldn't need php to number the comments - just the MTCommentOrderNumber tag:
CODE
<p>Comments</p>

<MTComments>
<p><$MTCommentOrderNumber$>. <$MTCommentAuthorLink show_email="0"$> <MTCommentAuthorIdentity> said:</p>

<$MTCommentBody$>

<p class="posted">Posted on <$MTCommentDate$></p>
</MTComments>
mashby
David,

Wow. Who know it was so easy? Well, you did, but I sure as heck didn't!

Thanks for the insightful help!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.