Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

get_search_title()

Description

Get a display friendly name for the given search string
Takes a full searchstring of the form 'search=restypes=archive=' and
uses search_title_processing to autocreate a more informative title

Parameters

ColumnTypeDefaultDescription
$searchstring string Search string

Return

string Friendly name for search

Location

include/collections_functions.php lines 2516 to 2548

Definition

 
function get_search_title($searchstring)
    {    
    
$order_by="";
    
$sort="";
    
$offset="";
    
$k=getval("k","");

    
$search_titles=true;
    
$search_titles_searchcrumbs=true;
    
$use_refine_searchstring=true;
    
$search_titles_shortnames=false;

    global 
$lang,$userref,$baseurl,$collectiondata,$result,$display,$pagename,$collection,$userrequestmode;

    
parse_str($searchstring,$searchvars);
    if (isset(
$searchvars["archive"])){$archive=$searchvars["archive"];}else{$archive=0;}
    if (isset(
$searchvars["search"])){$search=$searchvars["search"];}else{$search="";}
    if (isset(
$searchvars["restypes"])){$restypes=$searchvars["restypes"];}else{$restypes="";}

    include 
dirname(__FILE__)."/search_title_processing.php";

    if (
$restypes!="")
        {
        
$resource_types=get_resource_types($restypes,true,false,true);
        foreach(
$resource_types as $type)
            {
            
$typenames[]=$type['name'];
            }
        
$search_title.=" [".implode(', ',$typenames)."]";
        }

    return 
str_replace(">"""strip_tags(htmlspecialchars_decode($search_title)));
    }

This article was last updated 19th March 2024 11:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.