Is there a way to remove HOMEPAGE from comments?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
khaldrogo
Posts: 1
Joined: Mon Mar 08, 2021 10:56 am

Is there a way to remove HOMEPAGE from comments?

Post by khaldrogo » Mon Mar 08, 2021 11:00 am

Hi everybody,
Is there a way to remove the HOMEPAGE text box from the comment area? This is not necessary for my blog.
Thanks for any direction on this !!!

User avatar
onli
Regular
Posts: 2495
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Is there a way to remove HOMEPAGE from comments?

Post by onli » Tue Mar 09, 2021 8:30 am

You could edit the commentform.tpl that is used in your theme, which is most likely templates/2k11/commentform.tpl. In there is the code that generates the homepage input field, at line 20:

Code: Select all

    <div class="form_field">
        <label for="serendipity_commentform_url">{$CONST.HOMEPAGE}{if $required_fields.url}*{/if}</label>
        <input id="serendipity_commentform_url" name="serendipity[url]" type="url" value="{$commentform_url}" placeholder="{$CONST.TWOK11_PLACE_URL}"{if $required_fields.url} required{/if}>
    </div>
Change the input from type url to hidden, like this:

Code: Select all

    <div class="form_field">
        <label for="serendipity_commentform_url">{$CONST.HOMEPAGE}{if $required_fields.url}*{/if}</label>
        <input id="serendipity_commentform_url" name="serendipity[url]" type="hidden" value="{$commentform_url}" placeholder="{$CONST.TWOK11_PLACE_URL}">
    </div>
In this example code I also removed the required attribute.

merlebeals
Posts: 1
Joined: Mon Apr 26, 2021 5:53 am

Re: Is there a way to remove HOMEPAGE from comments?

Post by merlebeals » Mon Apr 26, 2021 6:21 am

Thanks for the detailed explanation

Post Reply