482 tplvars.NAME = '<a href="' + makeUrlNS('User', data.name) + '">' + data.name + '</a>'; |
482 tplvars.NAME = '<a href="' + makeUrlNS('User', data.name) + '">' + data.name + '</a>'; |
483 |
483 |
484 if ( data.approved != '1' ) |
484 if ( data.approved != '1' ) |
485 tplvars.SUBJECT += ' <span style="color: #D84308">' + $lang.get('comment_msg_note_unapp') + '</span>'; |
485 tplvars.SUBJECT += ' <span style="color: #D84308">' + $lang.get('comment_msg_note_unapp') + '</span>'; |
486 |
486 |
487 // User level |
487 // Name |
488 tplvars.USER_LEVEL = $lang.get('user_type_guest'); |
488 tplvars.NAME = data.name; |
489 if ( data.user_level >= data.user_level_list.member ) tplvars.USER_LEVEL = $lang.get('user_type_member'); |
489 if ( data.user_id > 1 ) |
490 if ( data.user_level >= data.user_level_list.mod ) tplvars.USER_LEVEL = $lang.get('user_type_mod'); |
490 tplvars.NAME = '<a href="' + makeUrlNS('User', data.name) + '" style="' + data.rank_data.rank_style + '">' + data.name + '</a>'; |
491 if ( data.user_level >= data.user_level_list.admin ) tplvars.USER_LEVEL = $lang.get('user_type_admin'); |
|
492 |
491 |
493 // Avatar |
492 // Avatar |
494 if ( data.user_has_avatar == '1' ) |
493 if ( data.user_has_avatar == '1' ) |
495 { |
494 { |
496 tplvars.AVATAR_URL = scriptPath + '/' + data.avatar_directory + '/' + data.user_id + '.' + data.avatar_type; |
495 tplvars.AVATAR_URL = data.avatar_path; |
497 tplvars.USERPAGE_LINK = makeUrlNS('User', data.name); |
496 tplvars.USERPAGE_LINK = makeUrlNS('User', data.name); |
498 tplvars.AVATAR_ALT = $lang.get('usercp_avatar_image_alt', { username: data.name }); |
497 tplvars.AVATAR_ALT = $lang.get('usercp_avatar_image_alt', { username: data.name }); |
499 } |
498 } |
|
499 |
|
500 // User level |
|
501 tplvars.USER_LEVEL = ''; |
|
502 if ( data.rank_data.user_title ) |
|
503 tplvars.USER_LEVEL += data.rank_data.user_title; |
|
504 if ( data.rank_data.rank_title && data.rank_data.user_title ) |
|
505 tplvars.USER_LEVEL += '<br />'; |
|
506 if ( data.rank_data.rank_title ) |
|
507 tplvars.USER_LEVEL += $lang.get(data.rank_data.rank_title); |
500 |
508 |
501 // Send PM link |
509 // Send PM link |
502 tplvars.SEND_PM_LINK=(data.user_id>1)?'<a onclick="window.open(this.href); return false;" href="'+ makeUrlNS('Special', 'PrivateMessages/Compose/To/' + ( data.name.replace(/ /g, '_') )) +'">' + $lang.get('comment_btn_send_privmsg') + '</a><br />':''; |
510 tplvars.SEND_PM_LINK=(data.user_id>1)?'<a onclick="window.open(this.href); return false;" href="'+ makeUrlNS('Special', 'PrivateMessages/Compose/To/' + ( data.name.replace(/ /g, '_') )) +'">' + $lang.get('comment_btn_send_privmsg') + '</a><br />':''; |
503 |
511 |
504 // Add buddy link |
512 // Add buddy link |