Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-03-15 22:10:10
- NyteOwl
- Member
- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Display Comment Number
I am trying to insert the comment number for an article into the comments display.
I have gotten as far as using
<code><txp:comment_permlink><txp:comment_id /></txp:comment_permlink></code>
<br />
But the problem is the internal ID isn’t accurate, and contains leading zeros.
Can I do this without a plugin? (Using 4.0.3)
(Apologies if this has been covered elsewhere but I haven’t found it yet if it has)
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
#2 2006-03-15 22:17:30
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: Display Comment Number
I do not quite understand what you like to achieve.. however there is a tag comments_count you can use
Offline
#3 2006-03-15 22:23:41
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Display Comment Number
Please explain what you’re expecting to happen.
Alex
Offline
#4 2006-03-15 22:46:34
- NyteOwl
- Member
- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Re: Display Comment Number
Comments_count is the total number of comments though.
WHat I was liiking for was a structure something like:
Article body
Posted by xxxxx on yyyyyyyy Comment # 1
commetn body
Posted by xxxxx on yyyyyyyy Comment # 2
commetn body
Posted by xxxxx on yyyyyyyy Comment # 3
commetn body
…
It’s that last commetn number I’m trying to get.
Something similar to the way these comments are numbered: http://9rules.com/whitespace/sxsw_2006__the_year_the_legends_died.php#7586
I’m also trying to figure out the alternating shaded comment blocks, and making the author’s block a different colour, but one thing at a time :)
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
#5 2006-03-15 23:25:41
- whatbrick
- Member
- From: Texas
- Registered: 2006-03-13
- Posts: 100
Re: Display Comment Number
Something like <a href=“http://www.theguruguys.com/testimonials/customer-testimonials#comment”>this</a> is what you are looking for?
I seem to recall a plugin that someone made that would handle the alternating comment colors (including differentiating the admin comments) but for the life of me I can’t remember the whos, whats or whys of it. I never used it as I had already hacked out a plugin myself, which I’m using in the site above (along with another small plugin I made for the comment numbers).
Do not taunt the Markup Monkey!
Offline
Re: Display Comment Number
whatbrick wrote:
Something like <a href=“http://www.theguruguys.com/testimonials/customer-testimonials#comment”>this</a> is what you are looking for?
NyteOwl, if you’re trying to get the behavior of the example, the easiest way is to do that is to set “present your comments as a numbered list?” in Admin —> Prefs (under Comments) to yes, and then style that list.
Offline
#7 2006-03-15 23:59:16
- NyteOwl
- Member
- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Re: Display Comment Number
Something like this is what you are looking for?
Similar, but trying to manage without using plugins if I can.
NyteOwl, if you’re trying to get the behavior of the example, the easiest way is to do that is to set “present your comments as a numbered list?” in Admin—> Prefs (under Comments) to yes, and then style that list.
I already have the numbered list option selected but still no numbers, even with the default comments form. I may be doing something wrong but for the life of me I can’t figure out what :/
Last edited by NyteOwl (2006-03-16 00:07:26)
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
#8 2006-03-16 00:00:13
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Display Comment Number
<txp:comment_id />
links to the unique ID for each comment, which is not what you want.
See admin > preferences > Present comments as a numbered list?
You can use a plugin for more complex things.
Alex
Offline
#9 2006-03-16 17:32:36
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: Display Comment Number
@Net is your site online? any URL?
I would love to know how the guru guys customized the comments? Anybody an idea?
Offline
#10 2006-03-16 17:45:06
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Display Comment Number
Offline
#11 2006-03-16 18:07:57
- NyteOwl
- Member
- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Re: Display Comment Number
alexandra: nope not online yet. I can duplicate everything the guruguys site did with the comments except the the alternating comment colour and the comment number.
Looks like I may be stuck using a plugin after all.
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
#12 2006-03-16 19:00:29
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: Display Comment Number
@Nyte for alternating comments color you need a plugin. i usually take zem_nth which is easy to apply.
but i have no idea how to style the single ol numbers with css.
@mary thanks :)!
Offline