Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-01-21 07:54:15

bashirnoori
Member
From: Afghanistan
Registered: 2012-10-02
Posts: 84

how to show message of comment on recent comments

I want to have a place that shows all the messages which is posted by users.
If possible to show username + message , that would be good.

When I use this: <txp:recent_comments label=“recent_comments” />
That’ shows username + article title
But I don’t need article title there
Any solution way please.
Thanks

Offline

#2 2013-01-21 10:04:02

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: how to show message of comment on recent comments

Have you tried something like this?

<txp:recent_comments>
	<p><small><txp:comment_name /> <txp:comment_time /> 
		<txp:comment_permlink>#</txp:comment_permlink></small></p>
	<txp:comment_message />
</txp:recent_comments>

Offline

#3 2013-01-21 11:05:40

bashirnoori
Member
From: Afghanistan
Registered: 2012-10-02
Posts: 84

Re: how to show message of comment on recent comments

good, but it shows all message, is it possible to limit it by charector ?

Offline

#4 2013-01-21 11:32:57

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

Re: how to show message of comment on recent comments

bashirnoori wrote:

good, but it shows all message, is it possible to limit it by charector ?

Following your previous post could rvm_substr come to the rescue again?

<txp:recent_comments>
	<p><small><txp:comment_name /> <txp:comment_time /> 
		<txp:comment_permlink>#</txp:comment_permlink></small></p>
	<txp:rvm_substr length="10"><txp:comment_message /></txp:rvm_substr>
</txp: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 2013-01-21 12:16:06

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: how to show message of comment on recent comments

colak wrote:

could rvm_substr come to the rescue again?

rvm_substr looks great, but couldn’t cutting a string after n characters happen in the middle of a word?

Offline

#6 2013-01-21 14:32:15

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

Re: how to show message of comment on recent comments

I thought that this is what Bashir wanted.

good, but it shows all message, is it possible to limit it by charector ?


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 2013-01-21 14:43:43

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: how to show message of comment on recent comments

colak wrote:

I thought that this is what Bashir wanted.

Sure, I’m just curious about rvm_substr features.

Offline

#8 2013-01-21 15:20:21

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: how to show message of comment on recent comments

etc wrote:

Sure, I’m just curious about rvm_substr features.

Here’s the short manual. The first sentence is quite reassuring in that regard.
Edit: I meant the “middle of a word” thing. Umm, at least I hope it doesn’t ;)

Last edited by uli (2013-01-21 15:22:04)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#9 2013-01-21 15:29:11

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: how to show message of comment on recent comments

uli wrote:

The first sentence is quite reassuring in that regard.

<txp:rvm_substr length=“8”><txp:body /></txp:rvm_substr>

will output “long str…”, assuming the body contains ‘long string’.

Yes, quite. :)

Offline

#10 2013-01-21 19:36:25

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: how to show message of comment on recent comments

etc wrote:

Yes, quite. :)

Damn, the hasty one sticks to the flypaper? I’ll have to rethink ;)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB