Changeset 910

Show
Ignore:
Timestamp:
07/28/08 21:52:05 (4 months ago)
Author:
bsmith
Message:

adding userpics

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Vanilla/templates/vanilla+authentication/javascript.mtml

    r891 r910  
    11<$mt:var name="user-auth" value="signin-content"$> 
     2<mt:Ignore> 
     3    Set show_userpic to 1 to enable userpics in the signin line 
     4    - Requires Community Solution 
     5    - Note: This will update username to link to Community Solution "edit profile" script. This script assumes that you are using profiles and thus links to "view profile" screen. If the template set is not using profiles then the Community Solution "Profile Edit" Global System Template should be updated. 
     6</mt:Ignore> 
     7<$mt:var name="show_userpic" value="1"$> 
    28 
    39/* section *****************************************************************/ 
     
    6571    } 
    6672    if (u && u.name) { 
     73<mt:If name="show_userpic"> 
     74        if (u.userpic) 
     75            content += '<img src="' + u.userpic + '" width="50" height="50" />'; 
     76</mt:If> 
    6777        var url; 
    6878        if (u.is_authenticated) { 
    6979            if (u.is_author) { 
     80<mt:If name="show_userpic"> 
     81                url = '<$mt:CGIPath$><$mt:CommunityScript$>?__mode=edit&blog_id=<$mt:BlogID$>'; 
     82                url += '&return_to=' + encodeURIComponent(document.URL); 
     83<mt:Else> 
    7084                url = '<$mt:CGIPath$><$mt:CommentScript$>?__mode=edit_profile&blog_id=<$mt:BlogID$>'; 
    7185                url += '&static=' + encodeURIComponent( location.href ); 
     86</mt:If> 
    7287            } else { 
    7388                url = u.url; 
     
    7893            url = null; 
    7994        } 
    80         var content = '<__trans phrase="You are signed in as " escape="js">'; 
     95        content += '<__trans phrase="You are signed in as " escape="js">'; 
    8196        if (url) 
    8297            content += '<a href="' + url + '">' + u.name + '</a>';