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_header_image()

Parameters

ColumnTypeDefaultDescription
$full false

Location

include/config_functions.php lines 1343 to 1381

Definition

 
function get_header_image($full false)
    {
    global 
$linkedheaderimgsrc$baseurl_short$baseurl$storageurl;

    if(
trim($linkedheaderimgsrc) != "")
        {
        
$header_img_src $linkedheaderimgsrc;
        if(
substr($header_img_src04) !== 'http')
            {
            
// Set via System Config page?
            
if (substr($header_img_src013) == '[storage_url]')
                {
                
// Parse and replace the storage URL
                
$header_img_src str_replace('[storage_url]'$storageurl$header_img_src);
                }
            else
                {
                
// Set via config.php
                // if image source already has the baseurl short, then remove it and add it here
                
if(substr($header_img_src01) === '/')
                    {
                    
$header_img_src substr($header_img_src1);
                    }
                
$header_img_src $baseurl_short $header_img_src;
                }

            if(
$full && substr($header_img_src01) === '/')
                {
                
$header_img_src $baseurl substr($header_img_src1);
                }
            }
        }
    else 
        {
        
$header_img_src $baseurl.'/gfx/titles/title-black.svg';
        }
        
    return 
$header_img_src;
    }

This article was last updated 4th December 2024 08:35 Europe/London time based on the source file dated 13th November 2024 15:50 Europe/London time.