Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Search functionality
Avatar
Amanda Aitken
Member
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2014 - 1:22 pm

Hello,

I'm just trying out the search functionality in my new forum, and it seems that the titles of topics are not being "scanned" for the keywords searched for.

In other words, there is a post with the title "Justin is here" in the forum, and searching for "Justin" does not bring up that topic in the search results.

Is there a way to change this so that it's not just the body of the post that is "scanned" for keywords searched for using the search functionality?

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 6, 2014 - 1:36 pm

Is this using the full 'Advanced Search' set of optional criteria?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Amanda Aitken
Member
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2014 - 1:47 pm

Ahh - I see what you mean. It works as long as I use the advanced search and indicate that I want to search topic titles, too.

 

Is there a way to set the forum so that it automatically searches topic titles in addition to the body of posts?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 6, 2014 - 3:24 pm

Yes indeed, it means a small edit to one of the display templates. In this case the spHead.php template of the SP theme you are using (in the /templates folder). If you locate the section that starts with the  comment:

# == Search FORM - OBJECT DEFINITION

And go to the bottom of that definition block you will see the entry named 'searchIncludeDef' which is by default, set to 1. You would need to change the 1 to a 3 as it says in the comment beside it.

The reason this is not the default is that there is a resource and performance hit performing the content and titles search. But if you forum is not too large or bust=y this probably will not be that noticeable.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/)

andy-signature.png
YELLOW
SWORDFISH
Avatar
Amanda Aitken
Member
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2014 - 8:42 pm

Thank you! I'm trying to find the "templates" folder inside the simple-press folder in my "plugins" folder, but am not having any luck. Would you mind directing me?

Thanks!

Avatar
Amanda Aitken
Member
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2014 - 8:43 pm

Nevermind - found it! Thanks so much! :)

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2014 - 9:36 pm

thanks for the update... did you make your own theme as suggested?

Avatar
Amanda Aitken
Member
Free Members
sp_UserOfflineSmall Offline
Mar 7, 2014 - 5:31 pm

I didn't, because I'm in a bit of a rush! But I'll look into it!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 7, 2014 - 9:47 pm

until you do, just be advised, if you update any of our themes, your changes will be lost...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625