1 // Copyright (c) 2016-2022 by the citadel.org team
3 // This program is open source software. Use, duplication, or
4 // disclosure are subject to the GNU General Public License v3.
7 // Inline display the author of a message. This can be called from many different views.
8 // For messages originating locally, it renders the display name linked to their profile.
9 // For messages originating locally, it renders the display name and their email address.
10 function render_msg_author(msg, view) {
11 if ((msg.locl) && (view == views.VIEW_BBS)) {
13 "<span class=\"ctdl-username\" onClick=\"javascript:user_profile('" + msg.from + "');\">"
19 return("<span class=\"ctdl-username\">" + msg.from + " <" + msg.rfca + "></span>");
24 // Inline display the profile picture for a user. This can be called from anywhere.
25 function render_userpic(username) {
27 "<div class=\"ctdl-avatar\" onClick=\"javascript:user_profile('" + username + "');\">"
28 + "<img src=\"/ctdl/u/" + username + "/userpic\" width=\"32\""
29 + "onerror=\"this.parentNode.innerHTML='<i class="fa fa-user-circle fa-2x"></i>'\">"
30 + "</div>" // end avatar
35 // Display the user profile page for a user
36 function user_profile(who) {
37 document.getElementById("ctdl-main").innerHTML =
39 + "This is the user profile page for " + who + ".<br>"
40 + "FIXME finish this";