How can I remove the web page entry field from the Comments form?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
User avatar
virtualsky
Posts: 11
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

How can I remove the web page entry field from the Comments form?

Post by virtualsky » Thu Mar 18, 2021 1:00 am

I would like to remove the Web entry field from my Comments submission form on my blog. I think it would help with people posting fake/generic comments just so they can create link to their website. Anyone know how I can do this?

Tongara
Posts: 65
Joined: Wed Jan 22, 2020 11:09 am
Location: Birmingham, UK
Contact:

Re: How can I remove the web page entry field from the Comments form?

Post by Tongara » Thu Mar 18, 2021 3:26 pm

Very simple to do.

Go to the root of your FP install directory and locate "fp-interface/sharedtpls", and open the file called "comment-form.tpl".

Simply find the following code and remove it:

Code: Select all

		<p>
		{if isset($error) && isset($error.url) && !empty($error.url)}
			{assign var=class value="field-error"}
		{else}
			{assign var=class value=""}
		{/if}
		{if isset($values) && isset($values.url) && !empty($values.url)}
			{assign var=urlvalue value=$values.url}
		{else}
			{assign var=urlvalue value=""}
		{/if}
		<input type="text" class="{$class}" name="url" id="url" value="{$urlvalue|wp_specialchars:1|default:$cookie.url}" />
		<label class="textlabel" for="url">{$lang.comments.www}</label>
		</p>
Then save/upload your file to the same location. Done!

Before:
Image

After:
Image

User avatar
virtualsky
Posts: 11
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Re: How can I remove the web page entry field from the Comments form?

Post by virtualsky » Thu Mar 18, 2021 5:02 pm

Thank you so much! I'm off to make my changes. :D

User avatar
virtualsky
Posts: 11
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Re: How can I remove the web page entry field from the Comments form?

Post by virtualsky » Fri Mar 19, 2021 12:06 am

My Comment-Form.tpl looked a little differently, but I remove the URL section and got the same results. So thanks for pointing me in the right direction!

Code: Select all

<div id="comment-userdata">
	
		<p>
		<input type="text" {$error.name|notempty:'class="field-error"'} name="name" id="name" value="{$values.name|wp_specialchars:1|default:$cookie.name}" />
		<label class="textlabel" for="name">{$lang.comments.name}</label>
		</p>
		
		<p>
		<input type="text" {$error.email|notempty:'class="field-error"'} name="email" id="email" value="{$values.email|wp_specialchars:1|default:$cookie.email}" />
		<label class="textlabel" for="email">{$lang.comments.email}</label>
		</p>
		
		<p>
		<input type="text" {$error.url|notempty:'class="field-error"'} name="url" id="url" value="{$values.url|wp_specialchars:1|default:$cookie.url}" />
		<label class="textlabel" for="url">{$lang.comments.www}</label>
		</p>
		
		{* do action *}
		{comment_form}
		
	</div>

Tongara
Posts: 65
Joined: Wed Jan 22, 2020 11:09 am
Location: Birmingham, UK
Contact:

Re: How can I remove the web page entry field from the Comments form?

Post by Tongara » Fri Mar 19, 2021 2:10 am

virtualsky wrote: Fri Mar 19, 2021 12:06 am My Comment-Form.tpl looked a little differently, but I remove the URL section and got the same results. So thanks for pointing me in the right direction!

Code: Select all

<div id="comment-userdata">
	
		<p>
		<input type="text" {$error.name|notempty:'class="field-error"'} name="name" id="name" value="{$values.name|wp_specialchars:1|default:$cookie.name}" />
		<label class="textlabel" for="name">{$lang.comments.name}</label>
		</p>
		
		<p>
		<input type="text" {$error.email|notempty:'class="field-error"'} name="email" id="email" value="{$values.email|wp_specialchars:1|default:$cookie.email}" />
		<label class="textlabel" for="email">{$lang.comments.email}</label>
		</p>
		
		<p>
		<input type="text" {$error.url|notempty:'class="field-error"'} name="url" id="url" value="{$values.url|wp_specialchars:1|default:$cookie.url}" />
		<label class="textlabel" for="url">{$lang.comments.www}</label>
		</p>
		
		{* do action *}
		{comment_form}
		
	</div>
Yeah, I think my version is the absolute latest from the "master" on github, so it might be a bit different to whatever version you're using, which may mean you have to do it again when you upgrade. But hey, at least you know where it is now!

laborix
Posts: 45
Joined: Sat Feb 16, 2019 3:51 pm

Re: How can I remove the web page entry field from the Comments form?

Post by laborix » Fri Mar 19, 2021 4:47 pm

virtualsky wrote: Thu Mar 18, 2021 1:00 am.. posting fake/generic comments just so they can create link to their website. Anyone know how I can do this?
You can also activate the QSpam plugin and add some words like

...
href
http
https
www
...

and so on. The QSpam plugin has some quirks, but you can do it with a little testing :)

User avatar
virtualsky
Posts: 11
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Re: How can I remove the web page entry field from the Comments form?

Post by virtualsky » Fri Mar 19, 2021 5:14 pm

laborix wrote: Fri Mar 19, 2021 4:47 pm You can also activate the QSpam plugin and add some words
Yes! Thanks for the extra tip. :D I actually do use the QSpam filter and it seems to work well. At least, I'm not getting spam comments with hyperlinks in them. I've noticed now that some are showing up with a generic comment, like "this is a great article and should shared..." or something like that. Then they post the link to the service they're trying to advertise in the Website field. Sneaky buggers.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests