Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource 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.