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

process_notify_user_contributed_submitted()

Description

Get contributed by user formatted for inclusion in notifications

Parameters

ColumnTypeDefaultDescription
$ref int ID of resource
$htmlbreak string HTML break type

Return

string

Location

include/resource_functions.php lines 4613 to 4638

Definition

 
function process_notify_user_contributed_submitted($ref,$htmlbreak)
    {
    global 
$use_phpmailer,$baseurl$lang;
    
$url="";
    
$url=$baseurl "/?r=" $ref;
    
    if (
$use_phpmailer){$url="<a href'$url'>$url</a>";}
    
    
// Get the user (or username) of the contributor:
    
$query "SELECT user.username, user.fullname FROM resource INNER JOIN user ON user.ref = resource.created_by WHERE resource.ref ='".$ref."'";
    
$result sql_query($query);
    
$user '';
    if(
count($result) == 0)
        {
        
$user $lang["notavailableshort"];
        }
    elseif(
trim($result[0]['fullname']) != ''
        {
        
$user $result[0]['fullname'];
        } 
    else 
        {
        
$user $result[0]['username'];
        }
    return 
$htmlbreak $user ': ' $url;
    }

This article was last updated 26th January 2022 11:05 Europe/London time based on the source file dated 25th January 2022 13:30 Europe/London time.