Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-16 19:04:51

blueprint
Member
From: Netherlands
Registered: 2006-03-05
Posts: 43
Website

change default behavior of <txp:popup_comments>

I’m trying to implement comments in popup style on my site; this is working quite well. Except for one thing: I’m using the tag <txp:popup_comments /> in the form popup_comments. This displays a standard phrase in english, something like this: Comments for (article title) and then the comments that are already there. (and then of course the comment form)

My question is: can I change this; for example: display a different text, not showing the comments that are already made on the article.

(Edited: added @ ‘s to show the tag. -Els)

Last edited by els (2006-06-16 19:14:30)

Offline

#2 2006-06-16 19:22:54

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

Re: change default behavior of <txp:popup_comments>

I don’t even know <txp:popup_comments />… it’s not in TextBook? But to start with you could have a look at this FAQ.
The text is stored in the language table, you can either change it there, or in en-gb.txt and re-install that manually.

Edit: that was apparently wrong, thanks Mary.

Last edited by els (2006-06-16 20:56:54)

Offline

#3 2006-06-16 19:38:09

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: change default behavior of <txp:popup_comments>

…display a different text…

You’d need to hack comments.php, which I wouldn’t recommend.

…not showing the comments that are already made on the article.

You’d need to modify your “comments_display” form.

Offline

#4 2006-06-17 11:44:03

blueprint
Member
From: Netherlands
Registered: 2006-03-05
Posts: 43
Website

Re: change default behavior of <txp:popup_comments>

Thanks Mary and Els for your quick reply and suggestions. I took some time this morning to find out how it works; and with your suggestions I solved my problem.

The tag <txp:popup_comments /> is not in the TextBook, but it is used in the default popup_comments form that comes with the installation of TXP.

The tag <txp:popup_comments /> inserts the content of the form comments_display at the position of the tag.
So, functionally, it is the same as <txp:output_form form="comments_display" />; but this doesn’t work in popup_comments; it generates all kind of strange errors.

So, in order to modify the comments popup to my needs I have to modify the form comments_display. (And that is business as usual).

It might be a suggestion to add this tag to the TextBook.

Offline

Board footer

Powered by FluxBB