Module

Developer
Supported

Threaded Comments

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy

     

You must be logged in to post.

form: necessary to use parameters entry_id and parent_id?

Support Request

lehrerfreund
lehrerfreund

Hi,

I don’t understand
- if I have to use the parameters entry_id and parent_id. I tried the following code:

{exp:threaded_comments:form channel="{tec_my_channel}" cache="yes" refresh="200"}
  
<!-- (exp:threaded_comments:form entry_id="{segment_3}" parent_id="{segment_4}") --> 

and it works nice.

Also I don’t understand what’s the difference between entry_id and parent_id. In the commented out example above (which is from your docs) the entry_id is segment_3 - in my case that’s the url-title which defines an entry. the parent_id is segment_4 - in my case the number of the entry, also defines an entry.

Thanks for help!

Yuri Salimovskiy
# 1
Developer
Yuri Salimovskiy

The difference is, entry_id is actual ID of entry that you leave comment to
while parent_id is ID of comment that you reply to

if parent_id is omited, or set to 0, the comment will be posted as “top-level comment” otherwise it will be reply to comment with id=parent_id

If entry ID is omited, the module will try to guess entry id or url title from your URL. You need to set it only if the URL does not contain entry_id or url_title (or by some reason they are not guessed correctly by the module)

lehrerfreund
# 2
lehrerfreund

Ok, so just to make it clear:
If everything seems to work correctly I don’t need to set neither parent_id nor parent_id. Is that right?

I just want to avoid changing something 2 weeks after going live with the Threaded Comments and running into problems because parameters change ...

Yuri Salimovskiy
# 3
Developer
Yuri Salimovskiy

You need entry id only of the form does not work without it.

Parent is not needed if you use jQuery to move the form around and set it dynamically (as you mentioned in other threads)

lehrerfreund
# 4
lehrerfreund

Thanks for the clarification, Yuri!

(my case closed)

loemrntdherid1
# 5
loemrntdherid1