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.

Need help with adding comment functionality

September 18, 2007 11:58am

Subscribe [0]
  • #1 / Sep 18, 2007 11:58am

    molotovfx

    25 posts

    I’m still learning the ins and outs of EE and I’ve got the basics nailed. However, I am a complete noob when it comes to enabling comments. I’ve never done that and so I have no idea where to start. I would love it if someone knew of a walk through on how to add a comment form to your post and also how to show comments once posted.

    If anyone can point me to anything that will give me a rundown on how that stuff works I would greatly appreciate it.

  • #2 / Sep 18, 2007 12:24pm

    Robin Sowell

    13255 posts

    Let’s see- do you have a comment page up?  Should be one from the initial default install.  Let’s see what that looks like.  They may already be enabled.

    And where all do you need to enable and tweak?  For each member group- in ‘Admin- Members and Groups’ if you edit the group, you’ll see ‘Comment Posting Privileges’- so you can determine per member group whether they can comment- assuming comments are enabled.

    Then- you can enable comments on a per weblog basis- in ‘Admin- Weblog Admin- Weblog Management’- edit each weblog and under ‘Comment Posting Preferences’ you can specify the requirements for posting a comment.

    By default, they’ll be enabled.  (And you can also specify it on a per entry basis- in ‘Options’, so you may decide not to allow comments- or to set a comment expiration date- for an entry, even if commenting is allowed in the weblog.)

    But it’s likely working now- do you have a comment page up?  - see the docs on the various EE tags that are used to display comments and the comment form.

    Make sense?

  • #3 / Sep 18, 2007 12:29pm

    molotovfx

    25 posts

    Yeah, I guess my confusion comes in with adding the right code to the templates. I can find all the enable and disable stuff. I just don’t know how the code and various templates interact with each other for comments.

    Like the comments preview thing, how does that work? Do I create a duplicate template as the default post one called comment preview and instead of a form just have comment tags?

  • #4 / Sep 18, 2007 12:34pm

    Robin Sowell

    13255 posts

    You can create a second ‘preview’ template- the default install does it that way.  I generally put it on the same template out of habit.  Might go with the default templates- can find the original versions here- to start with.  But it will work either way.

    Oh- but the form needs to be on the preview page- otherwise no way to submit it!  Here’s an example preview page from the Alex Blue theme.

  • #5 / Sep 18, 2007 12:42pm

    molotovfx

    25 posts

    Ok, thanks. I’ll give these a run through.

  • #6 / Sep 18, 2007 12:53pm

    molotovfx

    25 posts

    To have the preview code on the same page I’m assuming I edit this tag:

    {exp:comment:form preview="{my_template_group}/comment_preview"}

    Do I just replace it with a reference to the same page? Would I also need additional conditionals around the submission form?

  • #7 / Sep 18, 2007 12:57pm

    Robin Sowell

    13255 posts

    Exactly- just have it point to the template you’re currently on, rather than the preview on.  And no- no conditionals needed- just stick:

    {exp:comment:preview}
    {comment}
    {/exp:comment:preview}

    ABOVE the comment form tag- not inside it.  Not inside any other tags, to be a bit more specific.

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

ExpressionEngine News!

#eecms, #events, #releases