Page 1 of 1

2k11: commentform hook

Posted: Thu May 23, 2013 3:38 pm
by Timbalu
Playing around with the 'frontend_comment' hook (eg emoticonchooser) at
https://github.com/s9y/Serendipity/blob ... rm.tpl#L38
I thought it might be better to move the hook right above or beneath the textarea, since we have serendipity_comment_s9ymarkup and serendipity_comment_emoticate Note-Blocks inbetween.

What do you think?

Re: 2k11: commentform hook

Posted: Thu May 23, 2013 4:45 pm
by yellowled
I think it deviates too much from well-known behaviour for a proposed default template.

If said deviation would be considered acceptable, I'd maybe want to move it in front of the whole comment form. My UX point of view: once I started filling out a comment form, I want to fill it out and send it, so any further info is just a distraction.

YL

Re: 2k11: commentform hook

Posted: Thu May 23, 2013 5:00 pm
by Timbalu
Well, in the backend textareas it is above since ages. That is a well known behaviour too.
I know that differs a little from commentforms... but (btw, what is a UX point? :wink: )
here in the forum it is on the right side, and would also be not nice having 2 or 3 blocks of text beween the textarea and a quick (mouse) sidejump.

Re: 2k11: commentform hook

Posted: Sat May 25, 2013 11:38 am
by yellowled
“UX point of view” – UX is user experience, usability.

The real “issue” with {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry} is that it's a “catchall hook”. It emits a lot of stuff which I sometimes would like to be able to emit in various places of the comment form. For instance, it would make sense to emit all the info boxes before the comment form, but it also emits actual form elements (like the captcha or the hidden field for spam bee, if used) which should be within the form. Some of these (like the hidden field for spam bee) can also be emitted using Smarty variables, but that needs to be configured properly in the related plugin by the end user.

YL

Re: 2k11: commentform hook

Posted: Sat May 25, 2013 11:48 am
by Timbalu
I see, that is an argument to think about. I was focussed on the emoticons drop box only...

How about setting it to top and {capture} the output, to seperate different "plogs"... :wink:

Re: 2k11: commentform hook

Posted: Sat May 25, 2013 9:34 pm
by yellowled
Timbalu wrote:How about setting it to top and {capture} the output, to seperate different "plogs"... :wink:
I have no idea what that's supposed to mean.

YL

Re: 2k11: commentform hook

Posted: Sun May 26, 2013 9:39 am
by Timbalu
It emits a lot of stuff which I sometimes would like to be able to emit in various places of the comment form.
How about setting it to top and {capture} the output, to seperate different "plogs"...
like

Code: Select all

{capture name="splithook"}{the_hook...}{/capture} ... {if $splithook == 'something'}do it{/if}
or equal...

Edit:
I once did this (without splitting) to append some output into sections tags without having them appear when empty.

Code: Select all

{capture name="pheh" assign="pluginHook_entries"}{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}{/capture}
{if !empty($pluginHook_entries)}
<section id="section_hookPlugin_entries">
  {$pluginHook_entries}
</section><!-- // "id:#section_hookPlugin_entries" end -->
{/if}

Re: 2k11: commentform hook

Posted: Sun May 26, 2013 3:31 pm
by yellowled
I might be incredibly dumb here, but that still doesn't give me the ability to split up the output of the hook, does it?

YL

Re: 2k11: commentform hook

Posted: Sun May 26, 2013 4:51 pm
by Timbalu
Well, it might, ...if you know what usually comes by... but I have to declare this is a very dirty workaround (idea)! :P

Surely better would be, if you really like to split this, to append some unique "appended by xyzPlugin" o.e. var into the eventData Stream. Which then could easily could get sortet out by the template.
That effords Plugin changes, so we would need to know, what exactly is the feature request.

Re: 2k11: commentform hook

Posted: Sun May 26, 2013 6:19 pm
by yellowled
Timbalu wrote:this is a very dirty workaround
Then it's completely out of the question for a proposed new default template.
Timbalu wrote:That effords Plugin changes, so we would need to know, what exactly is the feature request.
I don't have a feature request. You're the one who wanted to change this in the first place.

YL

Re: 2k11: commentform hook

Posted: Sun May 26, 2013 6:45 pm
by Timbalu
yellowled wrote:I don't have a feature request.
What is this
yellowled wrote:It emits a lot of stuff which I sometimes would like to be able to emit in various places of the comment form.
then? ;-)