Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-08-08 03:44:42
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
r1643-1644: simplify the comments input and preview tags
This might affect some sites, particularly if you’ve customized comments_display, or are doing clever things with comment previews.
Basically, the old code had all sorts of convaluted logic to do with automagically displaying a comment preview in place of the <txp:comments /> tag, sometimes, when all sorts of things happen in the right order and the moon is full.
The new code is much simpler. <txp:comments_form /> will display a comment preview just before the input form, if you haven’t already used a <txp:comments_preview /> tag to do it somewhere else. (You can use <txp:comments_form show_preview=0 /> to turn off the auto-preview if it’s causing a problem).
The end result should be effectively the same in most cases. The comment preview might jump to the end of the page rather than the start, depending on how things were configured before. But everything should still work; more importantly, it should be less confusing and comment tags should work much better when placed elsewhere on a page.
Alex
Offline
Re: r1643-1644: simplify the comments input and preview tags
I just updated SVN this morning and I get this at the top of the page on a comment preview:
<code> tag_error <txp:comments_form preview=“1” /> -> Textpattern Notice: unknown_attribute: preview on line 571</code>
I can deduce what is going on, the comment forms were updated to accomodate the new comments code. Since these new forms are in txpsql.php, the only way to get to them would be to install a fresh copy on my laptop and copy/paste.
Moving forward, as far as testing goes, can the default forms be in text form in the setup or update directories so it’s easier to update test sites?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: r1643-1644: simplify the comments input and preview tags
The only thing you need to do is remove the attribute from the tag. That’s all.
Last edited by Sencer (2006-08-08 14:01:00)
Offline
Re: r1643-1644: simplify the comments input and preview tags
Removed the attribute, no error at the top of the page, thanks.
Now I have another problem, on this test site, there’s only one article with a test comment. If I click comments on this article it says: commenting closed for this article – but comments are toggled on.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: r1643-1644: simplify the comments input and preview tags
Setting aside the warning message mentioned by Bert in comment 2 above, my customised comments forms are working well: preview comes where I expect it; the form itself, and the links to it are doing what they are supposed to do.
(ok, for Zem, maybe it is because it is nearly full moon here :-), although we won’t see much of it, due to the dance of the 3 typhoons in the North Western quarter of the Pacific).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1643-1644: simplify the comments input and preview tags
hcgtv wrote:
Now I have another problem, on this test site, there’s only one article with a test comment. If I click comments on this article it says: commenting closed for this article – but comments are toggled on.
Nevermind, it was the Disabled after – it was at the default of 6 weeks – my bad.
Which brings me to another quandry, in the articles tab, it says comments are on even if the disabled date has been reached and in actuality comments are not on anymore for that article.
Last edited by hcgtv (2006-08-08 15:28:40)
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#7 2006-08-09 00:23:13
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: r1643-1644: simplify the comments input and preview tags
Which brings me to another quandry, in the articles tab, it says comments are on even if the disabled date has been reached and in actuality comments are not on anymore for that article.
I’ll look into fixing that. :)
Offline
Re: r1643-1644: simplify the comments input and preview tags
Mary wrote:
I’ll look into fixing that. :)
r1648 working great, thanks
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline