Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
Hey there, I am trying to add an extra field to the comments so i tried this :

comment-form.inc:
Code: Select all
<p class="comment-input">
<cms:input type="text" name="author_title" size="52" tabindex="2" required="1" />
<label for="function"><small>Funcţie *</small></label>
</p>


...and in my page :

Code: Select all
<h2 class="title"><cms:show author_title /></h2>


...but this won't work, could you please point me in the right direction ?
Alin, please see 'Extended Comments' section in the following thread - viewtopic.php?f=5&t=8581.
KK wrote: Alin, please see 'Extended Comments' section in the following thread - viewtopic.php?f=5&t=8581.


Well, here's a tricky one, I added the extended folder to my addons and added the following to my page:

Code: Select all
<?php require_once( 'admin/addons/extended/extended-comments.php' ); ?>


The thing is, my page turns out blank...
Are you sure you are using Couch version 1.4.5 RC1 or later?
KK wrote: Are you sure you are using Couch version 1.4.5 RC1 or later?


:lol: Now I am, but it's still not working.

Does this work on non-clonable pages?

Like i said, I have the comment-form.inc with this extended section:

Code: Select all
<p class="comment-input">
  <cms:input type="text" name="author_title" size="52" tabindex="2" required="1" style="padding:5px;"/>
  <label for="function"><small>Funcţie *</small></label>
</p>


The commentable [ book.php ] page with the template:

Code: Select all
<cms:template title='Recenzii' commentable='1' hidden='1' order='11'>
</cms:template>


and this where want the author_title to appear :

Code: Select all
<h2 class="title"><cms:show author_title /></h2>


...now, if i add comment_masterpage='book.php' to my template, i get the message that book.php is not clonable...
I'll assume 'book.php' is the template that'll have comments. It can be non-clonable.
Let us assume 'my_comments.php' is the template we'll use to extend those comments by defining new fields. This template will need to be clonable.

With those assumptions, following is how 'books.php' cms:template declaration should look like -
Code: Select all
<cms:template commentable='1'  comment_masterpage='my_comments.php' >
</cms:template>

The 'my_comments.php' template will have definitions of the new fields showing up in comments.

Are you sure your setup is aligned to what is described above?
KK wrote: I'll assume 'book.php' is the template that'll have comments. It can be non-clonable.
Let us assume 'my_comments.php' is the template we'll use to extend those comments by defining new fields. This template will need to be clonable.

With those assumptions, following is how 'books.php' cms:template declaration should look like -
Code: Select all
<cms:template commentable='1'  comment_masterpage='my_comments.php' >
</cms:template>

The 'my_comments.php' template will have definitions of the new fields showing up in comments.

Are you sure your setup is aligned to what is described above?


That's what I couldn't get my hands on, I did not create another page/template to hold the extended comments...damn. It's working fine now. Sorry and Thanks.
Hi,
I tried to put comments in a non-cloning template and everything worked fine.
I do not use extended comments.

However, I see there is a problem with the title (k_comment_page_title) display in the admin panel's comment page -
all comments show the wrong title - default-page-for- ...
All other parameters are displayed correctly - date, comment content, ip address
The problem is only with the title of the template - again I say it is not cloning.

Do I make a mistake or is it a bug?

Thanks
8 posts Page 1 of 1