Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-23 04:44:12

darrenemo
Member
From: Ca
Registered: 2005-07-30
Posts: 29
Website

Leaving Comments on home page article

I’m having a problem leaving comments on the homepage article (http://www.ohreal.com/deb/)

when I fill out the comment form and click on preview, it takes me to ohreal.com/deb/#cpreview—but there is no comment preview!

any ideas?

Last edited by darrenemo (2006-02-23 04:46:08)

Offline

#2 2006-02-23 04:49:40

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

Re: Leaving Comments on home page article

Make sure you have the following somewhere in your form:

<txp:if_comments_preview>
    <txp:comments_preview />
</txp:if_comments_preview>

Offline

#3 2006-02-23 04:54:09

darrenemo
Member
From: Ca
Registered: 2005-07-30
Posts: 29
Website

Re: Leaving Comments on home page article

okayi tried that—and it showed the preview but no form.

You see, when im at an article in the /archives/ section (not http://www.ohreal.com/deb/) the preview and submit works perfectly.

does it matter if the comment form is an ‘article’ form?

Last edited by darrenemo (2006-02-23 04:57:23)

Offline

#4 2006-02-23 05:13:08

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

Re: Leaving Comments on home page article

The form type really doesn’t matter, the reason it is there is for the tag generators. :)

There’s no real right or wrong way to display the info. It will probably help you to show you a stripped-down copy of my comments_display form. I’ve removed much of the superflous info, and also added tabs so you can more easily see how the conditionals work.

For mine, I only want the stuff to show up if comments exist or are allowed, but you may want to display a message otherwise. I also have my comments preview using a separate form (otherwise it uses the comments form) so I can style a preview slightly differently, but still within my ordered list.

<txp:if_comments>

    <h2>Discussion</h2>

    <ol id="comments">
    <txp:comments class="" wraptag="" break="" />
    <txp:comments_preview form="comment_preview" />
    </ol>

    <txp:if_comments_allowed>
        <txp:comments_form preview="1" />
    </txp:if_comments_allowed>

<txp:else />

    <txp:if_comments_allowed>

        <h2>Discussion</h2>

        <txp:if_comments_preview>

            <ol id="comments">
                <txp:comments_preview form="comment_preview" />
            </ol>

        <txp:else />

            <p>No one has responded yet. Be the first, start a fashion.</p>

        </txp:if_comments_preview>

        <txp:comments_form preview="1" />

    </txp:if_comments_allowed>

</txp:if_comments>

Offline

#5 2006-02-23 05:24:16

darrenemo
Member
From: Ca
Registered: 2005-07-30
Posts: 29
Website

Re: Leaving Comments on home page article

Looks good, Mary. But I don’t think rewriting my comments form will help much—

The thing is, I can make a comment preview and submit as long as i’m viewing an article in the archive section. i.e., http://www.ohreal.com/deb/archives/some-article

but when I try to submit a comment or preview it from an article on the home page (http://www.ohreal.com/deb/)
the preview nor the submit works. Even if I take the article on the homepage and access it via the /archives/ portion of the site, I can comment.

I think it might have to do with how my default page and my archives page is displaying things, but they are exactly the same as far as calling up the forms. I’m not sure what to do next. Thanks for your timely replies, Mary.

Offline

#6 2006-02-23 05:27:03

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

Re: Leaving Comments on home page article

Oh, now I understand what you mean. That’s because you just can’t, in Textpattern you can only comment on the article’s page itself, or use popup comments.

Offline

#7 2006-02-23 05:29:27

darrenemo
Member
From: Ca
Registered: 2005-07-30
Posts: 29
Website

Re: Leaving Comments on home page article

Oh, another thing. my code for calling up the comments is different for my default pages and archive pages.

for my archive page its
<code><txp:output_form form=“sw_comments” /></code>

but for my default page its
<code><txp:article form=“sw_comments” /></code>

When it’s like its, my default page (ohreal.com/deb/) tells me commenting is closed. But it’s not set like that in the article.

So since I wasn’t getting the comment form to show up, I tried sticking the comments form from my /archives page in my default page, and the comments form showed up—but there is no submitting or previewing. Understand what i’m saying?

Offline

#8 2006-02-23 05:30:30

darrenemo
Member
From: Ca
Registered: 2005-07-30
Posts: 29
Website

Re: Leaving Comments on home page article

ahh. got it. thanks mary

Offline

Board footer

Powered by FluxBB