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.


How can I change the default settings for which content types to search?

Login / Search

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

Community saint

I can't seem to find where these are set but I'd like to make some changes to which content types get searched by default.

Thanks for your help.

Bob
Back to the top
 
Posted
Rating:
#70726
Avatar

Community saint

The search parameters are defined when the block is created, so just insert a new main_search block with your desired parameters.

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:
#70742
Avatar

Community saint

Thanks, temp.

What I really wanted to know is how to make some of the entries "checked" by default. SOme already are, but I want to add some others as well.

Thanks for any help.

Bob
Back to the top
 
Posted
Rating:
#70753
Avatar

Community saint

This appears be a little tricky and might be a reasonable feature request for usability reasons (*grin*, unless of course I've completely missed a setting for this which is entirely possible).

The default checkbox behaviour appears to be drawn from files located in sources/hooks/modules/search. For each item in the search list there is a corresponding file. In each file is a line

Code

$info['default']=EITHER_TRUE_or_FALSE;
located near the top of each file in a function entitled

Code

function info()
True or false denotes whether the checkbox is checked when the search form is loaded. For each item you want to modify, you can either mod that file or copy it over to the corresponding location in sources_custom. Change the default behaviour to what you'd like. To have it:

Checked:

Code

$info['default']=true;

Unchecked:

Code

$info['default']=false;

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#70755
Avatar

Community saint

Once again, SoccerDad to the rescue!

I'll get to modding the files but it sure would be nice to be able to choose the default status when choosing the items to display on a per-item basis.

Bob
Back to the top
 
Posted
Rating:
#70757
Avatar

Community saint

Good one, SD!

I was hunting this one down when 'she who must be obeyed' decreed that, "Dinner is served."

At which point I scurried away from the computer …

 :$

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:
#70758
Avatar

Community saint

That was tedious but easy.

One question: How do you remove "Galleries and Images from the list?

This is the block code:

Code

[block title="Search JulianRitterCentral" input_fields="content=Search for" limit_to="ocf_within_topic,news,calendar,ocf_posts,catalogue_entries,polls,comcode_pages,iotds,catalogue_categories" zone="_SEARCH" sort="relevance" days="-1" direction="DESC" only_titles="0" only_search_meta="0" boolean_search="0" conjunctive_operator="AND"]main_search[/block]

Galleries and Images are not listed in the limit_to parameter.

I suspect Chris or someone from ocPortal needs to weigh in on this one.

Thanks for the help.

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

Quick reply   Contract

Your name:
Your message: