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

Parameters

This function accepts no parameters.

Location

include/dash_functions.php lines 639 to 727

Definition

 
function get_managed_dash()
    {
    global 
$baseurl,$baseurl_short,$lang,$anonymous_login,$username$userref$usergroup;
    global 
$managed_home_dash$help_modal;
    
#Build Tile Templates
    
$tiles ps_query("
        SELECT dash_tile.ref AS 'tile',
                dash_tile.title,
                dash_tile.url,
                dash_tile.reload_interval_secs,
                dash_tile.link,
                dash_tile.default_order_by,
                (
                    SELECT ugdt.default_order_by
                        FROM usergroup_dash_tile AS ugdt
                        WHERE ugdt.dash_tile = dash_tile.ref
                        AND ugdt.usergroup = ?
                ) AS 'usergroup_default_order_by'
            FROM dash_tile
            WHERE dash_tile.all_users = 1
            AND (dash_tile.ref IN (SELECT dash_tile FROM usergroup_dash_tile WHERE usergroup_dash_tile.usergroup = ?)
            OR dash_tile.ref NOT IN (SELECT distinct dash_tile FROM usergroup_dash_tile))
            AND (
                dash_tile.allow_delete = 1
                OR (
                    dash_tile.allow_delete = 0
                    AND dash_tile.ref IN (SELECT DISTINCT user_dash_tile.dash_tile FROM user_dash_tile)
                    )
                )
        ORDER BY usergroup_default_order_by ASC, default_order_by ASC
    "
, ['i'$usergroup'i'$usergroup]);
    
    foreach(
$tiles as $tile)
        {
        
$tile_custom_style '';   
        
$buildstring explode('?'$tile['url']);
        list(
$url_page$buildstring) = $buildstring;
        
parse_str(str_replace('&''&'$buildstring), $buildstring);
        if(isset(
$buildstring['tltype']) && allow_tile_colour_change($buildstring['tltype']) && isset($buildstring['tlstylecolour']))
            {
            
$tile_custom_style .= get_tile_custom_style($buildstring);
            }
        
?>
        <a 
            
            
# Check link for external or internal
            
if('http' == mb_strtolower(substr($tile['link'], 04)))
                {
                
$link   parse_dashtile_link($tile['link']);
                
$newtab true;
                }
            else
                {
                
$link   $baseurl '/' escape(parse_dashtile_link($tile['link']));
                
$newtab false;
                }
                
?>
            href=" echo $link?> echo $newtab "target='_blank'" "";?>
            onClick=" echo !$newtab 'return ' . ($help_modal && strpos($link,'pages/help.php') !== false 'ModalLoad(this,true);' 'CentralSpaceLoad(this,true);') : ''?>"

            
            
# Check if tile is set to double width
            
$tlsize = (isset($buildstring['tlsize']) ? $buildstring['tlsize'] : '');
            
?>
            class="HomePanel DashTile DashTileDraggable  echo 'double' == $tlsize 'DoubleWidthDashTile' ''?>
            id="tile echo escape($tile["tile"]);?>"
        >
            <div id="contents_tile echo escape($tile["tile"]);?>" class="HomePanelIN HomePanelDynamicDash" style=" echo $tile_custom_style?>">
                 if (strpos($tile["url"],"dash_tile.php")!==false
                    {
                    
# Only pre-render the title if using a "standard" tile and therefore we know the H2 will be in the target data.
                    
?>
                    <h2 class="title"> echo escape($tile["title"]);?></h2>
 
                    
?>
                <p>Loading...</p>
                <script>
                    height = jQuery("#contents_tile echo escape($tile["tile"]);?>").height();
                    width = jQuery("#contents_tile echo escape($tile["tile"]);?>").width();
                    jQuery("#contents_tile echo escape($tile["tile"]);?>").load(" echo generateURL($baseurl .'/'$url_pagearray_merge($buildstring, ['tile' => $tile['tile']]));?>&tlwidth="+width+"&tlheight="+height);
                </script>
            </div>
        </a>
        
        

    
?>
    <div class="clearerleft"></div>
    
    
}

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.