Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

parse_dashtile_link()

Parameters

ColumnTypeDefaultDescription
$link

Location

include/dash_functions.php lines 1315 to 1344

Definition

 
function parse_dashtile_link($link)
    {
    global 
$userref$upload_then_edit;
    
$link str_replace("[userref]"$userref$link);

    
//For upload tiles respect the upload then edit preference
    
if((strpos($link'uploader=plupload') !== false) && $upload_then_edit)
        {
        global 
$baseurl;

        
$query parse_url($linkPHP_URL_QUERY);
        if(
$query === false || is_null($query))
            {
            
$query "";
            }

        
/**
        * @var path is the real ResourceSpace path (regardless if RS is installed under web root or in a subfolder)
        * Example:
        * For http://localhost/trunk/pages/edit.php?ref=-[userref]&uploader=plupload the real path is pages/edit.php as 
        * RS handles this via its baseurl when generating absolute paths.
        */
        
$path str_replace("{$baseurl}/"""$link);
        
$path str_replace("?{$query}"""$path);

        
$link str_replace($path"pages/upload_plupload.php"$link);
        }

    return 
$link;
    }

This article was last updated 25th November 2020 08:05 Europe/London time based on the source file dated 3rd November 2020 16:55 Europe/London time.