phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Hide a username from search.


 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 544
Location: North West UK


flag
PostPosted: Sat Jan 24, 2009 6:29 pm 
Post subject: Hide a username from search.

I have been asked if there is a mod that will stop a given username from producing results if it is entered into the search (for author) or (keywords) and also stop it showing in the memberlist if a username search is done on there.

Thanks
Jim

Edit
It is only the search for username accessed via the memberlist that is still producing a result. I guess he has added the username to the stopwords list to solve the first part.
Just the memberlist search needs to not find specific users in the memberlist. I guess he may well want it so that the user is a member but invisible - more so than just selecting to be hidden.
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Tue Jan 27, 2009 2:57 pm 
Post subject: Re: Hide a username from search.

So to be clear... what you are looking for is a MOD that will prevent the username search of "drathbun" in either the keywords field or the author field from getting any matches? The keywords search can, as you suggest, be handled by adding the specific username(s) to the stopwords list. To prevent someone from searching for a specific username would require an alteration to the search.php code.

If you are okay with hard-coding a list of names (as opposed to being able to enter them from the ACP, or even making it a user profile option) then I can probably give you some code later this evening.

_________________
phpBBDoctor Blog
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 544
Location: North West UK


flag
PostPosted: Tue Jan 27, 2009 4:15 pm 
Post subject: Re: Hide a username from search.

drathbun wrote:
So to be clear... what you are looking for is a MOD that will prevent the username search of "drathbun" in either the keywords field or the author field from getting any matches? The keywords search can, as you suggest, be handled by adding the specific username(s) to the stopwords list. To prevent someone from searching for a specific username would require an alteration to the search.php code.

If you are okay with hard-coding a list of names (as opposed to being able to enter them from the ACP, or even making it a user profile option) then I can probably give you some code later this evening.


That would be great Dave. As you will have gathered it is not for me.
He figured out the stopwords trick for the search of posts but for some reason (not sure why) he wants to make the username unsearchable from the memberlist or anywhere else not covered by the stopwords.

Thanks
Jim
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Tue Jan 27, 2009 5:43 pm 
Post subject: Re: Hide a username from search.

Basically what you would need to do is locate the author search code in search.php and do a quick check on a list of "unsearchable" names. For a long-term solution it would be nice to have an admin panel option to enter names, or even allow users to set the bit on / off in their profile. For a quick and dirty solution you can check an array.

Any idea what sort of message they want to issue? It could drop straight through to the "no posts found" standard message, or it could be more appropriate like "Selected user does not allow searches" or something like that. The code would also have to check wildcard matches as well, so if "drathbun" was on the disallow list, then "drath*" should be allowed to execute but "drathbun" should not be returned as a match.

_________________
phpBBDoctor Blog
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 544
Location: North West UK


flag
PostPosted: Tue Jan 27, 2009 6:24 pm 
Post subject: Re: Hide a username from search.

I will ask what sort of message Dave and post back when I get a reply.

Thanks
Jim
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0110 seconds using 15 queries. (SQL 0.0023 Parse 0.0003 Other 0.0084)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo