Page 1 of 1

Remove HOMEPAGE from comments?

Posted: Thu Aug 25, 2016 1:41 am
by ShorePatrol
Is there any way to remove the HOMEPAGE textbox from the comments area? This is pretty much not needed for my blog.

Thanks for any direction on this. (I'm using the TimeLine theme if that matters).

Re: Remove HOMEPAGE from comments?

Posted: Thu Aug 25, 2016 10:00 am
by yellowled
ShorePatrol wrote:Is there any way to remove the HOMEPAGE textbox from the comments area? This is pretty much not needed for my blog.

Thanks for any direction on this. (I'm using the TimeLine theme if that matters).
Well, you can remove

Code: Select all

<div class="form-group">
    <label for="serendipity_commentform_url" class="control-label">{$CONST.HOMEPAGE}</label>
    <input id="serendipity_commentform_url" class="form-control" name="serendipity[url]" type="url" value="{$commentform_url}" placeholder="http://...">
</div>
from /templates/timeline/commentform.tpl, but once s9y 2.1 gets released, that file will be overwritten and the form field will be back. You'd need to revert your changes every time s9y gets updated (unless you have copied timeline to a seperate directory to modify it anyway).

If it suffices to just hide said form element, you can add this to your /templates/timeline/user.css (which you'd need to create in case it doesn't already exists):

Code: Select all

#serendipity_comment .form-group:nth-of-type(3n+3) {
    display: none;
    visibility: hidden;
}
That might backfire if Timeline's comment form ever changes, because it just relies on the homepage field always being the third field in said form, but it's the only CSS selector that gets both label and input field.

YL