ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Comments are still viewable even when entry is closed.

June 06, 2009 2:25pm

Subscribe [1]
  • #1 / Jun 06, 2009 2:25pm

    debbieT

    21 posts

    Hey all!

    I have a new template that displays all the comments for both my weblogs. Problem is, the comments for closed entries are still viewable.

    The comments are technically “open” but since the entry is closed, isn’t there a way to disallow them for display?

    I tried adding status=“open” to the {exp:comment:entries} tag but unless a comment is actually “closed” it will still display.

    Is there anything I can do, short of going in and editing all the comments as closed?

    Thanks!

    PS in the meantime, I will see if I can figure out an “if” statement or something.

  • #2 / Jun 06, 2009 7:00pm

    Greg Aker

    6022 posts

    Debbie:

    What Version/Build of EE are you running?  Can you show us code you are using?

    -greg

  • #3 / Jun 06, 2009 8:40pm

    debbieT

    21 posts

    Hello Greg,

    I am using the most up to date build.

    Here is the code I am using for the comments:

    {exp:comment:entries sort="desc" orderby="date" limit="19" weblog="camping|reviews" dynamic="off"}
    <h2>{title}</h2>
    <p>comment by {author} on {comment_date format="%m/%d/%Y"}<br />
    {exp:trunchtml chars="333" ending="...<a href='{comment_url_title_auto_path}/#comments'>Read More</a>"}{exp:html_strip convert="y" convert_back="none"}{comment}{/exp:html_strip}{/exp:trunchtml}<br />
    {paginate}You are browsing <strong>Recent Website Comments</strong> {current_page} of {total_pages} pages {pagination_links}{/paginate}<br />
    {/exp:comment:entries}

  • #4 / Jun 06, 2009 9:28pm

    Greg Aker

    6022 posts

    Debbie, actually at this time, it doesn’t look like that feature is currently available.  Please see this Feature Request, and feel free to add your voice to it as well.

    -greg

  • #5 / Jun 06, 2009 9:33pm

    debbieT

    21 posts

    Okay, thank you Greg. I will just go in and make sure all the closed entries have closed comments too.

    and I’ll add it to the feature request too.

    Thanks again and have a good weekend!

  • #6 / Jun 06, 2009 10:05pm

    Greg Aker

    6022 posts

    Thanks Debbie:  You have a great weekend as well.  Don’t hesitate to start a new thread if anything else comes up!


    -greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases