Page 1 of 1

commentform > reply to

Posted: Thu Jan 25, 2007 12:31 am
by benson
hi there! i've been looking of this thing in the past post but noone ask this.

i want to make just the logged users to be able to make a comment 'threaded'. i've try many thing but none seems to work

1_
i edited the commentform.tpl

from this:

Code: Select all

<tr>
	<td><label for="serendipity_replyTo">{$CONST.IN_REPLY_TO}</label></td>
	<td>{$commentform_replyTo}</td>
</tr>
to this:

Code: Select all

{if $entry.is_entry_owner}
	<tr>
		<td><label for="serendipity_replyTo">{$CONST.IN_REPLY_TO}</label></td>
		<td>{$commentform_replyTo}</td>
	</tr>
{/if}
result:

The Reply to field didnt appear either if im logged or not

2_
In the entries.tpl i try with two diferents commentform.tpl files

commentform.tpl is the original file

commentformpeople.tpl is a file without the <tr></tr> of the 'reply to' field

entry.tpl:

Code: Select all

{if $entry.is_entry_owner}
	{$COMMENTFORM}	
{else}					
	{$COMMENTFORMPEOPLE}
{/if}

config.inc.php:

Code: Select all

serendipity_smarty_fetch('COMMENTFORMPEOPLE', 'commentformpeople.tpl');
result:
WORKS! the field didnt appear if im not logged, but when i try to make a comment i got this after sumbit:

Your comment could not be added because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.

3_
a little reserch take me to this:

{serendipity_showCommentForm}

so i add it on entries.tpl

{serendipity_showCommentForm entry=$entry.id}

result:
Warning: Smarty error: serendipity_smarty_showcommentform: missing 'id' or 'entry' parameter in /home/xxx/public_html/blog/bundled-libs/Smarty/libs/Smarty.class.php on line 1095

Re: commentform > reply to

Posted: Thu Jan 25, 2007 12:36 pm
by garvinhicking
Hi!

The {$entry} variable is not available within the scope of commentform.tpl. But {$commentform_entry} is.

So your first solution should provide teh results you're looking for with this code:

Code: Select all

{if $commentform_entry.is_entry_owner}
	<tr>
		<td><label for="serendipity_replyTo">{$CONST.IN_REPLY_TO}</label></td>
		<td>{$commentform_replyTo}</td>
	</tr>
{/if}
HTH,
Garvin

Posted: Thu Jan 25, 2007 1:43 pm
by benson
Thanks Garvin! its working now.

Just another question out of the subject...
Where i can make suggestion about the design/interface of the admin area?
There are some parts that are dificult to understand. i mean yes i can understand everything and i know were to find what i want but, if i were doing a comission work for someone that has a little experience on computer/internet/blogs there are some wierd things going on.

:? dont know if was the best example, but yes ive found some things dificult to understand for someone without experience.

Posted: Thu Jan 25, 2007 2:28 pm
by garvinhicking
Hi!
benson wrote:Thanks Garvin! its working now.
Great to hear that! :)
Just another question out of the subject...
Where i can make suggestion about the design/interface of the admin area?
There are some parts that are dificult to understand. i mean yes i can understand everything and i know were to find what i want but, if i were doing a comission work for someone that has a little experience on computer/internet/blogs there are some wierd things going on.

:? dont know if was the best example, but yes ive found some things dificult to understand for someone without experience.
The forums here are the best place to do that. I think "General Discussion" would fit that the best.

Currently there is a interface and usability designer working on the layout of the serendipity entry posting interface and we hope to improve it in the next time. Any input and feedback on that is most welcome.

Best regards,
Garvin