2k11: commentform hook

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

2k11: commentform hook

Post by Timbalu » Thu May 23, 2013 3:38 pm

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?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7020
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: 2k11: commentform hook

Post by yellowled » Thu May 23, 2013 4:45 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: commentform hook

Post by Timbalu » Thu May 23, 2013 5:00 pm

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7020
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: 2k11: commentform hook

Post by yellowled » Sat May 25, 2013 11:38 am

“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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: commentform hook

Post by Timbalu » Sat May 25, 2013 11:48 am

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:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7020
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: 2k11: commentform hook

Post by yellowled » Sat May 25, 2013 9:34 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: commentform hook

Post by Timbalu » Sun May 26, 2013 9:39 am

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}
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7020
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: 2k11: commentform hook

Post by yellowled » Sun May 26, 2013 3:31 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: commentform hook

Post by Timbalu » Sun May 26, 2013 4:51 pm

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7020
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: 2k11: commentform hook

Post by yellowled » Sun May 26, 2013 6:19 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: commentform hook

Post by Timbalu » Sun May 26, 2013 6:45 pm

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? ;-)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Post Reply