Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 2536 to 2567

Definition

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

    
$search_titles=true;
    
$search_titles_searchcrumbs=true;
    
$use_refine_searchstring=true;

    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 
__DIR__."/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 12th December 2024 20:35 Europe/London time based on the source file dated 12th December 2024 10:55 Europe/London time.