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

add_user_dash_tile()

Parameters

ColumnTypeDefaultDescription
$user
$tile
$order_by
$reorder true

Location

include/dash_functions.php lines 975 to 988

Definition

 
function add_user_dash_tile($user,$tile,$order_by,$reorder=true)
    {
    if(!
is_numeric($user)||!is_numeric($tile)){return false;}
    if(!
is_numeric($order_by))
        {
        
$order_by=append_user_position($user);
        
$reorder=false;
        }
        
    
ps_query("INSERT INTO user_dash_tile (user,dash_tile,order_by) VALUES (?, ?, ?)  ON DUPLICATE KEY UPDATE order_by= ?", ['i'$user'i'$tile'i'$order_by'i'$order_by]);
        
    if(
$reorder){reorder_user_dash($user);}
    return 
true;
    }

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.