Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-12 12:35:43

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Recent Comments

Hi I’ve just tried the recent_comments tag, but I want it to display the comments in this fashion, for each individual comment.

<div class="home-comments-comment">
<div class="home-comments-gravatar"><a href="" title="Lorem ipsum, Jun 29">GRAVATAR</a></div>
<p><strong>Mr. Textpattern</strong> <span class="small">/ Jun 29</span><br />
on <a href="" title="Lorem ipsum, Jun 29">Lorem ipsum</a></p>
</div>

To clarify what I mean, I’m wanting to display 5 comments on my homepage, and have each comment displayed in the above structure, but I’m not sure how to do this, using Txp template tags. x

Last edited by driz (2008-09-12 13:59:49)


~ Cameron

Offline

#2 2008-09-12 12:40:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Recent Comments

The only problem i see with your code is that it needs a foreslash before images

ie. <img src="/images/gravatar.png" />


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2008-09-12 12:43:53

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Recent Comments

Why is that a problem? x

colak wrote:

The only problem i see with your code is that it needs a foreslash before images

ie. <img src="/images/gravatar.png" />

Last edited by driz (2008-09-12 13:39:59)


~ Cameron

Offline

#4 2008-09-12 13:54:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Recent Comments


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2008-09-12 13:59:14

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Recent Comments

colak wrote:

ibid

I think your confused about my q: i’m wanting to display a list of comments in that structure, but I don’t know how to do it!


~ Cameron

Offline

#6 2008-09-12 14:24:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Recent Comments

glx_gravatar should be of help.

Also check out all the comment tags in the textbook

<div class="home-comments-comment">
<div class="home-comments-gravatar"><a href="<txp:comment_web />"><txp:glx_gravatar /></a></div>
<p><strong><txp:comment_name /></strong> <span class="small"><txp:comment_time /></span><br />

not sure what you want to show with the next code…

on <a href="" title="Lorem ipsum, Jun 29">Lorem ipsum</a></p>
</div>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2008-09-12 14:28:58

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Recent Comments

on that next line, its the title of the post, check http://www.simplecandy.com/4.0/ and look where it says recent comments to see what i mean, thanks. x

OH and how do i get this to display 5 of the most recent comments? So like say display all that code 5 times. x

Last edited by driz (2008-09-12 14:39:39)


~ Cameron

Offline

#8 2008-09-12 17:10:06

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Recent Comments

Any updates on this? x


~ Cameron

Offline

#9 2008-09-12 17:48:45

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Recent Comments

I don’t know it myself, but would this plugin do what you want?

Offline

#10 2008-09-12 17:56:51

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Recent Comments

Els wrote:

I don’t know it myself, but would this plugin do what you want?

this seems like a possible fix, problem is how do i use it? their is no help file! Do i just use form=”“ with the standard tag or does it use its own :S

EDIT: I’ve figured it out! you just add form=”“ to the standard tag and it overwrites everything. No idea why this isn’t in Textpattern by default :S

Last edited by driz (2008-09-12 18:26:54)


~ Cameron

Offline

#11 2008-09-12 19:21:33

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Recent Comments

driz wrote:

No idea why this isn’t in Textpattern by default :S

Probably because there is a plugin that does it ;) Stop asking yourself why things are not in TXP by default, not everyone needs the same features and there are usually plugins to help you out :)

Offline

#12 2008-09-13 13:07:34

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Recent Comments

Els wrote:

driz wrote:

No idea why this isn’t in Textpattern by default :S

Probably because there is a plugin that does it ;) Stop asking yourself why things are not in TXP by default, not everyone needs the same features and there are usually plugins to help you out :)

Hmm I wouldn’t really call the ability to use a form with the recent_comments tag a feature, it seems something your almost gonna want to do, the whole point of Txp is that you can fully control your content, the recent_comments tag is very limiting, a simple use this form attribute should be part of the core!


~ Cameron

Offline

Board footer

Powered by FluxBB