Disable "search for author" for centain groups

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Ideas Centre
Post Reply
User avatar
perro.bot
Registered User
Posts: 1
Joined: Wed Aug 08, 2018 8:23 am

Disable "search for author" for centain groups

Post by perro.bot » Wed Aug 08, 2018 8:44 am

Hi everyone!

I want to disable "search for author" field in Searchs. I've seen it in another forum and I think it's a good idea to prevent stalkers to look for certain users posts.

I suppose it should be done changing permissions, but I can't find a permission to do this. The only thing to disable I've found is the "search" function, that is a usefool tool in our forums, even for guests.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50326
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Disable "search for author" for centain groups

Post by stevemaury » Wed Aug 08, 2018 2:10 pm

There is also the ability to search for member's posts in their Profile.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51659
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Disable "search for author" for centain groups

Post by Brf » Wed Aug 08, 2018 2:18 pm

stevemaury wrote:
Wed Aug 08, 2018 2:10 pm
There is also the ability to search for member's posts in their Profile.
That usually is not a problem with Guests though. By default they do not have permission to see profiles.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50326
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Disable "search for author" for centain groups

Post by stevemaury » Wed Aug 08, 2018 3:15 pm

To limit Author searches to Admins, OPEN styles/prosilver/template/search_body.html

FIND:

Code: Select all

	<dl>
		<dt><label for="author">{L_SEARCH_AUTHOR}{L_COLON}</label><br /><span>{L_SEARCH_AUTHOR_EXPLAIN}</span></dt>
		<dd><input type="search" class="inputbox" name="author" id="author" size="40" title="{L_SEARCH_AUTHOR}" /></dd>
	</dl>
REPLACE WITH:

Code: Select all

<!--IF U_ACP-->
	<dl>
		<dt><label for="author">{L_SEARCH_AUTHOR}{L_COLON}</label><br /><span>{L_SEARCH_AUTHOR_EXPLAIN}</span></dt>
		<dd><input type="search" class="inputbox" name="author" id="author" size="40" title="{L_SEARCH_AUTHOR}" /></dd>
	</dl><!--ENDIF-->
Purge the cache.

If a user is sophisticated enough to create a URL like:

Code: Select all

http://localhost/phpbb322/search.php?keywords=&terms=all&author=stevemaury&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search
they can still do an Author search, but not many will figure that out.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Post Reply

Return to “Extension Requests”