Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 4456 to 4481

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 25th November 2020 07:35 Europe/London time based on the source file dated 13th November 2020 16:50 Europe/London time.