Forums  ›  General  ›  General discussions
 

Keyword Search

 

 

Someone asked me for some custom code changes in search.  There are a lot of things that uses the /inc/classes/ChWsbSearch.php as one navigate around the site.  Enter https://my-niffy-cheetah-site.tld/member-name in the browser URL bar and ChWsbSearch.php is called.  I can't make changes in ChWsbSearch.php so that means perhaps cloning the class.

Perhaps you could show me where a search is called when a member name is entered on the url. I don't see it.


In ChWsbSearch.php after line 466 I put a var_dump() so I could see the contents of the return searches.  I went to look at a profile page and the var_dump was still in place and I got a dump of the array instead of the profile page.  Well, that makes sense, in order to populate the member's profile page, you have to search the database and get the content.  So that is why I was thinking of cloning the class; I want my keyword search to be separate from normal operation of the site.

 

Someone asked me for some custom code changes in search.  There are a lot of things that uses the /inc/classes/ChWsbSearch.php as one navigate around the site.  Enter https://my-niffy-cheetah-site.tld/member-name in the browser URL bar and ChWsbSearch.php is called.  I can't make changes in ChWsbSearch.php so that means perhaps cloning the class.

Perhaps you could show me where a search is called when a member name is entered on the url. I don't see it.


 

To achieve that, there needs to be a search box in Blogs specifically for that purpose: "Search Blogs".

Actually John, there is a search in blogs, videos, etc.  What it does is takes you to the keyword search page with all elements deselected except for the particular area you want to search.

Someone asked me for some custom code changes in search.  There are a lot of things that uses the /inc/classes/ChWsbSearch.php as one navigate around the site.  Enter https://my-niffy-cheetah-site.tld/member-name in the browser URL bar and ChWsbSearch.php is called.  I can't make changes in ChWsbSearch.php so that means perhaps cloning the class.

I guess I have a different slant on some of these things. If you wish to do a limited search for items, such as stuff in a blog, the best and obvious place to do that would be going to the blog and searching there. To achieve that, there needs to be a search box in Blogs specifically for that purpose: "Search Blogs". This is what happens in Facebook groups and as much as I detest Facebook, the group search does what it's meant to do.

These are suppose to be sticky buttons.  Normal action by users is to push a button to select it and in the case of a sticky button, it stays pushed until you push it again to release it.  Back when I built HTML websites I would create two sets of icons for buttons; one would be the pressed state of the button and the other would be the released state.

However, if we are going back to the checkbox then the discussion is mute on buttons; and I don't know why Boonex moved to buttons; they often had screwy ideas on UI.

The only additional thing I would like to see then, is the ability to toggle the state of the checkboxes.  The default is all selected.  If one has a large list of areas on one's site, having to click a dozen checkboxes to deselect areas just to search profiles only is something members complain about; or they only want to search on blogs looking for a particular blog post.

They are not if you look at it from a different point of view. The initial color of the button is the cue.

By default all buttons are enabled. Bright color indicating enabled state or in the case of a check box, checked state. When clicking the button it switches to a dark color. Disabled state or unchecked.

The fact that they are buttons and not check boxes is the confusing part. I have noted it. Ticket in https://github.com/CheetahWSB/Cheetah/issues/133

I will most likely switch them to check boxes. They should have been check boxes anyway. Even on mobile they would be fine. Check boxes can be styled and enlarged so there is no reason not to use them instead of buttons.

I've always questioned the value of the Keyword search. The general search box does a good job at finding most keywords throughout the site except for parts of the profile. For it to do all the profile I think you have to make all fields searchable via the Profile Fields Builder. (Top right hand sub menu) I only have a few fields searchable because I really haven't seen the need for all of them  . . . yet.

I use Anton's Searchable Fields which is excellent. If you have a field entitled Books and someone enters War and Peace, by clicking the title you get a list of every member interested in the same book.

The search box would probably do the same thing but in a different way. Before it will work however, I guess you must make Books a Searchable Field in Profile Fields Builder.

Then you could remove the Keyword Search block altogether.

These are fine tuning things I still have to do.

As I play with this it is obvious that the button selection is backwards; this was coded by the Boonex developers so it doesn't surprise me.  Pressing the button should select that area of the site to search; pressing again should return the button to not selecting that area of the site to search; this is the natural way for selections to work and is how most users would expect it to work.  I don't really care if all the buttons are pressed by default or not pressed by default as long as there is an easy way to toggle the button state of all buttons (a reset button).

The keyword search page comes up with a bunch of buttons and no text to explain.  I don't really like the idea of the buttons in this particular application;  I am guessing this was done for easier use on a mobile device such as a smartphone.  Outside of no text to explain what I am suppose to do with the buttons, is that there is no way to push all of the buttons at once; in usage it appears that I push a button to not search in that particular area of the site.  As it stands now, I have to push each button one by one to deselect that area of the site for searching; for example, I only want to search through profiles for a particular word.