commentform > reply to

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
benson
Regular
Posts: 11
Joined: Sun Jan 21, 2007 9:57 pm

commentform > reply to

Post by benson » Thu Jan 25, 2007 12:31 am

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

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: commentform > reply to

Post by garvinhicking » Thu Jan 25, 2007 12:36 pm

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

benson
Regular
Posts: 11
Joined: Sun Jan 21, 2007 9:57 pm

Post by benson » Thu Jan 25, 2007 1:43 pm

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.

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Thu Jan 25, 2007 2:28 pm

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Post Reply