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 976 to 989

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 15th December 2024 10:05 Europe/London time based on the source file dated 12th December 2024 19:40 Europe/London time.