Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2010-01-21 00:16:46

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: wet_recent_comments: Context sensitive recent comments list

You can use another plugin rvm_substr to limit comment length by character, unfortunately not by words, but you can add “…” at the end to make it look good. I think the default txp:recent_comments is not context sensitive, right?

Offline

#26 2010-04-12 22:26:09

sereal
Member
From: Indonesia
Registered: 2010-02-18
Posts: 55

Re: wet_recent_comments: Context sensitive recent comments list

hi wet,

I use your plugin on my site, but it seems I got a little problem here,

WRC is working fine on a Home Page, but everytime I go into sections, it shows nothing

I don’t know why this happen

any idea ?

thanks


$(mydocument).notyetready(function() {});
dowebsitesneedtolookexactlythesameineverybrowser ?

Offline

#27 2010-06-23 08:18:40

M_i
Member
Registered: 2006-03-05
Posts: 122

Re: wet_recent_comments: Context sensitive recent comments list

Is there a way to limit the comments to only those on posts that are visible (ie, live or sticky)?

I only want to display the comment if the parent post is visible on the site. I noticed that when I changed a post’s status to ‘hidden’, its comments were still listed by wet_recent_comments, and thereby creating broken links.

Of course I could also hide/delete the comments, but sometimes I’m not the one taking a post offline, and I think that’d be one step too many for most of my users.

Any help would be much appreciated!

Offline

#28 2010-06-27 12:07:02

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

Re: wet_recent_comments: Context sensitive recent comments list

Is there a way to hack the plugin so as to make it context insensitive? That is: to present the latest comment(s) no matter what page we are on.


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

Offline

#29 2010-06-27 14:13:15

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

Re: wet_recent_comments: Context sensitive recent comments list

Hi Yiannis, isn’t that what it already does?

When wet_recent_comments is used in a page template, comments are taken from all articles, while in an article form comments are specifically chosen from the ones concerning the current article.

Offline

#30 2010-06-27 15:36:04

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

Re: wet_recent_comments: Context sensitive recent comments list

Els wrote:

Hi Yiannis, isn’t that what it already does?

HI Els,

No, the plugin is context sensitive… From the help:

wet_recent_comments is context sensitive: When wet_recent_comments is used in a page template, comments are taken from all articles, while in an article form comments are specifically chosen from the ones concerning the current article.

this is how I am using it (localhost):

<txp:if_article_id id="37">
<ul class="exhibitions_comments" id="exhibitions_comments"> 
<txp:smd_gallery category="exhibitions" limit="7" sort="random">
<li><txp:image id="{id}" /><p><em>{caption}</em></p><p style="text-align:right;">{alt}</p></li>
</txp:smd_gallery>
</ul>
<txp:else />
<txp:wet_recent_comments limit="1" showcomment="yes" maxwords="100" striptags="yes" dateformat="default" class="clear"/>
</txp:if_article_id>

the plugin works as expected when in article list but NOT in an individual page… but I guess this is because of the context.


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

Offline

#31 2010-06-27 16:14:27

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

Re: wet_recent_comments: Context sensitive recent comments list

Ah yes, I hadn’t understood that you meant in individual article context. Here’s a wild guess: what happens if you wrap the wet_recent_comments tag in article_custom tags?

Offline

#32 2010-06-27 17:02:01

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

Re: wet_recent_comments: Context sensitive recent comments list

Els wrote:

Ah yes, I hadn’t understood that you meant in individual article context. Here’s a wild guess: what happens if you wrap the wet_recent_comments tag in article_custom tags?

Hi Els

nope. doesn’t do it:(

How could I doubt the <txp:godess />. My bad! It does work:

Here’s the final code if anyone wants it:

<txp:if_article_id id="37">
<ul class="exhibitions_comments" id="exhibitions_comments"> 
<txp:smd_gallery category="exhibitions" limit="7" sort="random">
<li><txp:image id="{id}" /><p><em>{caption}</em></p><p style="text-align:right;">{alt}</p></li>
</txp:smd_gallery>
</ul>
<txp:else />
<txp:article_custom id="37"> <txp:hide>Not really what I wanted but it works as it is where most of the comments come from anyway</txp:hide>
<txp:wet_recent_comments limit="1" showcomment="yes" maxwords="100" striptags="yes" dateformat="default" class="clear"/>
</txp:article_custom>
</txp:if_article_id>

Last edited by colak (2010-06-27 17:24:04)


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

Offline

#33 2010-06-27 19:55:56

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

Re: wet_recent_comments: Context sensitive recent comments list

But if you leave out the id attribute, doesn’t it show comments from all articles?

Offline

#34 2010-06-28 05:45:18

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

Re: wet_recent_comments: Context sensitive recent comments list

Els wrote:

But if you leave out the id attribute, doesn’t it show comments from all articles?

no that’s where it becomes context sensitive. So if I am in article id 300, it shows the comments from that.


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

Offline

#35 2010-06-28 06:39:21

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

Re: wet_recent_comments: Context sensitive recent comments list

Ah, that’s a pity. But you might be able to do it with the core txp tag and another plugin:

<txp:recent_comments limit="3" wraptag="ul" break="li">
<txp:comment_name />: <txp:rvm_substr length="500"><txp:comment_message /></txp:rvm_substr>
</txp:recent_comments>

Though it doesn’t break off at the end of the word, and you may need yet another plugin to remove the <p> tags…

Offline

#36 2010-07-04 17:42:13

fantasmo
Member
Registered: 2010-05-05
Posts: 40

Re: wet_recent_comments: Context sensitive recent comments list

Hi,

I made some changes to wet_recent_comments, I deleted the part in the code, which shows the title, because I only wanted the comment and the authors name.

Looking at my index page and the category pages it worked perfect…but now I realized, when I click an article to see the single article, my recent comments area on the site shows only the comment for THIS article and if the article has no comments it shows no comment at all.

That’s strange…why doesn’t it show all recent comments in the single article view. PS: My recent comments are in the sidebar, and are always based on the same code.

Tag-Code:
<txp:wet_recent_comments limit="5" showcomment="yes" maxwords="25" striptags="yes" />

Plugin-Code the part were I made some changes:
$out[] = $comments_date.$message.'<a href="'.permlinkurl_id($ID).'#c'.$discussid.'">'.'<span>says</span>'.$name.'</a>';

EDIT:
I did a second test…It shows not all recent comments even if I leave the plugin php code as is.
Is this really how the plugin in is supposed to be? How can I have ALL recent comments even on article pages?

Last edited by fantasmo (2010-07-04 19:37:15)

Offline

Board footer

Powered by FluxBB