Source: site.view [edit]
Function name: profileRender
Arguments: profile
Description: Render a user's profile
Page type: snippet
Render function:  
Module: siteutil

Page source:

<table>
<tr>
<td>
<webl>
   if profile.photo != "" then
      `<img src="` + profile.photo + `">`
   else
      "&nbsp;"
   end;
</webl>
</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>

<h1><webl>profile.user + " (" + profile.name + ")"</webl></h1>

<webl>
  var s = "";
  if profile.title     != "" then s = s + profile.title     + "<br>" end;
  if profile.location1 != "" then s = s + profile.location1 + "<br>" end;
  if profile.location2 != "" then s = s + profile.location2 + "<br>" end;
  if profile.phone     != "" then s = s + profile.phone     + "<br>" end;
  if profile.email     != "" then s = s + profile.email     + "<br>" end;
  if profile.url       != "" then
     s = s + `<a href="` + profile.url + `">` + profile.url + "</a>\n"
  end;
  "<p>" + s + "</p>";
</webl>

</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>
<webl>profile.bio</webl> &nbsp;
</td>
</tr>
</table>

<webl>
  Markup(WubCall("groupsRender", [WubCall("mygroups", [profile.user])]));
</webl>

<h1>User Functions</h1>

<p>The module <b><webl>profile.user</webl></b> contains the following
functions:</p>

<webl>
   var s = "<table>";
   every f in Wub_FunctionList(profile.user) do
      var func = Wub_GetFunctionInfo(profile.user + "." + f);
      var funcsummary = Wub_TruncateWithEllipsis( func.name +"("+func.arglist+")", 28);
      var editlink = "";
      if (profile.user == wubinfo.user) then
         editlink = "/" + Wub_ALinkCmd2("site.edit(" + profile.user + "." + f +")", "edit")  
      end;
      if (Str_Trim(func.arglist) == "") then
         editlink = editlink + "/" + Wub_ALinkCmd2(profile.user + "." + f, "go")  
      end;
      var item = "<td>&nbsp;&nbsp;&nbsp;" 
          + funcsummary
          + "</td><td>&nbsp;[" 
                + Wub_ALinkCmd2("site.source(" + profile.user + "." + f +")", "source")
                + editlink
                + "]&nbsp;</td>"
          + "<td>" + Wub_GetFunctionInfo(profile.user + "." + f).description + "</td>" ;

      s = s + "<tr>" + item + "</tr>\n";
   end;
   s + "</table>";
</webl>