HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Where are Search Content Type Defaults Set?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#76891 (In Topic #15837)
Avatar

Honoured member

A simple question, by default the search on my test site does not include "pages" as a default filter to look for. Personally I find this a rather strange, why is it not enabled by default?

So my question is how do i enable it so pages are included in search without having to enter advanced and selecting them as a valid result option?
Back to the top
 
Posted
Rating:
#76892
Avatar

Community saint

Have a look at this thread, which should give you some pointers.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#76893
Avatar

Community saint

DivinityOne-

For pages, find /public_html/DOMAIN/sources/hooks/modules/search/comcode_pag
es.php

and change this bit of code from 'false' to 'true'

Code

$info['default']=false;

You can adjust the php files in this directory accordingly. Just remember that you will need to resolve any differences during an update.

Bob
Back to the top
 
Posted
Rating:
#76894
Avatar

Community saint

BobS said

You can adjust the php files in this directory accordingly. Just remember that you will need to resolve any differences during an update.
The correct way is to copy the file to a corresponding sources_custom directory otherwise it risks being overwritten during an update.

Its easy to forget that you have custom code during an update, especially if you made the changes a long time ago, but if the code is in source_custom it will survive an update.

So copy /public_html/DOMAIN/sources/hooks/modules/search/comcode_pag
es.php to /public_html/DOMAIN/sources_custom/hooks/modules/search/comc
ode_pages.php .

You will need to create any directories that don't exist.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#76895
Avatar

Community saint

Thanks for mentioning that, temp.

I did, in fact, put my changes in the sources_custom directory as you suggest. That's why I know that I always have to check these when there is an upgrade - I get the message that any changes have been blocked by the custom code.

I think I was just so darn excited about knowing the answer to something instead of asking the question. I'll do better next time.

Bob
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: