16 Replies Latest reply on Feb 19, 2017 7:21 PM by delfin

    Quick links to updating your avatar, profile and adding skills

    danthomas

      Updating your avatar and profile (not profile image) are annoying lengthy processes in Jive-n - but there's a way you can make them way shorter!

       

      I've developed the code below to create quick links to the edit avatar page (the one with the browse option to upload your image), edit your profile page (the one with all your profile fields / bio on) and add skills, where it scrolls down to the portion of the page where the skills box is.

       

      To use it, just add the code to an HTML widget on an overview page.

       

      Tested up to Jive 8

       

      The output looks like this:

      and you can replace the links with images if you'd like.

       

      The code is:

      <a style="color:#818080; text-decoration: underline;" class="seRollover" href="javascript:void(0);" onclick="window.open('/'+'avatar-userupload!inputImage.jspa?targetUser='+window.parent._jive_current_user.ID)">Edit Avatar</a>  |  <a style="color:#818080; text-decoration: underline;"class="seRollover" href="javascript:void(0);" onclick="window.open('/'+'edit-profile!input.jspa?targetUser='+window.parent._jive_current_user.ID);"><span class="lnk">Edit Profile</span></a>  |  <a style="color:#818080; text-decoration: underline;"class="seRollover" href="javascript:void(0);" onclick="window.open('/'+'people/'+window.parent._jive_current_user.username);"><span class="lnk">Add Skills</span></a>

       

      To give you a bit of background, what the code is doing is detecting the users username and adding it to a URL to create a link to their specific page.

       

      To break the code down (for your nerds). Here's the complete code for the 'edit avatar' link

      <a style="color:#818080; text-decoration: underline;" class="seRollover" href="javascript:void(0);" onclick="window.open('/'+'avatar-userupload!inputImage.jspa?targetUser='+window.parent._jive_current_user.ID)">Edit Avatar</a>

       

      The link's href has a 'void' which prompts the javascript to start at an on 'onclick' event (someone clicking the link)

       

      at that point the javascript builds a URL that starts with the standard Jive URL:

       

      avatar-userupload!inputImage.jspa?targetUser=

       

      and add's the persons username

       

      + window.parent._jive_current_user.ID

       

      presto, a new URL of:

       

      (you jive instance)/avatar-userupload!inputImage.jspa?targetUser=[USERNAME]

       

       

      We've stuck this on our homepage in a 'my hive' area which looks like this:

       

       

      It'll work anywhere, to test it just use a test group.

       

      Hope it helps adoption in your community!